mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
Fix Dana's comments, round two!
This commit is contained in:
parent
691ae9986b
commit
8f6d256f51
@ -163,6 +163,7 @@ func resourceAppEngineApplicationCreate(d *schema.ResourceData, meta interface{}
|
||||
// Wait for the operation to complete
|
||||
waitErr := appEngineOperationWait(config.clientAppEngine, op, project, "App Engine app to create")
|
||||
if waitErr != nil {
|
||||
d.SetId("")
|
||||
return waitErr
|
||||
}
|
||||
log.Printf("[DEBUG] Created App Engine App")
|
||||
|
@ -209,9 +209,7 @@ func appEngineFeatureSettingsResource() *schema.Resource {
|
||||
|
||||
func resourceGoogleProjectCustomizeDiff(diff *schema.ResourceDiff, meta interface{}) error {
|
||||
if old, _ := diff.GetChange("app_engine.0.location_id"); diff.HasChange("app_engine.0.location_id") && old != nil && old.(string) != "" {
|
||||
// if location_id was already set, and has a new value, that forces a new app
|
||||
// if location_id wasn't set, don't force a new value, as we're just enabling app engine
|
||||
return diff.ForceNew("app_engine.0.location_id")
|
||||
return fmt.Errorf("Cannot change app_engine.0.location_id once the app is created.")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user