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

virtualg_gateway.tf#L81
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 {
aws_appmesh_gateway_route__howto-k8s-ingress-gateway__ingress-gw_howto-k8s-ingress-gateway__gateway-route-paths_howto-k8s-ingress-gateway.tf#L3
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"
aws_appmesh_gateway_route__howto-k8s-ingress-gateway__ingress-gw_howto-k8s-ingress-gateway__gateway-route-headers_howto-k8s-ingress-gateway.tf#L3
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"

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

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

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.