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

r/aws_appmesh_route: Allow empty 'match' for 'grpc_route' #16867

Merged

Conversation

ewbankkit
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #16816.

Release note for CHANGELOG:

resource/aws_appmesh_route: Allow an empty `match` attribute to specified for a `grpc_route`, indicating that any service should be matched

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSAppmesh/Route/grpcRoute'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route/grpcRoute -timeout 120m
=== RUN   TestAccAWSAppmesh_serial
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter
=== RUN   TestAccAWSAppmesh_serial/GatewayRoute
=== RUN   TestAccAWSAppmesh_serial/GatewayRoute/grpcRoute
=== RUN   TestAccAWSAppmesh_serial/Route
=== RUN   TestAccAWSAppmesh_serial/Route/grpcRoute
=== RUN   TestAccAWSAppmesh_serial/Route/grpcRouteEmptyMatch
=== RUN   TestAccAWSAppmesh_serial/Route/grpcRouteTimeout
--- PASS: TestAccAWSAppmesh_serial (131.91s)
    --- PASS: TestAccAWSAppmesh_serial/VirtualRouter (0.00s)
    --- PASS: TestAccAWSAppmesh_serial/GatewayRoute (32.18s)
        --- PASS: TestAccAWSAppmesh_serial/GatewayRoute/grpcRoute (32.18s)
    --- PASS: TestAccAWSAppmesh_serial/Route (99.73s)
        --- PASS: TestAccAWSAppmesh_serial/Route/grpcRoute (47.54s)
        --- PASS: TestAccAWSAppmesh_serial/Route/grpcRouteEmptyMatch (18.53s)
        --- PASS: TestAccAWSAppmesh_serial/Route/grpcRouteTimeout (33.66s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	132.036s

Acceptance test output:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSAppmesh/Route/grpcRoute'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route/grpcRoute -timeout 120m
=== RUN   TestAccAWSAppmesh_serial
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter
=== RUN   TestAccAWSAppmesh_serial/GatewayRoute
=== RUN   TestAccAWSAppmesh_serial/GatewayRoute/grpcRoute
=== RUN   TestAccAWSAppmesh_serial/Route
=== RUN   TestAccAWSAppmesh_serial/Route/grpcRoute
=== RUN   TestAccAWSAppmesh_serial/Route/grpcRouteEmptyMatch
=== RUN   TestAccAWSAppmesh_serial/Route/grpcRouteTimeout
--- PASS: TestAccAWSAppmesh_serial (131.91s)
    --- PASS: TestAccAWSAppmesh_serial/VirtualRouter (0.00s)
    --- PASS: TestAccAWSAppmesh_serial/GatewayRoute (32.18s)
        --- PASS: TestAccAWSAppmesh_serial/GatewayRoute/grpcRoute (32.18s)
    --- PASS: TestAccAWSAppmesh_serial/Route (99.73s)
        --- PASS: TestAccAWSAppmesh_serial/Route/grpcRoute (47.54s)
        --- PASS: TestAccAWSAppmesh_serial/Route/grpcRouteEmptyMatch (18.53s)
        --- PASS: TestAccAWSAppmesh_serial/Route/grpcRouteTimeout (33.66s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	132.036s
@ewbankkit ewbankkit requested a review from a team as a code owner December 21, 2020 23:11
@ghost ghost added size/L Managed by automation to categorize the size of a PR. service/appmesh Issues and PRs that pertain to the appmesh service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 21, 2020
Optional: true,
Type: schema.TypeString,
Optional: true,
RequiredWith: []string{"spec.0.grpc_route.0.match.0.method_name"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the API reference:

The method name to match from the request. If you specify a name, you must also specify a serviceName.

Copy link
Collaborator

@DrFaust92 DrFaust92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--- PASS: TestAccAWSAppmesh_serial (339.38s)
    --- PASS: TestAccAWSAppmesh_serial/Route (258.43s)
        --- PASS: TestAccAWSAppmesh_serial/Route/grpcRouteEmptyMatch (50.15s)
        --- PASS: TestAccAWSAppmesh_serial/Route/grpcRouteTimeout (81.05s)
        --- PASS: TestAccAWSAppmesh_serial/Route/grpcRoute (127.23s)
    --- PASS: TestAccAWSAppmesh_serial/VirtualRouter (0.00s)
    --- PASS: TestAccAWSAppmesh_serial/GatewayRoute (80.95s)
        --- PASS: TestAccAWSAppmesh_serial/GatewayRoute/grpcRoute (80.95s)
PASS

@DrFaust92 DrFaust92 removed their assignment Jan 13, 2021
@breathingdust
Copy link
Member

LGTM 🚀 Thanks @ewbankkit!

Verified Acceptance Tests in Commercial (us-west-2)

make testacc TEST=./aws TESTARGS='-run=TestAccAWSAppmesh/Route/grpcRoute'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route/grpcRoute -timeout 120m
=== RUN   TestAccAWSAppmesh_serial
=== RUN   TestAccAWSAppmesh_serial/Route
=== RUN   TestAccAWSAppmesh_serial/Route/grpcRoute
=== RUN   TestAccAWSAppmesh_serial/Route/grpcRouteTimeout
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter
=== RUN   TestAccAWSAppmesh_serial/GatewayRoute
=== RUN   TestAccAWSAppmesh_serial/GatewayRoute/grpcRoute
--- PASS: TestAccAWSAppmesh_serial (89.07s)
    --- PASS: TestAccAWSAppmesh_serial/Route (62.28s)
        --- PASS: TestAccAWSAppmesh_serial/Route/grpcRoute (37.60s)
        --- PASS: TestAccAWSAppmesh_serial/Route/grpcRouteTimeout (24.68s)
    --- PASS: TestAccAWSAppmesh_serial/VirtualRouter (0.00s)
    --- PASS: TestAccAWSAppmesh_serial/GatewayRoute (26.79s)
        --- PASS: TestAccAWSAppmesh_serial/GatewayRoute/grpcRoute (26.79s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	90.959s

@breathingdust breathingdust merged commit ff67ef0 into hashicorp:master Jan 13, 2021
@github-actions github-actions bot added this to the v3.24.0 milestone Jan 13, 2021
breathingdust added a commit that referenced this pull request Jan 13, 2021
@ewbankkit ewbankkit deleted the b-aws_appmesh_route-empty-grpc_route branch January 14, 2021 14:17
@ghost
Copy link

ghost commented Jan 15, 2021

This has been released in version 3.24.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!

@ghost
Copy link

ghost commented Feb 13, 2021

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 as resolved and limited conversation to collaborators Feb 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/appmesh Issues and PRs that pertain to the appmesh service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_appmesh_route grpc_route match shouldn't be required field
3 participants