Module appmesh

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.

Resources

Others

Resources

Resource Mesh

class Mesh extends CustomResource

Provides an AWS App Mesh service mesh resource.

Example Usage

Basic
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const simple = new aws.appmesh.Mesh("simple", {});
Egress Filter
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const simple = new aws.appmesh.Mesh("simple", {
    spec: {
        egressFilter: {
            type: "ALLOW_ALL",
        },
    },
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/appmesh_mesh.html.markdown.

constructor

new Mesh(name: string, args?: MeshArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MeshState, opts?: pulumi.CustomResourceOptions): Mesh

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Mesh. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

The ARN of the service mesh.

property createdDate

public createdDate: pulumi.Output<string>;

The creation date of the service mesh.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property lastUpdatedDate

public lastUpdatedDate: pulumi.Output<string>;

The last update date of the service mesh.

property name

public name: pulumi.Output<string>;

The name to use for the service mesh.

property spec

public spec: pulumi.Output<outputs.appmesh.MeshSpec | undefined>;

The service mesh specification to apply.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Route

class Route extends CustomResource

Provides an AWS App Mesh route resource.

Example Usage

HTTP Routing
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const serviceb = new aws.appmesh.Route("serviceb", {
    meshName: aws_appmesh_mesh_simple.id,
    spec: {
        httpRoute: {
            action: {
                weightedTargets: [
                    {
                        virtualNode: aws_appmesh_virtual_node_serviceb1.name,
                        weight: 90,
                    },
                    {
                        virtualNode: aws_appmesh_virtual_node_serviceb2.name,
                        weight: 10,
                    },
                ],
            },
            match: {
                prefix: "/",
            },
        },
    },
    virtualRouterName: aws_appmesh_virtual_router_serviceb.name,
});
TCP Routing
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const serviceb = new aws.appmesh.Route("serviceb", {
    meshName: aws_appmesh_mesh_simple.id,
    spec: {
        tcpRoute: {
            action: {
                weightedTargets: [{
                    virtualNode: aws_appmesh_virtual_node_serviceb1.name,
                    weight: 100,
                }],
            },
        },
    },
    virtualRouterName: aws_appmesh_virtual_router_serviceb.name,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/appmesh_route.html.markdown.

constructor

new Route(name: string, args: RouteArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RouteState, opts?: pulumi.CustomResourceOptions): Route

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Route. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

The ARN of the route.

property createdDate

public createdDate: pulumi.Output<string>;

The creation date of the route.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property lastUpdatedDate

public lastUpdatedDate: pulumi.Output<string>;

The last update date of the route.

property meshName

public meshName: pulumi.Output<string>;

The name of the service mesh in which to create the route.

property name

public name: pulumi.Output<string>;

The name to use for the route.

property spec

public spec: pulumi.Output<outputs.appmesh.RouteSpec>;

The route specification to apply.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property virtualRouterName

public virtualRouterName: pulumi.Output<string>;

The name of the virtual router in which to create the route.

Resource VirtualNode

class VirtualNode extends CustomResource

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 serviceName attribute of the dns object to hostname.

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

The state associated with existing resources will automatically be migrated.

Example Usage

Basic
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const serviceb1 = new aws.appmesh.VirtualNode("serviceb1", {
    meshName: aws_appmesh_mesh_simple.id,
    spec: {
        backends: [{
            virtualService: {
                virtualServiceName: "servicea.simpleapp.local",
            },
        }],
        listener: {
            portMapping: {
                port: 8080,
                protocol: "http",
            },
        },
        serviceDiscovery: {
            dns: {
                hostname: "serviceb.simpleapp.local",
            },
        },
    },
});
AWS Cloud Map Service Discovery
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.servicediscovery.HttpNamespace("example", {});
const serviceb1 = new aws.appmesh.VirtualNode("serviceb1", {
    meshName: aws_appmesh_mesh_simple.id,
    spec: {
        backends: [{
            virtualService: {
                virtualServiceName: "servicea.simpleapp.local",
            },
        }],
        listener: {
            portMapping: {
                port: 8080,
                protocol: "http",
            },
        },
        serviceDiscovery: {
            awsCloudMap: {
                attributes: {
                    stack: "blue",
                },
                namespaceName: example.name,
                serviceName: "serviceb1",
            },
        },
    },
});
Listener Health Check
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const serviceb1 = new aws.appmesh.VirtualNode("serviceb1", {
    meshName: aws_appmesh_mesh_simple.id,
    spec: {
        backends: [{
            virtualService: {
                virtualServiceName: "servicea.simpleapp.local",
            },
        }],
        listener: {
            healthCheck: {
                healthyThreshold: 2,
                intervalMillis: 5000,
                path: "/ping",
                protocol: "http",
                timeoutMillis: 2000,
                unhealthyThreshold: 2,
            },
            portMapping: {
                port: 8080,
                protocol: "http",
            },
        },
        serviceDiscovery: {
            dns: {
                hostname: "serviceb.simpleapp.local",
            },
        },
    },
});
Logging
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const serviceb1 = new aws.appmesh.VirtualNode("serviceb1", {
    meshName: aws_appmesh_mesh_simple.id,
    spec: {
        backends: [{
            virtualService: {
                virtualServiceName: "servicea.simpleapp.local",
            },
        }],
        listener: {
            portMapping: {
                port: 8080,
                protocol: "http",
            },
        },
        logging: {
            accessLog: {
                file: {
                    path: "/dev/stdout",
                },
            },
        },
        serviceDiscovery: {
            dns: {
                hostname: "serviceb.simpleapp.local",
            },
        },
    },
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/appmesh_virtual_node.html.markdown.

constructor

new VirtualNode(name: string, args: VirtualNodeArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VirtualNodeState, opts?: pulumi.CustomResourceOptions): VirtualNode

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of VirtualNode. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

The ARN of the virtual node.

property createdDate

public createdDate: pulumi.Output<string>;

The creation date of the virtual node.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property lastUpdatedDate

public lastUpdatedDate: pulumi.Output<string>;

The last update date of the virtual node.

property meshName

public meshName: pulumi.Output<string>;

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

property name

public name: pulumi.Output<string>;

The name to use for the virtual node.

property spec

public spec: pulumi.Output<outputs.appmesh.VirtualNodeSpec>;

The virtual node specification to apply.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource VirtualRouter

class VirtualRouter extends CustomResource

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 serviceNames 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

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const serviceb = new aws.appmesh.VirtualRouter("serviceb", {
    meshName: aws_appmesh_mesh_simple.id,
    spec: {
        listener: {
            portMapping: {
                port: 8080,
                protocol: "http",
            },
        },
    },
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/appmesh_virtual_router.html.markdown.

constructor

new VirtualRouter(name: string, args: VirtualRouterArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VirtualRouterState, opts?: pulumi.CustomResourceOptions): VirtualRouter

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of VirtualRouter. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

The ARN of the virtual router.

property createdDate

public createdDate: pulumi.Output<string>;

The creation date of the virtual router.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property lastUpdatedDate

public lastUpdatedDate: pulumi.Output<string>;

The last update date of the virtual router.

property meshName

public meshName: pulumi.Output<string>;

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

property name

public name: pulumi.Output<string>;

The name to use for the virtual router.

property spec

public spec: pulumi.Output<outputs.appmesh.VirtualRouterSpec>;

The virtual router specification to apply.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource VirtualService

class VirtualService extends CustomResource

Provides an AWS App Mesh virtual service resource.

Example Usage

Virtual Node Provider
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const servicea = new aws.appmesh.VirtualService("servicea", {
    meshName: aws_appmesh_mesh_simple.id,
    spec: {
        provider: {
            virtualNode: {
                virtualNodeName: aws_appmesh_virtual_node_serviceb1.name,
            },
        },
    },
});
Virtual Router Provider
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const servicea = new aws.appmesh.VirtualService("servicea", {
    meshName: aws_appmesh_mesh_simple.id,
    spec: {
        provider: {
            virtualRouter: {
                virtualRouterName: aws_appmesh_virtual_router_serviceb.name,
            },
        },
    },
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/appmesh_virtual_service.html.markdown.

constructor

new VirtualService(name: string, args: VirtualServiceArgs, opts?: pulumi.CustomResourceOptions)

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

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VirtualServiceState, opts?: pulumi.CustomResourceOptions): VirtualService

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of VirtualService. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

The ARN of the virtual service.

property createdDate

public createdDate: pulumi.Output<string>;

The creation date of the virtual service.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property lastUpdatedDate

public lastUpdatedDate: pulumi.Output<string>;

The last update date of the virtual service.

property meshName

public meshName: pulumi.Output<string>;

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

property name

public name: pulumi.Output<string>;

The name to use for the virtual service.

property spec

public spec: pulumi.Output<outputs.appmesh.VirtualServiceSpec>;

The virtual service specification to apply.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Others

interface MeshArgs

interface MeshArgs

The set of arguments for constructing a Mesh resource.

property name

name?: pulumi.Input<string>;

The name to use for the service mesh.

property spec

spec?: pulumi.Input<inputs.appmesh.MeshSpec>;

The service mesh specification to apply.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface MeshState

interface MeshState

Input properties used for looking up and filtering Mesh resources.

property arn

arn?: pulumi.Input<string>;

The ARN of the service mesh.

property createdDate

createdDate?: pulumi.Input<string>;

The creation date of the service mesh.

property lastUpdatedDate

lastUpdatedDate?: pulumi.Input<string>;

The last update date of the service mesh.

property name

name?: pulumi.Input<string>;

The name to use for the service mesh.

property spec

spec?: pulumi.Input<inputs.appmesh.MeshSpec>;

The service mesh specification to apply.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface RouteArgs

interface RouteArgs

The set of arguments for constructing a Route resource.

property meshName

meshName: pulumi.Input<string>;

The name of the service mesh in which to create the route.

property name

name?: pulumi.Input<string>;

The name to use for the route.

property spec

spec: pulumi.Input<inputs.appmesh.RouteSpec>;

The route specification to apply.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property virtualRouterName

virtualRouterName: pulumi.Input<string>;

The name of the virtual router in which to create the route.

interface RouteState

interface RouteState

Input properties used for looking up and filtering Route resources.

property arn

arn?: pulumi.Input<string>;

The ARN of the route.

property createdDate

createdDate?: pulumi.Input<string>;

The creation date of the route.

property lastUpdatedDate

lastUpdatedDate?: pulumi.Input<string>;

The last update date of the route.

property meshName

meshName?: pulumi.Input<string>;

The name of the service mesh in which to create the route.

property name

name?: pulumi.Input<string>;

The name to use for the route.

property spec

spec?: pulumi.Input<inputs.appmesh.RouteSpec>;

The route specification to apply.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property virtualRouterName

virtualRouterName?: pulumi.Input<string>;

The name of the virtual router in which to create the route.

interface VirtualNodeArgs

interface VirtualNodeArgs

The set of arguments for constructing a VirtualNode resource.

property meshName

meshName: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

The name to use for the virtual node.

property spec

spec: pulumi.Input<inputs.appmesh.VirtualNodeSpec>;

The virtual node specification to apply.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface VirtualNodeState

interface VirtualNodeState

Input properties used for looking up and filtering VirtualNode resources.

property arn

arn?: pulumi.Input<string>;

The ARN of the virtual node.

property createdDate

createdDate?: pulumi.Input<string>;

The creation date of the virtual node.

property lastUpdatedDate

lastUpdatedDate?: pulumi.Input<string>;

The last update date of the virtual node.

property meshName

meshName?: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

The name to use for the virtual node.

property spec

spec?: pulumi.Input<inputs.appmesh.VirtualNodeSpec>;

The virtual node specification to apply.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface VirtualRouterArgs

interface VirtualRouterArgs

The set of arguments for constructing a VirtualRouter resource.

property meshName

meshName: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

The name to use for the virtual router.

property spec

spec: pulumi.Input<inputs.appmesh.VirtualRouterSpec>;

The virtual router specification to apply.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface VirtualRouterState

interface VirtualRouterState

Input properties used for looking up and filtering VirtualRouter resources.

property arn

arn?: pulumi.Input<string>;

The ARN of the virtual router.

property createdDate

createdDate?: pulumi.Input<string>;

The creation date of the virtual router.

property lastUpdatedDate

lastUpdatedDate?: pulumi.Input<string>;

The last update date of the virtual router.

property meshName

meshName?: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

The name to use for the virtual router.

property spec

spec?: pulumi.Input<inputs.appmesh.VirtualRouterSpec>;

The virtual router specification to apply.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface VirtualServiceArgs

interface VirtualServiceArgs

The set of arguments for constructing a VirtualService resource.

property meshName

meshName: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

The name to use for the virtual service.

property spec

spec: pulumi.Input<inputs.appmesh.VirtualServiceSpec>;

The virtual service specification to apply.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface VirtualServiceState

interface VirtualServiceState

Input properties used for looking up and filtering VirtualService resources.

property arn

arn?: pulumi.Input<string>;

The ARN of the virtual service.

property createdDate

createdDate?: pulumi.Input<string>;

The creation date of the virtual service.

property lastUpdatedDate

lastUpdatedDate?: pulumi.Input<string>;

The last update date of the virtual service.

property meshName

meshName?: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

The name to use for the virtual service.

property spec

spec?: pulumi.Input<inputs.appmesh.VirtualServiceSpec>;

The virtual service specification to apply.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.