-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Feature Request: Data source to parse an ARN #3995
Comments
Can you explain the use case? |
It's a convenient way to get to the account ID and region of any resource. I find myself using this from time to time, for example when constructing an IAM policy document: foo_arn = "arn:aws:xxx::${element(split(":", data.aws_yyy.zzz.arn), 4)}:foo/bar" It would help readability if I could use something akin to data "aws_arn" "xxx" {
arn = "${data.aws_yyy.zzz.arn}"
}
resource "aws_abc" "abc" {
foo_arn = "arn:aws:xxx::${data.aws_arn.xxx.account_id}:foo/bar"
} |
Yes, my specific use case is some prototype work around the Resource Groups Tagging |
This will be released later this week in v1.19.0 of the AWS provider. |
This has been released in version 1.19.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Add a data source to parse an ARN into its constituent parts.
The text was updated successfully, but these errors were encountered: