Show / Hide Table of Contents

Class VirtualNode

Provides an AWS App Mesh virtual node resource.

Breaking Changes

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

  • Rename the service_name attribute of the dns object to hostname.

  • Replace the backends attribute of the spec object with one or more backend configuration blocks, setting virtual_service_name to the name of the service.

The state associated with existing resources will automatically be migrated.

Example Usage

Basic

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var serviceb1 = new Aws.AppMesh.VirtualNode("serviceb1", new Aws.AppMesh.VirtualNodeArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.VirtualNodeSpecArgs
        {
            Backend = 
            {

                {
                    { "virtualService", 
                    {
                        { "virtualServiceName", "servicea.simpleapp.local" },
                    } },
                },
            },
            Listener = new Aws.AppMesh.Inputs.VirtualNodeSpecListenerArgs
            {
                PortMapping = new Aws.AppMesh.Inputs.VirtualNodeSpecListenerPortMappingArgs
                {
                    Port = 8080,
                    Protocol = "http",
                },
            },
            ServiceDiscovery = new Aws.AppMesh.Inputs.VirtualNodeSpecServiceDiscoveryArgs
            {
                Dns = new Aws.AppMesh.Inputs.VirtualNodeSpecServiceDiscoveryDnsArgs
                {
                    Hostname = "serviceb.simpleapp.local",
                },
            },
        },
    });
}

}

AWS Cloud Map Service Discovery

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = new Aws.ServiceDiscovery.HttpNamespace("example", new Aws.ServiceDiscovery.HttpNamespaceArgs
    {
    });
    var serviceb1 = new Aws.AppMesh.VirtualNode("serviceb1", new Aws.AppMesh.VirtualNodeArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.VirtualNodeSpecArgs
        {
            Backend = 
            {

                {
                    { "virtualService", 
                    {
                        { "virtualServiceName", "servicea.simpleapp.local" },
                    } },
                },
            },
            Listener = new Aws.AppMesh.Inputs.VirtualNodeSpecListenerArgs
            {
                PortMapping = new Aws.AppMesh.Inputs.VirtualNodeSpecListenerPortMappingArgs
                {
                    Port = 8080,
                    Protocol = "http",
                },
            },
            ServiceDiscovery = new Aws.AppMesh.Inputs.VirtualNodeSpecServiceDiscoveryArgs
            {
                AwsCloudMap = new Aws.AppMesh.Inputs.VirtualNodeSpecServiceDiscoveryAwsCloudMapArgs
                {
                    Attributes = 
                    {
                        { "stack", "blue" },
                    },
                    NamespaceName = example.Name,
                    ServiceName = "serviceb1",
                },
            },
        },
    });
}

}

Listener Health Check

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var serviceb1 = new Aws.AppMesh.VirtualNode("serviceb1", new Aws.AppMesh.VirtualNodeArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.VirtualNodeSpecArgs
        {
            Backend = 
            {

                {
                    { "virtualService", 
                    {
                        { "virtualServiceName", "servicea.simpleapp.local" },
                    } },
                },
            },
            Listener = new Aws.AppMesh.Inputs.VirtualNodeSpecListenerArgs
            {
                HealthCheck = new Aws.AppMesh.Inputs.VirtualNodeSpecListenerHealthCheckArgs
                {
                    HealthyThreshold = 2,
                    IntervalMillis = 5000,
                    Path = "/ping",
                    Protocol = "http",
                    TimeoutMillis = 2000,
                    UnhealthyThreshold = 2,
                },
                PortMapping = new Aws.AppMesh.Inputs.VirtualNodeSpecListenerPortMappingArgs
                {
                    Port = 8080,
                    Protocol = "http",
                },
            },
            ServiceDiscovery = new Aws.AppMesh.Inputs.VirtualNodeSpecServiceDiscoveryArgs
            {
                Dns = new Aws.AppMesh.Inputs.VirtualNodeSpecServiceDiscoveryDnsArgs
                {
                    Hostname = "serviceb.simpleapp.local",
                },
            },
        },
    });
}

}

Logging

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var serviceb1 = new Aws.AppMesh.VirtualNode("serviceb1", new Aws.AppMesh.VirtualNodeArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.VirtualNodeSpecArgs
        {
            Backend = 
            {

                {
                    { "virtualService", 
                    {
                        { "virtualServiceName", "servicea.simpleapp.local" },
                    } },
                },
            },
            Listener = new Aws.AppMesh.Inputs.VirtualNodeSpecListenerArgs
            {
                PortMapping = new Aws.AppMesh.Inputs.VirtualNodeSpecListenerPortMappingArgs
                {
                    Port = 8080,
                    Protocol = "http",
                },
            },
            Logging = new Aws.AppMesh.Inputs.VirtualNodeSpecLoggingArgs
            {
                AccessLog = new Aws.AppMesh.Inputs.VirtualNodeSpecLoggingAccessLogArgs
                {
                    File = new Aws.AppMesh.Inputs.VirtualNodeSpecLoggingAccessLogFileArgs
                    {
                        Path = "/dev/stdout",
                    },
                },
            },
            ServiceDiscovery = new Aws.AppMesh.Inputs.VirtualNodeSpecServiceDiscoveryArgs
            {
                Dns = new Aws.AppMesh.Inputs.VirtualNodeSpecServiceDiscoveryDnsArgs
                {
                    Hostname = "serviceb.simpleapp.local",
                },
            },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
VirtualNode
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.AppMesh
Assembly: Pulumi.Aws.dll
Syntax
public class VirtualNode : CustomResource

Constructors

View Source

VirtualNode(String, VirtualNodeArgs, CustomResourceOptions)

Create a VirtualNode resource with the given unique name, arguments, and options.

Declaration
public VirtualNode(string name, VirtualNodeArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

VirtualNodeArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The ARN of the virtual node.

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

CreatedDate

The creation date of the virtual node.

Declaration
public Output<string> CreatedDate { get; }
Property Value
Type Description
Output<System.String>
View Source

LastUpdatedDate

The last update date of the virtual node.

Declaration
public Output<string> LastUpdatedDate { get; }
Property Value
Type Description
Output<System.String>
View Source

MeshName

The name of the service mesh in which to create the virtual node.

Declaration
public Output<string> MeshName { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name to use for the virtual node.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Spec

The virtual node specification to apply.

Declaration
public Output<VirtualNodeSpec> Spec { get; }
Property Value
Type Description
Output<VirtualNodeSpec>
View Source

Tags

A map of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>

Methods

View Source

Get(String, Input<String>, VirtualNodeState, CustomResourceOptions)

Get an existing VirtualNode resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static VirtualNode Get(string name, Input<string> id, VirtualNodeState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

VirtualNodeState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
VirtualNode
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.