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

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/appmesh"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := appmesh.NewVirtualRouter(ctx, "serviceb", &appmesh.VirtualRouterArgs{
            MeshName: pulumi.String(aws_appmesh_mesh.Simple.Id),
            Spec: &appmesh.VirtualRouterSpecArgs{
                Listener: &appmesh.VirtualRouterSpecListenerArgs{
                    PortMapping: &appmesh.VirtualRouterSpecListenerPortMappingArgs{
                        Port:     pulumi.Int(8080),
                        Protocol: pulumi.String("http"),
                    },
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

serviceb = aws.appmesh.VirtualRouter("serviceb",
    mesh_name=aws_appmesh_mesh["simple"]["id"],
    spec={
        "listener": {
            "portMapping": {
                "port": 8080,
                "protocol": "http",
            },
        },
    })
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",
            },
        },
    },
});

Create a VirtualRouter Resource

def VirtualRouter(resource_name, opts=None, mesh_name=None, name=None, spec=None, tags=None, __props__=None);
name string
The unique name of the resource.
args VirtualRouterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VirtualRouterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VirtualRouterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VirtualRouter Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The VirtualRouter resource accepts the following input properties:

MeshName string

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

Spec VirtualRouterSpecArgs

The virtual router specification to apply.

Name string

The name to use for the virtual router.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

MeshName string

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

Spec VirtualRouterSpec

The virtual router specification to apply.

Name string

The name to use for the virtual router.

Tags map[string]string

A map of tags to assign to the resource.

meshName string

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

spec VirtualRouterSpec

The virtual router specification to apply.

name string

The name to use for the virtual router.

tags {[key: string]: string}

A map of tags to assign to the resource.

mesh_name str

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

spec Dict[VirtualRouterSpec]

The virtual router specification to apply.

name str

The name to use for the virtual router.

tags Dict[str, str]

A map of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the VirtualRouter resource produces the following output properties:

Arn string

The ARN of the virtual router.

CreatedDate string

The creation date of the virtual router.

Id string
The provider-assigned unique ID for this managed resource.
LastUpdatedDate string

The last update date of the virtual router.

Arn string

The ARN of the virtual router.

CreatedDate string

The creation date of the virtual router.

Id string
The provider-assigned unique ID for this managed resource.
LastUpdatedDate string

The last update date of the virtual router.

arn string

The ARN of the virtual router.

createdDate string

The creation date of the virtual router.

id string
The provider-assigned unique ID for this managed resource.
lastUpdatedDate string

The last update date of the virtual router.

arn str

The ARN of the virtual router.

created_date str

The creation date of the virtual router.

id str
The provider-assigned unique ID for this managed resource.
last_updated_date str

The last update date of the virtual router.

Look up an Existing VirtualRouter Resource

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

public static get(name: string, id: Input<ID>, state?: VirtualRouterState, opts?: CustomResourceOptions): VirtualRouter
static get(resource_name, id, opts=None, arn=None, created_date=None, last_updated_date=None, mesh_name=None, name=None, spec=None, tags=None, __props__=None);
func GetVirtualRouter(ctx *Context, name string, id IDInput, state *VirtualRouterState, opts ...ResourceOption) (*VirtualRouter, error)
public static VirtualRouter Get(string name, Input<string> id, VirtualRouterState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

The ARN of the virtual router.

CreatedDate string

The creation date of the virtual router.

LastUpdatedDate string

The last update date of the virtual router.

MeshName string

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

Name string

The name to use for the virtual router.

Spec VirtualRouterSpecArgs

The virtual router specification to apply.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

Arn string

The ARN of the virtual router.

CreatedDate string

The creation date of the virtual router.

LastUpdatedDate string

The last update date of the virtual router.

MeshName string

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

Name string

The name to use for the virtual router.

Spec VirtualRouterSpec

The virtual router specification to apply.

Tags map[string]string

A map of tags to assign to the resource.

arn string

The ARN of the virtual router.

createdDate string

The creation date of the virtual router.

lastUpdatedDate string

The last update date of the virtual router.

meshName string

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

name string

The name to use for the virtual router.

spec VirtualRouterSpec

The virtual router specification to apply.

tags {[key: string]: string}

A map of tags to assign to the resource.

arn str

The ARN of the virtual router.

created_date str

The creation date of the virtual router.

last_updated_date str

The last update date of the virtual router.

mesh_name str

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

name str

The name to use for the virtual router.

spec Dict[VirtualRouterSpec]

The virtual router specification to apply.

tags Dict[str, str]

A map of tags to assign to the resource.

Supporting Types

VirtualRouterSpec

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Listener VirtualRouterSpecListenerArgs

The listeners that the virtual router is expected to receive inbound traffic from. Currently only one listener is supported per virtual router.

Listener VirtualRouterSpecListener

The listeners that the virtual router is expected to receive inbound traffic from. Currently only one listener is supported per virtual router.

listener VirtualRouterSpecListener

The listeners that the virtual router is expected to receive inbound traffic from. Currently only one listener is supported per virtual router.

listener Dict[VirtualRouterSpecListener]

The listeners that the virtual router is expected to receive inbound traffic from. Currently only one listener is supported per virtual router.

VirtualRouterSpecListener

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

PortMapping VirtualRouterSpecListenerPortMappingArgs

The port mapping information for the listener.

PortMapping VirtualRouterSpecListenerPortMapping

The port mapping information for the listener.

portMapping VirtualRouterSpecListenerPortMapping

The port mapping information for the listener.

portMapping Dict[VirtualRouterSpecListenerPortMapping]

The port mapping information for the listener.

VirtualRouterSpecListenerPortMapping

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Port int

The port used for the port mapping.

Protocol string

The protocol used for the port mapping. Valid values are http and tcp.

Port int

The port used for the port mapping.

Protocol string

The protocol used for the port mapping. Valid values are http and tcp.

port number

The port used for the port mapping.

protocol string

The protocol used for the port mapping. Valid values are http and tcp.

port float

The port used for the port mapping.

protocol str

The protocol used for the port mapping. Valid values are http and tcp.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.