AWS App Mesh Route
This page shows how to write Terraform and CloudFormation for App Mesh Route and write them securely.
aws_appmesh_route (Terraform)
The Route in App Mesh can be configured in Terraform with the resource name aws_appmesh_route
. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_appmesh_route" "blue" {
name = "service-route-blue"
mesh_name = aws_appmesh_mesh.mesh.id
virtual_router_name = aws_appmesh_virtual_router.this.name
spec {
resource "aws_appmesh_route" "service-b-route" {
name = "service-b-route"
mesh_name = aws_appmesh_mesh.fully-connected-mesh.name
virtual_router_name = aws_appmesh_virtual_router.service-b-router.name
spec {
resource "aws_appmesh_route" "template" {
name = var.name
mesh_name = var.mesh_name
virtual_router_name = var.virtual_router_name
spec {
resource "aws_appmesh_route" "template" {
name = var.name
mesh_name = var.mesh_name
virtual_router_name = var.virtual_router_name
spec {
resource "aws_appmesh_route" "route" {
count = length(var.route)
mesh_name = element(var.mesh_name, lookup(var.route[count.index], "mesh_id"))
name = lookup(var.route[count.index], "name")
virtual_router_name = element(var.virtual_router_name, lookup(var.route[count.index], "virtual_router_id"))
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_router_name
required - string -
spec
list block-
priority
optional - number -
grpc_route
list block-
action
list block-
weighted_target
set block-
virtual_node
required - string -
weight
required - number
-
-
-
match
list block-
method_name
optional - string -
prefix
optional - string -
service_name
optional - string -
metadata
set block
-
-
retry_policy
list block-
grpc_retry_events
optional - set of string -
http_retry_events
optional - set of string -
max_retries
required - number -
tcp_retry_events
optional - set of string -
per_retry_timeout
list block
-
-
timeout
list block
-
-
http2_route
list block-
action
list block-
weighted_target
set block-
virtual_node
required - string -
weight
required - number
-
-
-
match
list block -
retry_policy
list block-
http_retry_events
optional - set of string -
max_retries
required - number -
tcp_retry_events
optional - set of string -
per_retry_timeout
list block
-
-
timeout
list block
-
-
http_route
list block-
action
list block-
weighted_target
set block-
virtual_node
required - string -
weight
required - number
-
-
-
match
list block -
retry_policy
list block-
http_retry_events
optional - set of string -
max_retries
required - number -
tcp_retry_events
optional - set of string -
per_retry_timeout
list block
-
-
timeout
list block
-
-
tcp_route
list block-
action
list block-
weighted_target
set block-
virtual_node
required - string -
weight
required - number
-
-
-
timeout
list block
-
-
Explanation in Terraform Registry
Provides an AWS App Mesh route resource.
AWS::AppMesh::Route (CloudFormation)
The Route in AppMesh can be configured in CloudFormation with the resource name AWS::AppMesh::Route
. 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 -
VirtualRouterName
required - String -
MeshOwner
optional - String -
RouteName
optional - String -
Spec
required - RouteSpec -
Tags
optional - List of Tag
Explanation in CloudFormation Registry
Creates a route that is associated with a virtual router. You can route several different protocols and define a retry policy for a route. Traffic can be routed to one or more virtual nodes.
For more information about routes, see Routes.
Frequently asked questions
What is AWS App Mesh Route?
AWS App Mesh 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 Route?
For Terraform, the inhumantsar/ecs-terraform-demo, akestner/fully-connected-mesh and Yoyo-Kikuchi/aws-app-mesh-example source code examples are useful. See the Terraform Example section for further details.