-
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
464e47b
commit 8053cbd
Showing
3 changed files
with
12 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
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
10 changes: 10 additions & 0 deletions
10
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,10 @@ | ||
// 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 resource name, id to %s", name) | ||
if err := d.Set("name", name); err != nil { | ||
return fmt.Errorf("Error setting name: %s", err) | ||
} |