Skip to content

Commit

Permalink
Fix Dana's comments, round two!
Browse files Browse the repository at this point in the history
  • Loading branch information
paddycarver committed Oct 3, 2018
1 parent 691ae99 commit 8f6d256
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions google/resource_app_engine_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 1 addition & 3 deletions google/resource_google_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 8f6d256

Please sign in to comment.