mirror of https://github.com/kubernetes/kops.git
gce terraform: Use google_storage_object_acl
We are using the schema of google_storage_object_acl.
This commit is contained in:
parent
cef636e8bd
commit
0b8cb933ad
|
@ -456,7 +456,7 @@ func (p *GSPath) RenderTerraform(w *terraformWriter.TerraformWriter, name string
|
|||
// https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_object_acl#role_entity
|
||||
tfACL.RoleEntity = append(tfACL.RoleEntity, fmt.Sprintf("%v:%v", re.Role, re.Entity))
|
||||
}
|
||||
return w.RenderResource("google_storage_object_access_control", name, tfACL)
|
||||
return w.RenderResource("google_storage_object_acl", name, tfACL)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -122,13 +122,13 @@ func TestGSRenderTerraform(t *testing.T) {
|
|||
t.FailNow()
|
||||
}
|
||||
|
||||
if objs := res["google_storage_object_access_control"]; objs == nil {
|
||||
t.Fatalf("google_storage_object_access_control resources not found: %v", res)
|
||||
if objs := res["google_storage_object_acl"]; objs == nil {
|
||||
t.Fatalf("google_storage_object_acl resources not found: %v", res)
|
||||
}
|
||||
if obj := res["google_storage_object_access_control"][tc.gsObject]; obj == nil {
|
||||
t.Fatalf("google_storage_object_access_control object not found: %v", res["google_storage_object_access_control"])
|
||||
if obj := res["google_storage_object_acl"][tc.gsObject]; obj == nil {
|
||||
t.Fatalf("google_storage_object_acl object not found: %v", res["google_storage_object_acl"])
|
||||
}
|
||||
actualACL, err := json.Marshal(res["google_storage_object_access_control"][tc.gsObject])
|
||||
actualACL, err := json.Marshal(res["google_storage_object_acl"][tc.gsObject])
|
||||
if err != nil {
|
||||
t.Fatalf("error marshaling gs ACL: %v", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue