Resource: aws_appmesh_virtual_router

Provides an AWS App Mesh virtual router resource.

Breaking Changes

Because of backward incompatible API changes (read here and here), aws_appmesh_virtual_router resource definitions created with provider versions earlier than v2.3.0 will need to be modified:

The Terraform state associated with existing resources will automatically be migrated.

Example Usage

resource "aws_appmesh_virtual_router" "serviceb" {
  name      = "serviceB"
  mesh_name = aws_appmesh_mesh.simple.id

  spec {
    listener {
      port_mapping {
        port     = 8080
        protocol = "http"
      }
    }
  }
}

Argument Reference

This resource supports the following arguments:

The spec object supports the following:

The listener object supports the following:

The port_mapping object supports the following:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import App Mesh virtual routers using mesh_name together with the virtual router's name. For example:

import {
  to = aws_appmesh_virtual_router.serviceb
  id = "simpleapp/serviceB"
}

Using terraform import, import App Mesh virtual routers using mesh_name together with the virtual router's name. For example:

% terraform import aws_appmesh_virtual_router.serviceb simpleapp/serviceB