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

Add arn as an attribute for aws_vpc #5027

Closed
tdmalone opened this issue Jun 29, 2018 · 4 comments · Fixed by #5300
Closed

Add arn as an attribute for aws_vpc #5027

tdmalone opened this issue Jun 29, 2018 · 4 comments · Fixed by #5300
Labels
enhancement Requests to existing resources that expand the functionality or scope. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@tdmalone
Copy link
Contributor

tdmalone commented Jun 29, 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)

Terraform Configuration Files

# Ideal.
output "services_arn" {
  value = "${aws_vpc.services.arn}"
}

# Current workaround.
output "services_arn" {
  value = "arn:aws:ec2:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:vpc/${aws_vpc.services.id}"
}

Expected Behavior

Expected (or hoped) there would be an ARN attribute exported for the VPC ;)

Actual Behavior

Error: Error running plan: 1 error(s) occurred:

* output.services_arn: Resource 'aws_vpc.services' does not have attribute 'arn' for variable 'aws_vpc.services.arn'

Important Factoids

As a use case scenario, the VPC ARN is needed when using IAM policy conditions ec2:Vpc, ec2:AccepterVpc, and ec2:RequesterVpc, as seen in the table here.

Also, similar to #5028.

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/ec2 Issues and PRs that pertain to the ec2 service. labels Jun 29, 2018
@MattMcNam
Copy link
Contributor

Interested in working on this in the next day or so

@bflad
Copy link
Contributor

bflad commented Jul 23, 2018

The arn attribute has been added to the aws_vpc resource, aws_default_vpc resource, and aws_vpc datasource via #5300 and will release with version 1.29.0 of the AWS provider, likely middle of this week. 👍

@bflad
Copy link
Contributor

bflad commented Jul 26, 2018

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

@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
enhancement Requests to existing resources that expand the functionality or scope. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants