AWS App Mesh Gateway Route
This page shows how to write Terraform and CloudFormation for App Mesh Gateway Route and write them securely.
aws_appmesh_gateway_route (Terraform)
The Gateway Route in App Mesh can be configured in Terraform with the resource name aws_appmesh_gateway_route
. The following sections describe 3 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_appmesh_gateway_route" "route" {
name = "test-gateway-route"
virtual_gateway_name = aws_appmesh_virtual_gateway.vgateway.name
mesh_name = aws_appmesh_mesh.main.name
spec {
http_route {
resource "aws_appmesh_gateway_route" "howto-k8s-ingress-gateway__ingress-gw_howto-k8s-ingress-gateway__gateway-route-paths_howto-k8s-ingress-gateway" {
mesh_name = "howto-k8s-ingress-gateway"
mesh_owner = data.aws_caller_identity.current.account_id
name = "gateway-route-paths_howto-k8s-ingress-gateway"
tags = {}
virtual_gateway_name = "ingress-gw_howto-k8s-ingress-gateway"
resource "aws_appmesh_gateway_route" "howto-k8s-ingress-gateway__ingress-gw_howto-k8s-ingress-gateway__gateway-route-headers_howto-k8s-ingress-gateway" {
mesh_name = "howto-k8s-ingress-gateway"
mesh_owner = data.aws_caller_identity.current.account_id
name = "gateway-route-headers_howto-k8s-ingress-gateway"
tags = {}
virtual_gateway_name = "ingress-gw_howto-k8s-ingress-gateway"
Parameters
-
arn
optional computed - string -
created_date
optional computed - string -
id
optional computed - string -
last_updated_date
optional computed - string -
mesh_name
required - string -
mesh_owner
optional computed - string -
name
required - string -
resource_owner
optional computed - string -
tags
optional - map from string to string -
virtual_gateway_name
required - string -
spec
list block-
grpc_route
list block-
action
list block-
target
list block-
virtual_service
list block-
virtual_service_name
required - string
-
-
-
-
match
list block-
service_name
required - string
-
-
-
http2_route
list block-
action
list block-
target
list block-
virtual_service
list block-
virtual_service_name
required - string
-
-
-
-
match
list block-
prefix
required - string
-
-
-
http_route
list block-
action
list block-
target
list block-
virtual_service
list block-
virtual_service_name
required - string
-
-
-
-
match
list block-
prefix
required - string
-
-
-
Explanation in Terraform Registry
Provides an AWS App Mesh gateway route resource.
AWS::AppMesh::GatewayRoute (CloudFormation)
The GatewayRoute in AppMesh can be configured in CloudFormation with the resource name AWS::AppMesh::GatewayRoute
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
MeshName
required - String -
VirtualGatewayName
required - String -
MeshOwner
optional - String -
GatewayRouteName
optional - String -
Spec
required - GatewayRouteSpec -
Tags
optional - List of Tag
Explanation in CloudFormation Registry
Creates a gateway route.
A gateway route is attached to a virtual gateway and routes traffic to an existing virtual service. If a route matches a request, it can distribute traffic to a target virtual service.
For more information about gateway routes, see Gateway routes.
Frequently asked questions
What is AWS App Mesh Gateway Route?
AWS App Mesh Gateway Route is a resource for App Mesh of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS App Mesh Gateway Route?
For Terraform, the g31s/terraform-aws-ecs-fargate, awsandy/Terraform-EKS-Code and awsandy/Terraform-EKS-Code source code examples are useful. See the Terraform Example section for further details.