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

aws_api_gateway_stage outputs invoke_url and execution_arn #3469

Merged
merged 5 commits into from
Apr 24, 2018

Conversation

saxonww
Copy link

@saxonww saxonww commented Feb 21, 2018

Attempts to address #3468.

@ghost ghost added size/S Managed by automation to categorize the size of a PR. size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Feb 21, 2018
@saxonww saxonww changed the title aws_api_gateway_stage outputs invoke_url aws_api_gateway_stage outputs invoke_url and execution_arn Feb 21, 2018
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/apigateway Issues and PRs that pertain to the apigateway service. labels Feb 21, 2018
Copy link
Contributor

@bflad bflad left a 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)
Copy link
Contributor

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?

@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Apr 20, 2018
Will Saxon added 5 commits April 22, 2018 00:52
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.
@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Apr 22, 2018
@saxonww
Copy link
Author

saxonww commented Apr 22, 2018

Sure thing. Do these new commits address your concerns?

Copy link
Contributor

@bflad bflad left a 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)

@bflad bflad merged commit 6f2efba into hashicorp:master Apr 24, 2018
@bflad bflad added this to the v1.16.0 milestone Apr 24, 2018
@bflad bflad removed the waiting-response Maintainers are waiting on response from community or contributor. label Apr 24, 2018
bflad added a commit that referenced this pull request Apr 24, 2018
@bflad
Copy link
Contributor

bflad commented Apr 25, 2018

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.

@ghost
Copy link

ghost commented Apr 6, 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 6, 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. service/apigateway Issues and PRs that pertain to the apigateway service. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants