12/22/2020, 2:30 AM
I am getting an error for an imported organization policy resource:
Copy code
error: gcp:organizations/policy:Policy resource 'domain_restricted_sharing' has a problem: ExactlyOne
I'm not sure what the issue is and could use some help. I can get it to work with ListPolicy.All, but not ListPolicy.Allow. Code inside the thread.
Import command:
Copy code
pulumi import gcp:organizations/policy:Policy domain_restricted_sharing 11111111111/constraints/iam.allowedPolicyMemberDomains
Copy code
package main

import (

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := organizations.NewPolicy(ctx, "domain_restricted_sharing", &organizations.PolicyArgs{
			Constraint: pulumi.String("constraints/iam.allowedPolicyMemberDomains"),
			ListPolicy: &organizations.PolicyListPolicyArgs{
				Allow: &organizations.PolicyListPolicyAllowArgs{
					// All: pulumi.BoolPtr(true),
					Values: pulumi.StringArray{
						// <>
			OrgId: pulumi.String("11111111111"),
		}, pulumi.Protect(true))
		if err != nil {
			return err
If I use
All: pulumi.BoolPtr(true),
inside the
, it is accepted. If I use the Values, it does not.
Also, I imported it with the ListPolicy.Allow.Values, not ListPolicy.Allow.All. I am not trying to make any changes, just have it codified.