Hello folks. Is there a way to create a GCP IAM Po...
# google-cloud
b
Hello folks. Is there a way to create a GCP IAM Policy dynamically? In Go syntax
organizations.GetIAMPolicyBinding
accepts members as a
[]string
, and I need to put a newly created service account's name there. Here's a snippet that I have trouble with:
Copy code
sshPolicy := must.OK1(organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
		Bindings: []organizations.GetIAMPolicyBinding{
			{
				Role: "roles/compute.osLogin",
				Members: pulumi.StringArray{
					sshServiceAccount.Name, // cannot use pulumi.StringArray as []string
				},
			},
		},
	}))