AWS IAM assume role erron: MalformedPolicyDocument: Invalid principal in policy: "AWS" #184
Labels
bug
Addresses a defect in current functionality.
service/iam
Issues and PRs that pertain to the iam service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
This issue was originally opened by @p0bailey as hashicorp/terraform#7076. It was migrated here as part of the provider split. The original body of the issue is below.
Hello there,
I'm getting a funny behaviour when creating a new role named SecurityMonkeyInstanceProfile and
another role named SecurityMonkey, when SecurityMonkey role wants to assume SecurityMonkeyInstanceProfile role, terraform fails to detect SecurityMonkeyInstanceProfile role (see DEBUG). In order to fix this dependency, terraform requires an additional terraform apply as the first fails.
Terraform Version
v0.6.16
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Debug Output
https://gist.github.com/p0bailey/3bb66f4cc628bb9fedc5d03d37b7e1c8
Panic Output
NA
Expected Behavior
SecurityMonkey role should assume SecurityMonkeyInstanceProfile role at the first
run rather than failing and succeeding only after a second run of terraform apply.
Actual Behavior
Terraform requires a second terraform apply
Steps to Reproduce
terraform apply
Important Factoids
NA
References
http://stackoverflow.com/questions/37615891/invalid-principal-in-policy
The text was updated successfully, but these errors were encountered: