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

data.aws_arn: Fails to validate managed IAM policy ARN #11449

Closed
phyber opened this issue Jan 1, 2020 · 4 comments · Fixed by #11450
Closed

data.aws_arn: Fails to validate managed IAM policy ARN #11449

phyber opened this issue Jan 1, 2020 · 4 comments · Fixed by #11450
Labels
bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS.
Milestone

Comments

@phyber
Copy link
Contributor

phyber commented Jan 1, 2020

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 other comments that do not add relevant new information or questions, 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.12.18
+ provider.aws v2.43.0

Affected Resource(s)

  • data.aws_arn

Terraform Configuration Files

data aws_arn cloudwatch_readonly_access {
  arn = "arn:aws:iam::aws:policy/CloudWatchReadOnlyAccess"
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

I should have been able to use a managed IAM policy ARN in the aws_arn data type.

Actual Behavior

The following errors occurs

Error: "arn" doesn't look like a valid ARN ("^arn:[\\w-]+:([a-zA-Z0-9\\-])+:([a-z]{2}-(gov-)?[a-z]+-\\d{1})?:(\\d{12})?:(.*)$"): "arn:aws:iam::aws:policy/CloudWatchReadOnlyAccess"

Steps to Reproduce

  1. Create some Terraform including the above data source
  2. terraform plan

Important Factoids

N/A

References

N/A

Other

I'll have a PR shortly to fix this issue.

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 1, 2020
@phyber
Copy link
Contributor Author

phyber commented Jan 3, 2020

I have submitted a pull request to solve this issue. (Just leaving this comment since the community note says to do so, PR already linked against issue).

@bflad bflad added bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 3, 2020
@bflad bflad added this to the v2.44.0 milestone Jan 3, 2020
@bflad
Copy link
Contributor

bflad commented Jan 3, 2020

The fix for this (including the aws_arn data source and other places where use validateArn for attribute validation) has been merged and will release with version 2.44.0 of the Terraform AWS Provider, next Thursday. Thanks @phyber for the implementation. 👍

@ghost
Copy link

ghost commented Jan 10, 2020

This has been released in version 2.44.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Mar 27, 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 Mar 27, 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants