Skip to content

Commit

Permalink
Moved RequiredWith from wrong attribute on an appmesh route (#29217)
Browse files Browse the repository at this point in the history
* Moved RequiredWith from AppMesh match service_name to method_name

* Moved RequiredWith from appmesh route spec.0.grpc_route.0.match.0.service_name to
spec.0.grpc_route.0.match.0.method_name

* chore: changelog

---------

Co-authored-by: Jared Baker <[email protected]>
  • Loading branch information
bjernie and jar-b authored Feb 10, 2023
1 parent db3be8d commit 5848ccf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changelog/29217.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_appmesh_route: Fix RequiredWith setting for `spec.0.grpc_route.0.match.0.method_name` attribute
```
10 changes: 5 additions & 5 deletions internal/service/appmesh/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ func ResourceRoute() *schema.Resource {
},

"method_name": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
RequiredWith: []string{"spec.0.grpc_route.0.match.0.service_name"},
},

"prefix": {
Expand All @@ -210,9 +211,8 @@ func ResourceRoute() *schema.Resource {
},

"service_name": {
Type: schema.TypeString,
Optional: true,
RequiredWith: []string{"spec.0.grpc_route.0.match.0.method_name"},
Type: schema.TypeString,
Optional: true,
},

"port": {
Expand Down

0 comments on commit 5848ccf

Please sign in to comment.