Skip to content
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

elasticache tag lookups happen in wrong account when assuming cross account iam roles in aws #5064

Closed
potto007 opened this issue Jul 3, 2018 · 3 comments
Labels
bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. service/elasticache Issues and PRs that pertain to the elasticache service.
Milestone

Comments

@potto007
Copy link

potto007 commented Jul 3, 2018

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.7
+ provider.aws v1.25.0

Affected Resource(s)

  • aws_elasticache

Debug Output

https://gist.github.com/potto007/dc0cda64709c346d888e7ff2f9905f74

Expected Behavior

Terraform creates, reads, updates, and deletes tags for elasticache.

Actual Behavior

Terraform aborts with errors that the elasticache resources do not exist.

Steps to Reproduce

  1. create a tf file that defines an aws_elasticache_cluster and tags for that cluster
  2. assume role to another aws account
  3. terraform apply

References

The root cause for this issue is the same as the root cause for #1189.

@bflad bflad added bug Addresses a defect in current functionality. service/elasticache Issues and PRs that pertain to the elasticache service. provider Pertains to the provider itself, rather than any interaction with AWS. labels Jul 4, 2018
@bflad
Copy link
Contributor

bflad commented Jul 4, 2018

Potentially related to #5021 and #1615

@bflad
Copy link
Contributor

bflad commented Aug 15, 2018

This issue should be resolved by #5177 which was released in version 1.31.0 of the AWS provider. The updated provider initialization process uses new two methods to try and enhance the account ID lookup:

  • Using account ID of the assume role ARN if provided in the provider configuration
  • Using account ID found in the sts:GetCallerIdentity call as part of the "credentials validation" portion of the provider initialization (requires that skip_credentials_validation is not enabled, of course 😄 ) -- this occurs before other calls to EC2 Metadata and fallback IAM calls.

If this issue is not resolved by version 1.31.0, we can certainly reopen this. 👍 Thanks!

@bflad bflad closed this as completed Aug 15, 2018
@ghost
Copy link

ghost commented Apr 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. service/elasticache Issues and PRs that pertain to the elasticache service.
Projects
None yet
Development

No branches or pull requests

2 participants