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_namesfrom thespecargument. AWS has created aaws.appmesh.VirtualServiceresource for each of service names. These resource can be imported usingimport.Add a
listenerconfiguration block to thespecargument.
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
new VirtualRouter(name: string, args: VirtualRouterArgs, opts?: CustomResourceOptions);def VirtualRouter(resource_name, opts=None, mesh_name=None, name=None, spec=None, tags=None, __props__=None);func NewVirtualRouter(ctx *Context, name string, args VirtualRouterArgs, opts ...ResourceOption) (*VirtualRouter, error)public VirtualRouter(string name, VirtualRouterArgs args, CustomResourceOptions? opts = null)- 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:
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.
- 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.
- 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.
- 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.
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): VirtualRouterstatic 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.
- 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.
- Name string
The name to use for the virtual router.
- Spec
Virtual
Router Spec Args The virtual router specification to apply.
- Dictionary<string, string>
A map of tags to assign to the resource.
- 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.
- Name string
The name to use for the virtual router.
- Spec
Virtual
Router Spec The virtual router specification to apply.
- map[string]string
A map of tags to assign to the resource.
- 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.
- name string
The name to use for the virtual router.
- spec
Virtual
Router Spec The virtual router specification to apply.
- {[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_ 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.
- name str
The name to use for the virtual router.
- spec
Dict[Virtual
Router Spec] The virtual router specification to apply.
- Dict[str, str]
A map of tags to assign to the resource.
Supporting Types
VirtualRouterSpec
- Listener
Virtual
Router Spec Listener Args 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
Dict[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.
VirtualRouterSpecListener
- Port
Mapping VirtualRouter Spec Listener Port Mapping Args 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 Dict[VirtualRouter Spec Listener Port Mapping] The port mapping information for the listener.
VirtualRouterSpecListenerPortMapping
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.