AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.9.1 published on Tuesday, Jun 21, 2022 by Pulumi

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/v5/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{
			MeshName: pulumi.Any(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
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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()        
            .meshName(aws_appmesh_mesh.simple().id())
            .spec(VirtualRouterSpecArgs.builder()
                .listener(VirtualRouterSpecListenerArgs.builder()
                    .portMapping(VirtualRouterSpecListenerPortMappingArgs.builder()
                        .port(8080)
                        .protocol("http")
                        .build())
                    .build())
                .build())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

serviceb = aws.appmesh.VirtualRouter("serviceb",
    mesh_name=aws_appmesh_mesh["simple"]["id"],
    spec=aws.appmesh.VirtualRouterSpecArgs(
        listener=aws.appmesh.VirtualRouterSpecListenerArgs(
            port_mapping=aws.appmesh.VirtualRouterSpecListenerPortMappingArgs(
                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",
            },
        },
    },
});
resources:
  serviceb:
    type: aws:appmesh:VirtualRouter
    properties:
      meshName: ${aws_appmesh_mesh.simple.id}
      spec:
        listener:
          portMapping:
            port: 8080
            protocol: http

Create a VirtualRouter Resource

new VirtualRouter(name: string, args: VirtualRouterArgs, opts?: CustomResourceOptions);
@overload
def VirtualRouter(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  mesh_name: Optional[str] = None,
                  mesh_owner: Optional[str] = None,
                  name: Optional[str] = None,
                  spec: Optional[VirtualRouterSpecArgs] = None,
                  tags: Optional[Mapping[str, str]] = None)
@overload
def VirtualRouter(resource_name: str,
                  args: VirtualRouterArgs,
                  opts: Optional[ResourceOptions] = None)
func NewVirtualRouter(ctx *Context, name string, args VirtualRouterArgs, opts ...ResourceOption) (*VirtualRouter, error)
public VirtualRouter(string name, VirtualRouterArgs args, CustomResourceOptions? opts = null)
public VirtualRouter(String name, VirtualRouterArgs args)
public VirtualRouter(String name, VirtualRouterArgs args, CustomResourceOptions options)
type: aws:appmesh:VirtualRouter
properties: # The arguments to resource properties.
options: # 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.
resource_name str
The unique name of the resource.
args VirtualRouterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control 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.
name String
The unique name of the resource.
args VirtualRouterArgs
The arguments to resource properties.
options 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 Architecture and Concepts 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. Must be between 1 and 255 characters in length.

Spec VirtualRouterSpecArgs

The virtual router specification to apply.

MeshOwner string

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

Name string

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

Tags Dictionary<string, string>

A 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.

MeshName string

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

Spec VirtualRouterSpecArgs

The virtual router specification to apply.

MeshOwner string

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

Name string

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

Tags map[string]string

A 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.

meshName String

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

spec VirtualRouterSpecArgs

The virtual router specification to apply.

meshOwner String

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

name String

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

tags Map<String,String>

A 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.

meshName string

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

spec VirtualRouterSpecArgs

The virtual router specification to apply.

meshOwner string

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

name string

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

tags {[key: string]: string}

A 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.

mesh_name str

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

spec VirtualRouterSpecArgs

The virtual router specification to apply.

mesh_owner str

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

name str

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

tags Mapping[str, str]

A 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.

meshName String

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

spec Property Map

The virtual router specification to apply.

meshOwner String

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

name String

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

tags Map<String>

A 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.

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.

ResourceOwner string

The resource owner's AWS account ID.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider .

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.

ResourceOwner string

The resource owner's AWS account ID.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider .

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.

resourceOwner String

The resource owner's AWS account ID.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider .

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.

resourceOwner string

The resource owner's AWS account ID.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider .

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.

resource_owner str

The resource owner's AWS account ID.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider .

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.

resourceOwner String

The resource owner's AWS account ID.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider .

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
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        created_date: Optional[str] = None,
        last_updated_date: Optional[str] = None,
        mesh_name: Optional[str] = None,
        mesh_owner: Optional[str] = None,
        name: Optional[str] = None,
        resource_owner: Optional[str] = None,
        spec: Optional[VirtualRouterSpecArgs] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> VirtualRouter
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)
public static VirtualRouter get(String name, Output<String> id, VirtualRouterState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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. Must be between 1 and 255 characters in length.

MeshOwner string

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

Name string

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

ResourceOwner string

The resource owner's AWS account ID.

Spec VirtualRouterSpecArgs

The virtual router specification to apply.

Tags Dictionary<string, string>

A 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.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider .

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. Must be between 1 and 255 characters in length.

MeshOwner string

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

Name string

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

ResourceOwner string

The resource owner's AWS account ID.

Spec VirtualRouterSpecArgs

The virtual router specification to apply.

Tags map[string]string

A 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.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider .

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. Must be between 1 and 255 characters in length.

meshOwner String

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

name String

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

resourceOwner String

The resource owner's AWS account ID.

spec VirtualRouterSpecArgs

The virtual router specification to apply.

tags Map<String,String>

A 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.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider .

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. Must be between 1 and 255 characters in length.

meshOwner string

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

name string

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

resourceOwner string

The resource owner's AWS account ID.

spec VirtualRouterSpecArgs

The virtual router specification to apply.

tags {[key: string]: string}

A 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.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider .

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. Must be between 1 and 255 characters in length.

mesh_owner str

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

name str

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

resource_owner str

The resource owner's AWS account ID.

spec VirtualRouterSpecArgs

The virtual router specification to apply.

tags Mapping[str, str]

A 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.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider .

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. Must be between 1 and 255 characters in length.

meshOwner String

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

name String

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

resourceOwner String

The resource owner's AWS account ID.

spec Property Map

The virtual router specification to apply.

tags Map<String>

A 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.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider .

Supporting Types

VirtualRouterSpec

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

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

listener Property Map

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

VirtualRouterSpecListener

PortMapping VirtualRouterSpecListenerPortMapping

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 VirtualRouterSpecListenerPortMapping

The port mapping information for the listener.

port_mapping VirtualRouterSpecListenerPortMapping

The port mapping information for the listener.

portMapping Property Map

The port mapping information for the listener.

VirtualRouterSpecListenerPortMapping

Port int

The port used for the port mapping.

Protocol string

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

Port int

The port used for the port mapping.

Protocol string

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

port Integer

The port used for the port mapping.

protocol String

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

port number

The port used for the port mapping.

protocol string

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

port int

The port used for the port mapping.

protocol str

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

port Number

The port used for the port mapping.

protocol String

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

Import

App Mesh virtual routers can be imported using mesh_name together with the virtual router’s name, e.g.,

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

[1]/docs/providers/aws/index.html

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.