diff --git a/.changelog/29217.txt b/.changelog/29217.txt new file mode 100644 index 000000000000..d0b4ae722867 --- /dev/null +++ b/.changelog/29217.txt @@ -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 +``` diff --git a/internal/service/appmesh/route.go b/internal/service/appmesh/route.go index e2a8f18ace2b..36df02063025 100644 --- a/internal/service/appmesh/route.go +++ b/internal/service/appmesh/route.go @@ -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": { @@ -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": {