magnificent-restaurant-97310
06/17/2022, 6:23 AMpulumi.Run(func(ctx *pulumi.Context) error {
_, err := orgpolicy.NewPolicy(ctx, "primary", &orgpolicy.PolicyArgs{
Parent: pulumi.String(org),
Name: pulumi.String("gcp.resourceLocations"),
Spec: &orgpolicy.PolicySpecArgs{
Rules: orgpolicy.PolicySpecRuleArray{
&orgpolicy.PolicySpecRuleArgs{
Enforce: pulumi.String("TRUE"),
Values: orgpolicy.PolicySpecRuleValues{
AllowedValues: []string{"region1", "region2"},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
but I’m getting an error :
cannot use orgpolicy.PolicySpecRuleValues{...} (type orgpolicy.PolicySpecRuleValues) as type orgpolicy.PolicySpecRuleValuesPtrInput in field value:
orgpolicy.PolicySpecRuleValues does not implement orgpolicy.PolicySpecRuleValuesPtrInput (missing ElementType method)
anyone experienced this?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by