Closed chendilv closed 4 years ago
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
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
The arn
attribute will be added as part of #10570
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. 👍
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!
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!
Current Terraform Version
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 : https://github.com/terraform-providers/terraform-provider-aws/issues/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