Skip to content

Commit b75ab52

Browse files
Removed accesscontextmanager.AccessPolicy post_create custom code (#13519)
[upstream:545c77033c86d5b1ec1fc23dfd98308dc3322cce] Signed-off-by: Modular Magician <[email protected]>
1 parent 4420324 commit b75ab52

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

.changelog/13519.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/services/accesscontextmanager/resource_access_context_manager_access_policy.go

-12
Original file line numberDiff line numberDiff line change
@@ -186,18 +186,6 @@ func resourceAccessContextManagerAccessPolicyCreate(d *schema.ResourceData, meta
186186
}
187187
d.SetId(id)
188188

189-
// The operation for this resource contains the generated name that we need
190-
// in order to perform a READ. We need to access the object inside of it as
191-
// a map[string]interface, so let's do that.
192-
193-
resp := res["response"].(map[string]interface{})
194-
name := tpgresource.GetResourceNameFromSelfLink(resp["name"].(string))
195-
log.Printf("[DEBUG] Setting AccessPolicy name, id to %s", name)
196-
if err := d.Set("name", name); err != nil {
197-
return fmt.Errorf("Error setting name: %s", err)
198-
}
199-
d.SetId(name)
200-
201189
log.Printf("[DEBUG] Finished creating AccessPolicy %q: %#v", d.Id(), res)
202190

203191
return resourceAccessContextManagerAccessPolicyRead(d, meta)

0 commit comments

Comments
 (0)