mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-03 01:01:06 +00:00
Fix suggestions from @ndmckinley.
This commit is contained in:
parent
e74ab9d507
commit
98b6323342
@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
appEngineOperationIdRE = regexp.MustCompile(fmt.Sprintf("apps/%s/operations/(.*)", ProjectRegex))
|
||||
appEngineOperationIdRegexp = regexp.MustCompile(fmt.Sprintf("apps/%s/operations/(.*)", ProjectRegex))
|
||||
)
|
||||
|
||||
type AppEngineOperationWaiter struct {
|
||||
@ -24,7 +24,7 @@ type AppEngineOperationWaiter struct {
|
||||
|
||||
func (w *AppEngineOperationWaiter) RefreshFunc() resource.StateRefreshFunc {
|
||||
return func() (interface{}, string, error) {
|
||||
matches := appEngineOperationIdRE.FindStringSubmatch(w.Op.Name)
|
||||
matches := appEngineOperationIdRegexp.FindStringSubmatch(w.Op.Name)
|
||||
if len(matches) != 2 {
|
||||
return nil, "", fmt.Errorf("Expected %d results of parsing operation name, got %d from %s", 2, len(matches), w.Op.Name)
|
||||
}
|
||||
|
@ -114,6 +114,8 @@ func appEngineResource() *schema.Resource {
|
||||
"auth_domain": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
// We're having trouble with PATCH throwing 400s/500s, so we need this
|
||||
// to force a new resource until we can get updating working.
|
||||
ForceNew: true,
|
||||
Computed: true,
|
||||
},
|
||||
@ -143,6 +145,8 @@ func appEngineResource() *schema.Resource {
|
||||
"serving_status": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
// We're having trouble with PATCH throwing 400s/500s, so we need this
|
||||
// to force a new resource until we can get updating working.
|
||||
ForceNew: true,
|
||||
ValidateFunc: validation.StringInSlice([]string{
|
||||
"UNSPECIFIED",
|
||||
@ -168,6 +172,8 @@ func appEngineResource() *schema.Resource {
|
||||
Type: schema.TypeList,
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
// We're having trouble with PATCH throwing 400s/500s, so we need this
|
||||
// to force a new resource until we can get updating working.
|
||||
ForceNew: true,
|
||||
MaxItems: 1,
|
||||
Elem: appEngineFeatureSettingsResource(),
|
||||
@ -261,7 +267,6 @@ func resourceGoogleProjectCreate(d *schema.ResourceData, meta interface{}) error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.Printf("[DEBUG] Creating App Engine if %v is true", app != nil)
|
||||
if app != nil {
|
||||
log.Printf("[DEBUG] Enabling App Engine")
|
||||
// enable the app engine APIs so we can create stuff
|
||||
|
Loading…
Reference in New Issue
Block a user