Skip to content

Commit 8f6d256

Browse files
committed
Fix Dana's comments, round two!
1 parent 691ae99 commit 8f6d256

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

google/resource_app_engine_application.go

+1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ func resourceAppEngineApplicationCreate(d *schema.ResourceData, meta interface{}
163163
// Wait for the operation to complete
164164
waitErr := appEngineOperationWait(config.clientAppEngine, op, project, "App Engine app to create")
165165
if waitErr != nil {
166+
d.SetId("")
166167
return waitErr
167168
}
168169
log.Printf("[DEBUG] Created App Engine App")

google/resource_google_project.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,7 @@ func appEngineFeatureSettingsResource() *schema.Resource {
209209

210210
func resourceGoogleProjectCustomizeDiff(diff *schema.ResourceDiff, meta interface{}) error {
211211
if old, _ := diff.GetChange("app_engine.0.location_id"); diff.HasChange("app_engine.0.location_id") && old != nil && old.(string) != "" {
212-
// if location_id was already set, and has a new value, that forces a new app
213-
// if location_id wasn't set, don't force a new value, as we're just enabling app engine
214-
return diff.ForceNew("app_engine.0.location_id")
212+
return fmt.Errorf("Cannot change app_engine.0.location_id once the app is created.")
215213
}
216214
return nil
217215
}

0 commit comments

Comments
 (0)