Open t0yv0 opened 1 week ago
In fact this bug reproduces in Terraform with terraform apply -refresh=false
. The behavior is identical. So I believe this is strong evidence that opting out of refresh is the root cause here. We need to consider enabling default refresh on per resource basis. https://github.com/pulumi/pulumi-terraform-bridge/issues/1754
https://github.com/pulumi/pulumi-aws/issues/4654 other Exclusive resources would be suspect here as well.
Describe what happened
aws.iam.RolePoliciesExclusive does not take effect in Pulumi (does not restrict RolePolicy from being added to a Role) until Pulumi is called with refresh. This problem exists upstream but is worse in Pulumi as in Terraform it is sufficient to keep
terraform apply
to reach the steady state, where in Pulumi one has to runpulumi up --refresh
.Sample program
Sample program:
Do a
pulumi up
without rolePolicy3, then add rolePolicy3 and do apulumi up
and it will be created. IN fact according to AWS CLI all the policies are attached to the role:Subsequent
pulumi up
shows no changes. This means that the aws.iam.RolePoliciesExclusive fails to restrict the policy names to two in Pulumi.Log output
No response
Affected Resource(s)
No response
Output of
pulumi about
Additional context
It is possible that the difference between Pulumi and Terraform in this case is that Pulumi does not refresh by default, when Terraform does.
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).