-
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
aws_api_gateway_stage outputs invoke_url and execution_arn #3469
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you see the below as well as add acceptance testing that covers the two new attributes please?
e.g. in the first test step of TestAccAWSAPIGatewayStage_basic
resource.TestCheckResourceAttrSet("aws_api_gateway_stage.test", "execution_arn"),
resource.TestCheckResourceAttrSet("aws_api_gateway_stage.test", "invoke_url"),
d.Set("invoke_url", buildApiGatewayInvokeURL(restApiId, region, stageName)) | ||
|
||
accountId := meta.(*AWSClient).accountid | ||
arn, err := buildApiGatewayExecutionARN(restApiId, region, accountId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function no longer exists as we moved to prefer building the ARNs via the SDK arn
package. e.g. in deployments its now:
executionArn := arn.ARN{
Partition: meta.(*AWSClient).partition,
Service: "execute-api",
Region: meta.(*AWSClient).region,
AccountID: meta.(*AWSClient).accountid,
Resource: fmt.Sprintf("%s/%s", restApiId, stageName),
}.String()
d.Set("execution_arn", executionArn)
Can you please do the same here?
Attempts to address hashicorp#3468.
It looks like this is another stage-specific output value from aws_api_gateway_deployment, so also export it.
Change the api_gateway_stage resource documentation to note the exported id, execution_arn, and invoke_url attributes.
Sure thing. Do these new commits address your concerns? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great -- thanks @saxonww! 🚀
1 test passed (all tests)
=== RUN TestAccAWSAPIGatewayStage_basic
--- PASS: TestAccAWSAPIGatewayStage_basic (540.31s)
This has been released in version 1.16.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! |
Attempts to address #3468.