-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AppEngine Standard Application Version resource. (#1884)
* Added appengine standard version resource * Update products/appengine/api.yaml * Update tracked submodules -> HEAD on Mon Aug 26 17:16:59 UTC 2019 Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
- Loading branch information
1 parent
ecacdcb
commit 32756c9
Showing
11 changed files
with
392 additions
and
6 deletions.
There are no files selected for viewing
Submodule terraform
updated
from b5462e to 1454cb
Submodule terraform-beta
updated
from 1f182c to 3a1d01
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
templates/terraform/custom_check_destroy/appengine_version.go.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
log.Printf("[DEBUG] Ignoring destroy during test") |
49 changes: 49 additions & 0 deletions
49
templates/terraform/custom_delete/noop_on_destroy_appengine_version.go.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
if d.Get("noop_on_destroy") == true { | ||
log.Printf("[DEBUG] Keeping the StandardAppVersion %q", d.Id()) | ||
return nil | ||
} | ||
config := meta.(*Config) | ||
|
||
project, err := getProject(d, config) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
lockName, err := replaceVars(d, config, "apps/{{project}}/services/{{service}}") | ||
if err != nil { | ||
return err | ||
} | ||
mutexKV.Lock(lockName) | ||
defer mutexKV.Unlock(lockName) | ||
|
||
url, err := replaceVars(d, config, "{{AppEngineBasePath}}apps/{{project}}/services/{{service}}/versions/{{version_id}}") | ||
if err != nil { | ||
return err | ||
} | ||
|
||
var obj map[string]interface{} | ||
log.Printf("[DEBUG] Deleting StandardAppVersion %q", d.Id()) | ||
|
||
res, err := sendRequestWithTimeout(config, "DELETE", project, url, obj, d.Timeout(schema.TimeoutDelete)) | ||
if err != nil { | ||
return handleNotFoundError(err, d, "StandardAppVersion") | ||
} | ||
|
||
op := &appengine.Operation{} | ||
err = Convert(res, op) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
err = appEngineOperationWaitTime( | ||
config.clientAppEngine, op, project, "Deleting StandardAppVersion", | ||
int(d.Timeout(schema.TimeoutDelete).Minutes())) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
log.Printf("[DEBUG] Finished deleting StandardAppVersion %q: %#v", d.Id(), res) | ||
return nil | ||
|
||
|
Oops, something went wrong.