Show / Hide Table of Contents

Namespace Pulumi.Aws.AppMesh

Classes

Mesh

Provides an AWS App Mesh service mesh resource.

Example Usage

Basic

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var simple = new Aws.AppMesh.Mesh("simple", new Aws.AppMesh.MeshArgs
    {
    });
}

}

Egress Filter

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var simple = new Aws.AppMesh.Mesh("simple", new Aws.AppMesh.MeshArgs
    {
        Spec = new Aws.AppMesh.Inputs.MeshSpecArgs
        {
            EgressFilter = new Aws.AppMesh.Inputs.MeshSpecEgressFilterArgs
            {
                Type = "ALLOW_ALL",
            },
        },
    });
}

}

MeshArgs

MeshState

Route

Provides an AWS App Mesh route resource.

Example Usage

HTTP Routing

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var serviceb = new Aws.AppMesh.Route("serviceb", new Aws.AppMesh.RouteArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.RouteSpecArgs
        {
            HttpRoute = new Aws.AppMesh.Inputs.RouteSpecHttpRouteArgs
            {
                Action = new Aws.AppMesh.Inputs.RouteSpecHttpRouteActionArgs
                {
                    WeightedTarget = 
                    {

                        {
                            { "virtualNode", aws_appmesh_virtual_node.Serviceb1.Name },
                            { "weight", 90 },
                        },

                        {
                            { "virtualNode", aws_appmesh_virtual_node.Serviceb2.Name },
                            { "weight", 10 },
                        },
                    },
                },
                Match = new Aws.AppMesh.Inputs.RouteSpecHttpRouteMatchArgs
                {
                    Prefix = "/",
                },
            },
        },
        VirtualRouterName = aws_appmesh_virtual_router.Serviceb.Name,
    });
}

}

HTTP Header Routing

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var serviceb = new Aws.AppMesh.Route("serviceb", new Aws.AppMesh.RouteArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.RouteSpecArgs
        {
            HttpRoute = new Aws.AppMesh.Inputs.RouteSpecHttpRouteArgs
            {
                Action = new Aws.AppMesh.Inputs.RouteSpecHttpRouteActionArgs
                {
                    WeightedTarget = 
                    {

                        {
                            { "virtualNode", aws_appmesh_virtual_node.Serviceb.Name },
                            { "weight", 100 },
                        },
                    },
                },
                Match = new Aws.AppMesh.Inputs.RouteSpecHttpRouteMatchArgs
                {
                    Header = 
                    {

                        {
                            { "match", 
                            {
                                { "prefix", "123" },
                            } },
                            { "name", "clientRequestId" },
                        },
                    },
                    Method = "POST",
                    Prefix = "/",
                    Scheme = "https",
                },
            },
        },
        VirtualRouterName = aws_appmesh_virtual_router.Serviceb.Name,
    });
}

}

TCP Routing

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var serviceb = new Aws.AppMesh.Route("serviceb", new Aws.AppMesh.RouteArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.RouteSpecArgs
        {
            TcpRoute = new Aws.AppMesh.Inputs.RouteSpecTcpRouteArgs
            {
                Action = new Aws.AppMesh.Inputs.RouteSpecTcpRouteActionArgs
                {
                    WeightedTarget = 
                    {

                        {
                            { "virtualNode", aws_appmesh_virtual_node.Serviceb1.Name },
                            { "weight", 100 },
                        },
                    },
                },
            },
        },
        VirtualRouterName = aws_appmesh_virtual_router.Serviceb.Name,
    });
}

}

RouteArgs

RouteState

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",
                },
            },
        },
    });
}

}

VirtualNodeArgs

VirtualNodeState

VirtualRouter

Provides an AWS App Mesh virtual router resource.

Breaking Changes

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

  • Remove service service_names from the spec argument. AWS has created a aws.appmesh.VirtualService resource for each of service names. These resource can be imported using import.

  • Add a listener configuration block to the spec argument.

The state associated with existing resources will automatically be migrated.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var serviceb = new Aws.AppMesh.VirtualRouter("serviceb", new Aws.AppMesh.VirtualRouterArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.VirtualRouterSpecArgs
        {
            Listener = new Aws.AppMesh.Inputs.VirtualRouterSpecListenerArgs
            {
                PortMapping = new Aws.AppMesh.Inputs.VirtualRouterSpecListenerPortMappingArgs
                {
                    Port = 8080,
                    Protocol = "http",
                },
            },
        },
    });
}

}

VirtualRouterArgs

VirtualRouterState

VirtualService

Provides an AWS App Mesh virtual service resource.

Example Usage

Virtual Node Provider

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var servicea = new Aws.AppMesh.VirtualService("servicea", new Aws.AppMesh.VirtualServiceArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.VirtualServiceSpecArgs
        {
            Provider = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderArgs
            {
                VirtualNode = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderVirtualNodeArgs
                {
                    VirtualNodeName = aws_appmesh_virtual_node.Serviceb1.Name,
                },
            },
        },
    });
}

}

Virtual Router Provider

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var servicea = new Aws.AppMesh.VirtualService("servicea", new Aws.AppMesh.VirtualServiceArgs
    {
        MeshName = aws_appmesh_mesh.Simple.Id,
        Spec = new Aws.AppMesh.Inputs.VirtualServiceSpecArgs
        {
            Provider = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderArgs
            {
                VirtualRouter = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderVirtualRouterArgs
                {
                    VirtualRouterName = aws_appmesh_virtual_router.Serviceb.Name,
                },
            },
        },
    });
}

}

VirtualServiceArgs

VirtualServiceState

Back to top Copyright 2016-2020, Pulumi Corporation.