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

Expose resource ARN for AWS API Gateway Stage #9071

Closed
chendilv opened this issue Jun 20, 2019 · 6 comments · Fixed by #10570
Closed

Expose resource ARN for AWS API Gateway Stage #9071

chendilv opened this issue Jun 20, 2019 · 6 comments · Fixed by #10570
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/apigateway Issues and PRs that pertain to the apigateway service.
Milestone

Comments

@chendilv
Copy link

Current Terraform Version

Terraform v0.12.2

Use-cases

A WAF WebACL can be associated with an API Gateway Stage. This is supported by terraform already : https://www.terraform.io/docs/providers/aws/r/wafregional_web_acl_association.html
However, terraform does not provide a way to access the resource arn for a API Gateway Stage : https://www.terraform.io/docs/providers/aws/r/api_gateway_stage.html

(The execution Arn is something different - the API Gateway Stage Arn will have the format arn:aws:apigateway:{region}::/restapis/{api_id}/stages/{stage_name})

So there is no (clean) way to provide a API Gateway stage resource arn to a WebACL association.

Attempted Solutions

Proposal

Add an attribute called 'arn' to aws_api_gateway_stage that exposes the resource arn of the API Gateway stage.

References

Closest related GitHub issue : #6441

Related Terraform docs :
https://www.terraform.io/docs/providers/aws/r/wafregional_web_acl_association.html
https://www.terraform.io/docs/providers/aws/r/api_gateway_stage.html

@chendilv chendilv added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 20, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 20, 2019
@aeschright aeschright added the service/apigateway Issues and PRs that pertain to the apigateway service. label Jul 3, 2019
@CumpsD
Copy link

CumpsD commented Sep 17, 2019

This would make it a lot easier indeed. I just stumbled on this in trying to figure out how to build the stage arn for WAF

@idledk
Copy link

idledk commented Nov 7, 2019

We really need this. It makes much easier when applying a WAF to an API gateway, not having to generate the ARN for the API

@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Nov 7, 2019
@bflad
Copy link
Contributor

bflad commented Nov 7, 2019

The arn attribute will be added as part of #10570

@bflad
Copy link
Contributor

bflad commented Nov 8, 2019

Support for the arn attribute has been merged and will release with version 2.36.0 of the Terraform AWS Provider, Thursday next week. Thanks to @DrFaust92 for the implementation. 👍

@ghost
Copy link

ghost commented Nov 14, 2019

This has been released in version 2.36.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 Dec 9, 2019

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 Dec 9, 2019
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. service/apigateway Issues and PRs that pertain to the apigateway service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants