Resource: awsAppmeshVirtualRouter
Provides an AWS App Mesh virtual router resource.
Breaking Changes
Because of backward incompatible API changes (read here and here), awsAppmeshVirtualRouter
resource definitions created with provider versions earlier than v2.3.0 will need to be modified:
-
Remove service
serviceNames
from thespec
argument. AWS has created aawsAppmeshVirtualService
resource for each of service names. These resource can be imported usingterraformImport
. -
Add a
listener
configuration block to thespec
argument.
The Terraform state associated with existing resources will automatically be migrated.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.appmeshVirtualRouter.AppmeshVirtualRouter(this, "serviceb", {
meshName: "${aws_appmesh_mesh.simple.id}",
name: "serviceB",
spec: {
listener: [
{
portMapping: {
port: 8080,
protocol: "http",
},
},
],
},
});
Argument Reference
The following arguments are supported:
name
- (Required) Name to use for the virtual router. Must be between 1 and 255 characters in length.meshName
- (Required) Name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.meshOwner
- (Optional) AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.spec
- (Required) Virtual router specification to apply.tags
- (Optional) Map of tags to assign to the resource. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
The spec
object supports the following:
listener
- (Optional) Listeners that the virtual router is expected to receive inbound traffic from. Currently only one listener is supported per virtual router.
The listener
object supports the following:
portMapping
- (Required) Port mapping information for the listener.
The portMapping
object supports the following:
port
- (Required) Port used for the port mapping.protocol
- (Required) Protocol used for the port mapping. Valid values arehttp
,http2
,tcp
andgrpc
.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- ID of the virtual router.arn
- ARN of the virtual router.createdDate
- Creation date of the virtual router.lastUpdatedDate
- Last update date of the virtual router.resourceOwner
- Resource owner's AWS account ID.tagsAll
- Map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
App Mesh virtual routers can be imported using meshName
together with the virtual router's name
, e.g.,