AWS App Mesh Mesh

This page shows how to write Terraform and CloudFormation for App Mesh Mesh and write them securely.

aws_appmesh_mesh (Terraform)

The Mesh in App Mesh can be configured in Terraform with the resource name aws_appmesh_mesh. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L1
resource "aws_appmesh_mesh" "appmesh" {
  tags = var.context.tags

  name = var.name
  spec {
    egress_filter {
main.tf#L1
resource "aws_appmesh_mesh" "appmesh" {
  tags = var.context.tags

  name = var.name
  spec {
    egress_filter {
mesh.tf#L1
resource "aws_appmesh_mesh" "mesh" {
  name = format("%s-mesh", var.cluster_name)

  spec {
    egress_filter {
      type = "ALLOW_ALL"
mesh.tf#L1
resource "aws_appmesh_mesh" "pr-preview-mesh" {
  name = "pr-preview-mesh"

  spec {
    egress_filter {
      type = "ALLOW_ALL"
main.tf#L1
resource "aws_appmesh_mesh" "template" {
  name = var.name

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 service mesh resource.

AWS::AppMesh::Mesh (CloudFormation)

The Mesh in AppMesh can be configured in CloudFormation with the resource name AWS::AppMesh::Mesh. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

mystore-mesh.yml#L6
    Type: AWS::AppMesh::Mesh
    Properties:
      MeshName: mystore-mesh
      Spec:
        EgressFilter:
          Type: DROP_ALL
mesh.yml#L6
    Type: "AWS::AppMesh::Mesh"
    Properties:
      MeshName: "appmesh-workshop"
  CrystalVirtualNode:
    Type: "AWS::AppMesh::VirtualNode"
    Properties:
demo-appmesh.yml#L20
    Type: AWS::AppMesh::Mesh
    Properties:
      MeshName: !Ref AppMeshMeshName

  ColorTellerGreenVirtualNode:
    DependsOn: Mesh
mesh.yaml#L8
    Type: AWS::AppMesh::Mesh
    Properties:
      MeshName: !Sub '${ProjectName}-mesh'

  EchoClientNode:
    Type: AWS::AppMesh::VirtualNode
mesh.yaml#L8
    Type: AWS::AppMesh::Mesh
    Properties:
      MeshName: !Sub '${ProjectName}-mesh'

  ColorClientNode:
    Type: AWS::AppMesh::VirtualNode
integ.mesh.expected.json#L463
      "Type": "AWS::AppMesh::Mesh",
      "Properties": {
        "MeshName": "meshstackmesh680D3CEB",
        "Spec": {}
      }
    },
integ.mesh.expected.json#L463
      "Type": "AWS::AppMesh::Mesh",
      "Properties": {
        "MeshName": "meshstackmesh680D3CEB",
        "Spec": {}
      }
    },
integ.mesh.expected.json#L463
      "Type": "AWS::AppMesh::Mesh",
      "Properties": {
        "MeshName": "meshstackmesh680D3CEB",
        "Spec": {}
      }
    },
integ.mesh.expected.json#L463
      "Type": "AWS::AppMesh::Mesh",
      "Properties": {
        "MeshName": "meshstackmesh680D3CEB",
        "Spec": {}
      }
    },
colorteller-app-mesh.template.json#L4
      "Type": "AWS::AppMesh::Mesh",
      "Properties": {
        "MeshName": "ColorTellerAppMesh",
        "Spec": {
          "EgressFilter": {
            "Type": "ALLOW_ALL"

Parameters

Explanation in CloudFormation Registry

Creates a service mesh. A service mesh is a logical boundary for network traffic between services that are represented by resources within the mesh. After you create your service mesh, you can create virtual services, virtual nodes, virtual routers, and routes to distribute traffic between the applications in your mesh.

For more information about service meshes, see Service meshes.

Frequently asked questions

What is AWS App Mesh Mesh?

AWS App Mesh Mesh 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 Mesh?

For Terraform, the nhsd-exeter/dos-integration, mi-devops-task/ci-cd-aws_code_pipeline and longhanhee/ecs-microservices-orchestration source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the Dazza65/mystore, aws/aws-app-mesh-examples and terra10/codefest_ecsfargate source code examples are useful. See the CloudFormation Example section for further details.