-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
New resource: aws_apigatewayv2_route #8881
New resource: aws_apigatewayv2_route #8881
Conversation
f5f1093
to
7b58039
Compare
Acceptance tests so far: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGateway2Route_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAWSAPIGateway2Route_ -timeout 120m
=== RUN TestAccAWSAPIGateway2Route_basic
=== PAUSE TestAccAWSAPIGateway2Route_basic
=== RUN TestAccAWSAPIGateway2Route_update
=== PAUSE TestAccAWSAPIGateway2Route_update
=== CONT TestAccAWSAPIGateway2Route_basic
=== CONT TestAccAWSAPIGateway2Route_update
--- PASS: TestAccAWSAPIGateway2Route_basic (25.74s)
--- PASS: TestAccAWSAPIGateway2Route_update (65.13s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 65.224s Testing additional attributes requires additional resources for authorizers, models and integrations. |
836235b
to
6832550
Compare
Rebased to track #8842 (comment). |
6832550
to
a228787
Compare
Includes
Will need to rebase as these are merged. |
ac0ec49
to
1468489
Compare
Rebased to fix merge conflict. $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGateway2Route_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAWSAPIGateway2Route_ -timeout 120m
=== RUN TestAccAWSAPIGateway2Route_basic
=== PAUSE TestAccAWSAPIGateway2Route_basic
=== RUN TestAccAWSAPIGateway2Route_Authorizer
=== PAUSE TestAccAWSAPIGateway2Route_Authorizer
=== RUN TestAccAWSAPIGateway2Route_Model
=== PAUSE TestAccAWSAPIGateway2Route_Model
=== RUN TestAccAWSAPIGateway2Route_SimpleAttributes
=== PAUSE TestAccAWSAPIGateway2Route_SimpleAttributes
=== RUN TestAccAWSAPIGateway2Route_Target
=== PAUSE TestAccAWSAPIGateway2Route_Target
=== CONT TestAccAWSAPIGateway2Route_basic
=== CONT TestAccAWSAPIGateway2Route_Target
=== CONT TestAccAWSAPIGateway2Route_SimpleAttributes
=== CONT TestAccAWSAPIGateway2Route_Model
=== CONT TestAccAWSAPIGateway2Route_Authorizer
--- PASS: TestAccAWSAPIGateway2Route_Target (23.34s)
--- PASS: TestAccAWSAPIGateway2Route_basic (23.52s)
--- PASS: TestAccAWSAPIGateway2Route_Model (39.58s)
--- PASS: TestAccAWSAPIGateway2Route_SimpleAttributes (48.75s)
--- PASS: TestAccAWSAPIGateway2Route_Authorizer (58.86s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 58.882s |
Re-ran acceptance tests: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGateway2Route_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAWSAPIGateway2Route_ -timeout 120m
=== RUN TestAccAWSAPIGateway2Route_basic
=== PAUSE TestAccAWSAPIGateway2Route_basic
=== RUN TestAccAWSAPIGateway2Route_Authorizer
=== PAUSE TestAccAWSAPIGateway2Route_Authorizer
=== RUN TestAccAWSAPIGateway2Route_Model
=== PAUSE TestAccAWSAPIGateway2Route_Model
=== RUN TestAccAWSAPIGateway2Route_SimpleAttributes
=== PAUSE TestAccAWSAPIGateway2Route_SimpleAttributes
=== RUN TestAccAWSAPIGateway2Route_Target
=== PAUSE TestAccAWSAPIGateway2Route_Target
=== CONT TestAccAWSAPIGateway2Route_basic
=== CONT TestAccAWSAPIGateway2Route_Target
=== CONT TestAccAWSAPIGateway2Route_SimpleAttributes
=== CONT TestAccAWSAPIGateway2Route_Model
=== CONT TestAccAWSAPIGateway2Route_Authorizer
--- PASS: TestAccAWSAPIGateway2Route_Target (23.40s)
--- PASS: TestAccAWSAPIGateway2Route_Model (29.59s)
--- PASS: TestAccAWSAPIGateway2Route_basic (31.16s)
--- PASS: TestAccAWSAPIGateway2Route_SimpleAttributes (57.02s)
--- PASS: TestAccAWSAPIGateway2Route_Authorizer (57.93s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 57.949s |
After merge of #8949, #8912 and #9228, incorporate all the feedback:
|
Acceptance test output: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGatewayV2Route_' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Route_ -timeout 120m === RUN TestAccAWSAPIGatewayV2Route_basic === PAUSE TestAccAWSAPIGatewayV2Route_basic === RUN TestAccAWSAPIGatewayV2Route_disappears === PAUSE TestAccAWSAPIGatewayV2Route_disappears === RUN TestAccAWSAPIGatewayV2Route_Model === PAUSE TestAccAWSAPIGatewayV2Route_Model === RUN TestAccAWSAPIGatewayV2Route_SimpleAttributes === PAUSE TestAccAWSAPIGatewayV2Route_SimpleAttributes === RUN TestAccAWSAPIGatewayV2Route_Target === PAUSE TestAccAWSAPIGatewayV2Route_Target === CONT TestAccAWSAPIGatewayV2Route_basic === CONT TestAccAWSAPIGatewayV2Route_SimpleAttributes === CONT TestAccAWSAPIGatewayV2Route_Model === CONT TestAccAWSAPIGatewayV2Route_Target === CONT TestAccAWSAPIGatewayV2Route_disappears --- PASS: TestAccAWSAPIGatewayV2Route_disappears (23.60s) --- PASS: TestAccAWSAPIGatewayV2Route_basic (26.45s) --- PASS: TestAccAWSAPIGatewayV2Route_Target (28.53s) --- PASS: TestAccAWSAPIGatewayV2Route_Model (29.18s) --- PASS: TestAccAWSAPIGatewayV2Route_SimpleAttributes (58.48s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 58.539s
6a80c6c
to
8aa0e7c
Compare
Renamed resource to $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGatewayV2Route_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Route_ -timeout 120m
=== RUN TestAccAWSAPIGatewayV2Route_basic
=== PAUSE TestAccAWSAPIGatewayV2Route_basic
=== RUN TestAccAWSAPIGatewayV2Route_disappears
=== PAUSE TestAccAWSAPIGatewayV2Route_disappears
=== RUN TestAccAWSAPIGatewayV2Route_Authorizer
=== PAUSE TestAccAWSAPIGatewayV2Route_Authorizer
=== RUN TestAccAWSAPIGatewayV2Route_JwtAuthorization
=== PAUSE TestAccAWSAPIGatewayV2Route_JwtAuthorization
=== RUN TestAccAWSAPIGatewayV2Route_Model
=== PAUSE TestAccAWSAPIGatewayV2Route_Model
=== RUN TestAccAWSAPIGatewayV2Route_SimpleAttributes
=== PAUSE TestAccAWSAPIGatewayV2Route_SimpleAttributes
=== RUN TestAccAWSAPIGatewayV2Route_Target
=== PAUSE TestAccAWSAPIGatewayV2Route_Target
=== CONT TestAccAWSAPIGatewayV2Route_basic
=== CONT TestAccAWSAPIGatewayV2Route_Model
=== CONT TestAccAWSAPIGatewayV2Route_Target
=== CONT TestAccAWSAPIGatewayV2Route_JwtAuthorization
=== CONT TestAccAWSAPIGatewayV2Route_Authorizer
=== CONT TestAccAWSAPIGatewayV2Route_SimpleAttributes
=== CONT TestAccAWSAPIGatewayV2Route_disappears
--- PASS: TestAccAWSAPIGatewayV2Route_disappears (23.66s)
--- PASS: TestAccAWSAPIGatewayV2Route_basic (27.63s)
--- PASS: TestAccAWSAPIGatewayV2Route_Model (29.72s)
--- PASS: TestAccAWSAPIGatewayV2Route_Target (29.80s)
--- PASS: TestAccAWSAPIGatewayV2Route_SimpleAttributes (59.29s)
--- PASS: TestAccAWSAPIGatewayV2Route_JwtAuthorization (67.32s)
--- PASS: TestAccAWSAPIGatewayV2Route_Authorizer (76.36s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 76.442s |
8aa0e7c
to
4ba6eba
Compare
This is now ready for review. |
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.
One comment on the documentation, but otherwise, LGTM 🚀
--- PASS: TestAccAWSAPIGatewayV2Route_disappears (9.94s)
--- PASS: TestAccAWSAPIGatewayV2Route_basic (10.62s)
--- PASS: TestAccAWSAPIGatewayV2Route_Target (11.13s)
--- PASS: TestAccAWSAPIGatewayV2Route_Model (18.21s)
--- PASS: TestAccAWSAPIGatewayV2Route_SimpleAttributes (20.87s)
--- PASS: TestAccAWSAPIGatewayV2Route_JwtAuthorization (22.82s)
--- PASS: TestAccAWSAPIGatewayV2Route_Authorizer (42.87s)
return fmt.Errorf("Not Found: %s", integrationResourceName) | ||
} | ||
|
||
return resource.TestCheckResourceAttr(resourceName, "target", fmt.Sprintf("integrations/%s", rs.Primary.ID))(s) |
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.
I like how you implemented this to get the specific value
|
||
## Import | ||
|
||
`aws_apigatewayv2_route` can be imported by using the API identifier and route identifier, e.g. |
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.
Since routes managed by API Gateway cannot be imported, please add a note in this section indicating that.
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.
Done. Added the same for the aws_apigatewayv2_integration
resource.
…resources created as part of API quick create.
This has been released in version 2.58.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! |
Community Note
Another resource for #7004.
Release note for CHANGELOG:
Output from acceptance testing:
Currently based on #8842, will need to rebase once that PR is merged.