-
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.
- Loading branch information
1 parent
7b919db
commit d582945
Showing
2 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
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
11 changes: 11 additions & 0 deletions
11
mmv1/templates/terraform/post_create/colab_runtime_template.tmpl
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,11 @@ | ||
// The operation for this resource contains the generated name that we need | ||
// in order to perform a READ. We need to access the object inside of it as | ||
// a map[string]interface, so let's do that. | ||
|
||
resp := res["response"].(map[string]interface{}) | ||
name := tpgresource.GetResourceNameFromSelfLink(resp["name"].(string)) | ||
log.Printf("[DEBUG] Setting AccessPolicy name, id to %s", name) | ||
if err := d.Set("name", name); err != nil { | ||
return fmt.Errorf("Error setting name: %s", err) | ||
} | ||
d.SetId(name) |