VirtualRouter

class VirtualRouter : KotlinCustomResource

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 service name. Import these resource using pulumi 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", {
name: "serviceB",
meshName: simple.id,
spec: {
listeners: [{
portMapping: {
port: 8080,
protocol: "http",
},
}],
},
});
import pulumi
import pulumi_aws as aws
serviceb = aws.appmesh.VirtualRouter("serviceb",
name="serviceB",
mesh_name=simple["id"],
spec={
"listeners": [{
"port_mapping": {
"port": 8080,
"protocol": "http",
},
}],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var serviceb = new Aws.AppMesh.VirtualRouter("serviceb", new()
{
Name = "serviceB",
MeshName = simple.Id,
Spec = new Aws.AppMesh.Inputs.VirtualRouterSpecArgs
{
Listeners = new[]
{
new Aws.AppMesh.Inputs.VirtualRouterSpecListenerArgs
{
PortMapping = new Aws.AppMesh.Inputs.VirtualRouterSpecListenerPortMappingArgs
{
Port = 8080,
Protocol = "http",
},
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appmesh.NewVirtualRouter(ctx, "serviceb", &appmesh.VirtualRouterArgs{
Name: pulumi.String("serviceB"),
MeshName: pulumi.Any(simple.Id),
Spec: &appmesh.VirtualRouterSpecArgs{
Listeners: appmesh.VirtualRouterSpecListenerArray{
&appmesh.VirtualRouterSpecListenerArgs{
PortMapping: &appmesh.VirtualRouterSpecListenerPortMappingArgs{
Port: pulumi.Int(8080),
Protocol: pulumi.String("http"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appmesh.VirtualRouter;
import com.pulumi.aws.appmesh.VirtualRouterArgs;
import com.pulumi.aws.appmesh.inputs.VirtualRouterSpecArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var serviceb = new VirtualRouter("serviceb", VirtualRouterArgs.builder()
.name("serviceB")
.meshName(simple.id())
.spec(VirtualRouterSpecArgs.builder()
.listeners(VirtualRouterSpecListenerArgs.builder()
.portMapping(VirtualRouterSpecListenerPortMappingArgs.builder()
.port(8080)
.protocol("http")
.build())
.build())
.build())
.build());
}
}
resources:
serviceb:
type: aws:appmesh:VirtualRouter
properties:
name: serviceB
meshName: ${simple.id}
spec:
listeners:
- portMapping:
port: 8080
protocol: http

Import

Using pulumi import, import App Mesh virtual routers using mesh_name together with the virtual router's name. For example:

$ pulumi import aws:appmesh/virtualRouter:VirtualRouter serviceb simpleapp/serviceB

Properties

Link copied to clipboard
val arn: Output<String>

ARN of the virtual router.

Link copied to clipboard
val createdDate: Output<String>

Creation date of the virtual router.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val lastUpdatedDate: Output<String>

Last update date of the virtual router.

Link copied to clipboard
val meshName: Output<String>

Name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.

Link copied to clipboard
val meshOwner: Output<String>

AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.

Link copied to clipboard
val name: Output<String>

Name to use for the virtual router. Must be between 1 and 255 characters in length.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceOwner: Output<String>

Resource owner's AWS account ID.

Link copied to clipboard
val spec: Output<VirtualRouterSpec>

Virtual router specification to apply.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>