AWS Classic
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 thespec
argument. AWS has created aaws.appmesh.VirtualService
resource for each of service names. These resource can be imported usingimport
.Add a
listener
configuration block to thespec
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:
- Mesh
Name string The name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.
- Spec
Virtual
Router Spec Args The virtual router specification to apply.
- Mesh
Owner 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.
- 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.
- Mesh
Name string The name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.
- Spec
Virtual
Router Spec Args The virtual router specification to apply.
- Mesh
Owner 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.
- 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.
- mesh
Name String The name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.
- spec
Virtual
Router Spec Args The virtual router specification to apply.
- mesh
Owner 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.
- 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.
- mesh
Name string The name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.
- spec
Virtual
Router Spec Args The virtual router specification to apply.
- mesh
Owner 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.
- {[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
Virtual
Router Spec Args 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.
- 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.
- mesh
Name 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.
- mesh
Owner 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.
- 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.
- Created
Date string The creation date of the virtual router.
- Id string
The provider-assigned unique ID for this managed resource.
- Last
Updated stringDate The last update date of the virtual router.
- Resource
Owner string The resource owner's AWS account ID.
- 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.
- Created
Date string The creation date of the virtual router.
- Id string
The provider-assigned unique ID for this managed resource.
- Last
Updated stringDate The last update date of the virtual router.
- Resource
Owner string The resource owner's AWS account ID.
- 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.
- created
Date String The creation date of the virtual router.
- id String
The provider-assigned unique ID for this managed resource.
- last
Updated StringDate The last update date of the virtual router.
- resource
Owner String The resource owner's AWS account ID.
- 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.
- created
Date string The creation date of the virtual router.
- id string
The provider-assigned unique ID for this managed resource.
- last
Updated stringDate The last update date of the virtual router.
- resource
Owner string The resource owner's AWS account ID.
- {[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_ strdate The last update date of the virtual router.
- resource_
owner str The resource owner's AWS account ID.
- 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.
- created
Date String The creation date of the virtual router.
- id String
The provider-assigned unique ID for this managed resource.
- last
Updated StringDate The last update date of the virtual router.
- resource
Owner String The resource owner's AWS account ID.
- 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.
- Arn string
The ARN of the virtual router.
- Created
Date string The creation date of the virtual router.
- Last
Updated stringDate The last update date of the virtual router.
- Mesh
Name string The name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.
- Mesh
Owner 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.
- Resource
Owner string The resource owner's AWS account ID.
- Spec
Virtual
Router Spec Args The virtual router specification to apply.
- 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.- 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.
- Created
Date string The creation date of the virtual router.
- Last
Updated stringDate The last update date of the virtual router.
- Mesh
Name string The name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.
- Mesh
Owner 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.
- Resource
Owner string The resource owner's AWS account ID.
- Spec
Virtual
Router Spec Args The virtual router specification to apply.
- 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.- 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.
- created
Date String The creation date of the virtual router.
- last
Updated StringDate The last update date of the virtual router.
- mesh
Name String The name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.
- mesh
Owner 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.
- resource
Owner String The resource owner's AWS account ID.
- spec
Virtual
Router Spec Args The virtual router specification to apply.
- 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.- 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.
- created
Date string The creation date of the virtual router.
- last
Updated stringDate The last update date of the virtual router.
- mesh
Name string The name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.
- mesh
Owner 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.
- resource
Owner string The resource owner's AWS account ID.
- spec
Virtual
Router Spec Args The virtual router specification to apply.
- {[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.- {[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_ strdate 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
Virtual
Router Spec Args The virtual router specification to apply.
- 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.- 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.
- created
Date String The creation date of the virtual router.
- last
Updated StringDate The last update date of the virtual router.
- mesh
Name String The name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.
- mesh
Owner 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.
- resource
Owner String The resource owner's AWS account ID.
- spec Property Map
The virtual router specification to apply.
- 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.- Map<String>
A map of tags assigned to the resource, including those inherited from the provider .
Supporting Types
VirtualRouterSpec
- Listener
Virtual
Router Spec Listener The listeners that the virtual router is expected to receive inbound traffic from. Currently only one listener is supported per virtual router.
- Listener
Virtual
Router Spec Listener The listeners that the virtual router is expected to receive inbound traffic from. Currently only one listener is supported per virtual router.
- listener
Virtual
Router Spec Listener The listeners that the virtual router is expected to receive inbound traffic from. Currently only one listener is supported per virtual router.
- listener
Virtual
Router Spec Listener The listeners that the virtual router is expected to receive inbound traffic from. Currently only one listener is supported per virtual router.
- listener
Virtual
Router Spec Listener 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
- Port
Mapping VirtualRouter Spec Listener Port Mapping The port mapping information for the listener.
- Port
Mapping VirtualRouter Spec Listener Port Mapping The port mapping information for the listener.
- port
Mapping VirtualRouter Spec Listener Port Mapping The port mapping information for the listener.
- port
Mapping VirtualRouter Spec Listener Port Mapping The port mapping information for the listener.
- port_
mapping VirtualRouter Spec Listener Port Mapping The port mapping information for the listener.
- port
Mapping Property Map The port mapping information for the listener.
VirtualRouterSpecListenerPortMapping
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.