chalice
chalice copied to clipboard
Use api_gateway_stage for managing APIGW stages with Terraform instead of api_gateway_deployment stage_name
Attempting to enhance some of the features/functionality of Chalice with Terraform during our deploys, but we're limited because Chalice does not expose the API Gateway stage (ie. for associating a WAF ACL with APIGW stage)
The AWS provider for Terraform has been updated and also no longer recommends using stage_name
in api_gateway_deployment
to manage API Gateway stages as Chalice does today.
Came up with a workaround for now by wrapping the chalice.tf.json with some additional Terraform that can grab the stage-name and generate an ARN for the APIGW stage ie.
"${aws_api_gateway_rest_api.rest_api.arn}/stages/${aws_api_gateway_deployment.rest_api.stage_name}"