Fix Dana's comments, round two!

This commit is contained in:
Paddy Carver 2018-10-02 23:41:31 -07:00
parent 691ae9986b
commit 8f6d256f51
2 changed files with 2 additions and 3 deletions

View File

@ -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")

View File

@ -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
}