-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent treatment of role
argument in IAM
#30
Comments
This is, unfortunately, our own doing. It's ill-documented, however, we have the notion of "overlays" which can alter the underlying Terraform type to make it more idiomatic in the target language. In this case, we are being clever and letting you use a capability-style of configuring resources, where you use object identity rather than strings. This is nice, because you don't need to know to You can see where we've enabled it for Line 566 in 8345675
RolePolicy . Frankly, we've been tackling these as we go, and we are due for a more coherent push to get consistent here.
But in parallel with this, we have the overall problem that, sometimes you actually may want to pass a Anyway, a simple solution is to just add the overlays as we encounter them. This may be a fine approach for now so that we can learn more before deciding on the long term solution. |
@lukehoban this doesn't feel like something I'm going to get to soon, but it feels like something to add to the pile of breaking changes we might consider in 0.11. |
A similar issue for Edit: Actually, I read the initial problem description too quickly, this is already fixed by #278 - |
In this example, I want to create an IAM role, attach an inline policy, then create an EC2 instance profile with that role.
At point (a), the role is specified using a string ARN.
pulumi-aws/pack/iam/rolePolicy.ts
Line 76 in 8345675
At point (b), the role must be specified as the
Role
object.pulumi-aws/pack/iam/instanceProfile.ts
Line 90 in 8345675
I haven't looked into how the code is generated yet, but the underlying Terraform schema entries are both
schema.TypeString
:https://github.com/terraform-providers/terraform-provider-aws/blob/90d698c66db80d676e2db197be97c1a9977e5393/aws/resource_aws_iam_instance_profile.go#L99
https://github.com/terraform-providers/terraform-provider-aws/blob/90d698c66db80d676e2db197be97c1a9977e5393/aws/resource_aws_iam_role_policy.go#L50
The text was updated successfully, but these errors were encountered: