AWS App Mesh Virtual Node
This page shows how to write Terraform and CloudFormation for App Mesh Virtual Node and write them securely.
aws_appmesh_virtual_node (Terraform)
The Virtual Node in App Mesh can be configured in Terraform with the resource name aws_appmesh_virtual_node. The following sections describe 4 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_appmesh_virtual_node" "blue" {
name = "blue"
mesh_name = aws_appmesh_mesh.mesh.id
spec {
backend {
resource "aws_appmesh_virtual_node" "envoy-proxy" {
count = var.enable_appmesh ? 1 : 0
name = "envoy-proxy"
mesh_name = var.appmesh_name
spec {
resource "aws_appmesh_virtual_node" "node-b-v1" {
mesh_name = aws_appmesh_mesh.fully-connected-mesh.name
name = "node-b-v1"
spec {
listener {
port_mapping {
resource "aws_appmesh_virtual_node" "node-e-v1" {
mesh_name = aws_appmesh_mesh.fully-connected-mesh.name
name = "node-e-v1"
spec {
listener {
port_mapping {
Parameters
-
arnoptional computed - string -
created_dateoptional computed - string -
idoptional computed - string -
last_updated_dateoptional computed - string -
mesh_namerequired - string -
mesh_owneroptional computed - string -
namerequired - string -
resource_owneroptional computed - string -
tagsoptional - map from string to string -
speclist block-
backendset block-
virtual_servicelist block-
virtual_service_namerequired - string -
client_policylist block-
tlslist block-
enforceoptional - bool -
portsoptional - set of number -
certificatelist block-
filelist block-
certificate_chainrequired - string -
private_keyrequired - string
-
-
sdslist block-
secret_namerequired - string
-
-
-
validationlist block-
subject_alternative_nameslist block -
trustlist block-
acmlist block-
certificate_authority_arnsrequired - set of string
-
-
filelist block-
certificate_chainrequired - string
-
-
sdslist block-
secret_namerequired - string
-
-
-
-
-
-
-
-
backend_defaultslist block-
client_policylist block-
tlslist block-
enforceoptional - bool -
portsoptional - set of number -
certificatelist block-
filelist block-
certificate_chainrequired - string -
private_keyrequired - string
-
-
sdslist block-
secret_namerequired - string
-
-
-
validationlist block-
subject_alternative_nameslist block -
trustlist block-
acmlist block-
certificate_authority_arnsrequired - set of string
-
-
filelist block-
certificate_chainrequired - string
-
-
sdslist block-
secret_namerequired - string
-
-
-
-
-
-
-
listenerlist block-
connection_poollist block-
grpclist block-
max_requestsrequired - number
-
-
httplist block-
max_connectionsrequired - number -
max_pending_requestsoptional - number
-
-
http2list block-
max_requestsrequired - number
-
-
tcplist block-
max_connectionsrequired - number
-
-
-
health_checklist block-
healthy_thresholdrequired - number -
interval_millisrequired - number -
pathoptional - string -
portoptional computed - number -
protocolrequired - string -
timeout_millisrequired - number -
unhealthy_thresholdrequired - number
-
-
outlier_detectionlist block-
max_ejection_percentrequired - number -
max_server_errorsrequired - number -
base_ejection_durationlist block -
intervallist block
-
-
port_mappinglist block -
timeoutlist block -
tlslist block-
moderequired - string -
certificatelist block-
acmlist block-
certificate_arnrequired - string
-
-
filelist block-
certificate_chainrequired - string -
private_keyrequired - string
-
-
sdslist block-
secret_namerequired - string
-
-
-
validationlist block-
subject_alternative_nameslist block -
trustlist block-
filelist block-
certificate_chainrequired - string
-
-
sdslist block-
secret_namerequired - string
-
-
-
-
-
-
logginglist block-
access_loglist block
-
-
service_discoverylist block-
aws_cloud_maplist block-
attributesoptional - map from string to string -
namespace_namerequired - string -
service_namerequired - string
-
-
dnslist block-
hostnamerequired - string
-
-
-
Explanation in Terraform Registry
Provides an AWS App Mesh virtual node resource.
AWS::AppMesh::VirtualNode (CloudFormation)
The VirtualNode in AppMesh can be configured in CloudFormation with the resource name AWS::AppMesh::VirtualNode. 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
-
MeshNamerequired - String -
MeshOwneroptional - String -
Specrequired - VirtualNodeSpec -
VirtualNodeNameoptional - String -
Tagsoptional - List of Tag
Explanation in CloudFormation Registry
Creates a virtual node within a service mesh. A virtual node acts as a logical pointer to a particular task group, such as an Amazon ECS service or a Kubernetes deployment. When you create a virtual node, you can specify the service discovery information for your task group, and whether the proxy running in a task group will communicate with other proxies using Transport Layer Security (TLS).
You define a
listenerfor any inbound traffic that your virtual node expects. Any virtual service that your virtual node expects to communicate to is specified as abackend.The response metadata for your new virtual node contains the
arnthat is associated with the virtual node. Set this value to the full ARN; for example,arn:aws:appmesh:us-west-2:123456789012:myMesh/default/virtualNode/myApp) as theAPPMESH_RESOURCE_ARNenvironment variable for your task group's Envoy proxy container in your task definition or pod spec. This is then mapped to thenode.idandnode.clusterEnvoy parameters.Note By default, App Mesh uses the name of the resource you specified in
APPMESH_RESOURCE_ARNwhen Envoy is referring to itself in metrics and traces. You can override this behavior by setting theAPPMESH_RESOURCE_CLUSTERenvironment variable with your own name.For more information about virtual nodes, see Virtual nodes. You must be using
1.15.0or later of the Envoy image when setting these variables. For more information aboutApp Mesh Envoy variables, see Envoy image in the AWS App Mesh User Guide.
Frequently asked questions
What is AWS App Mesh Virtual Node?
AWS App Mesh Virtual Node 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 Node?
For Terraform, the inhumantsar/ecs-terraform-demo, in4it/roxprox and akestner/fully-connected-mesh source code examples are useful. See the Terraform Example section for further details.