AWS App Mesh Virtual Service

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

aws_appmesh_virtual_service (Terraform)

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

Example Usage from GitHub

appmesh.tf#L45
resource "aws_appmesh_virtual_service" "envoy-proxy" {
  count     = var.enable_appmesh ? 1 : 0
  name      = "envoy.roxprox.local"
  mesh_name = var.appmesh_name

  spec {
app-mesh.tf#L96
resource "aws_appmesh_virtual_service" "frontend-v1" {
  name      = "frontend-v1.terraform.local"
  mesh_name = aws_appmesh_mesh.terraform.id

  spec {
    provider {
virtual_services.tf#L1
resource "aws_appmesh_virtual_service" "service" {

    name      = format("%s.%s.mesh", var.service_name, var.cluster_name)
    mesh_name = var.cluster_mesh

    spec {
virtual_services.tf#L1
resource "aws_appmesh_virtual_service" "service" {

    name      = format("%s.%s.mesh", var.service_name, var.cluster_name)
    mesh_name = var.cluster_mesh

    spec {

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

AWS::AppMesh::VirtualService (CloudFormation)

The VirtualService in AppMesh can be configured in CloudFormation with the resource name AWS::AppMesh::VirtualService. 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 virtual service within a service mesh.

A virtual service is an abstraction of a real service that is provided by a virtual node directly or indirectly by means of a virtual router. Dependent services call your virtual service by its virtualServiceName, and those requests are routed to the virtual node or virtual router that is specified as the provider for the virtual service.

For more information about virtual services, see Virtual services.

Frequently asked questions

What is AWS App Mesh Virtual Service?

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

For Terraform, the in4it/roxprox, akestner/terraform-app-mesh and longhanhee/ecs-microservices-orchestration source code examples are useful. See the Terraform Example section for further details.