Module appmesh
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
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-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
Resources
Others
- MeshArgs
- MeshState
- RouteArgs
- RouteState
- VirtualNodeArgs
- VirtualNodeState
- VirtualRouterArgs
- VirtualRouterState
- VirtualServiceArgs
- VirtualServiceState
Resources
Resource Mesh
class Mesh extends CustomResourceProvides 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",
},
},
});constructor
new Mesh(name: string, args?: MeshArgs, opts?: pulumi.CustomResourceOptions)Create a Mesh resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): MeshGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is MeshReturns 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<MeshSpec | undefined>;The service mesh specification to apply.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A map 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 CustomResourceProvides 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,
});HTTP Header 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_serviceb.name,
weight: 100,
}],
},
match: {
headers: [{
match: {
prefix: "123",
},
name: "clientRequestId",
}],
method: "POST",
prefix: "/",
scheme: "https",
},
},
},
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,
});constructor
new Route(name: string, args: RouteArgs, opts?: pulumi.CustomResourceOptions)Create a Route resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): RouteGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is RouteReturns 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<RouteSpec>;The route specification to apply.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A map 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 CustomResourceProvides 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
serviceNameattribute of thednsobject tohostname.Replace the
backendsattribute of thespecobject with one or morebackendconfiguration blocks, settingvirtualServiceNameto 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",
},
},
},
});constructor
new VirtualNode(name: string, args: VirtualNodeArgs, opts?: pulumi.CustomResourceOptions)Create a VirtualNode resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): VirtualNodeGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is VirtualNodeReturns 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<VirtualNodeSpec>;The virtual node specification to apply.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A map 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 CustomResourceProvides 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
serviceNamesfrom thespecargument. AWS has created aaws.appmesh.VirtualServiceresource for each of service names. These resource can be imported usingimport.Add a
listenerconfiguration block to thespecargument.
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",
},
},
},
});constructor
new VirtualRouter(name: string, args: VirtualRouterArgs, opts?: pulumi.CustomResourceOptions)Create a VirtualRouter resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): VirtualRouterGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is VirtualRouterReturns 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<VirtualRouterSpec>;The virtual router specification to apply.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A map 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 CustomResourceProvides 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,
},
},
},
});constructor
new VirtualService(name: string, args: VirtualServiceArgs, opts?: pulumi.CustomResourceOptions)Create a VirtualService resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): VirtualServiceGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is VirtualServiceReturns 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<VirtualServiceSpec>;The virtual service specification to apply.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A map 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 MeshArgsThe 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<MeshSpec>;The service mesh specification to apply.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
interface MeshState
interface MeshStateInput 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<MeshSpec>;The service mesh specification to apply.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
interface RouteArgs
interface RouteArgsThe 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<RouteSpec>;The route specification to apply.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map 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 RouteStateInput 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<RouteSpec>;The route specification to apply.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map 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 VirtualNodeArgsThe 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<VirtualNodeSpec>;The virtual node specification to apply.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
interface VirtualNodeState
interface VirtualNodeStateInput 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<VirtualNodeSpec>;The virtual node specification to apply.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
interface VirtualRouterArgs
interface VirtualRouterArgsThe 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<VirtualRouterSpec>;The virtual router specification to apply.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
interface VirtualRouterState
interface VirtualRouterStateInput 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<VirtualRouterSpec>;The virtual router specification to apply.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
interface VirtualServiceArgs
interface VirtualServiceArgsThe 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<VirtualServiceSpec>;The virtual service specification to apply.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
interface VirtualServiceState
interface VirtualServiceStateInput 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<VirtualServiceSpec>;The virtual service specification to apply.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.