aws.vpc.RouteServerVpcAssociation
Explore with Pulumi AI
Provides a resource for managing association between VPC (Virtual Private Cloud) route server and a VPC.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.vpc.RouteServerVpcAssociation("example", {
routeServerId: exampleAwsVpcRouteServer.routeServerId,
vpcId: exampleAwsVpc.id,
});
import pulumi
import pulumi_aws as aws
example = aws.vpc.RouteServerVpcAssociation("example",
route_server_id=example_aws_vpc_route_server["routeServerId"],
vpc_id=example_aws_vpc["id"])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vpc.NewRouteServerVpcAssociation(ctx, "example", &vpc.RouteServerVpcAssociationArgs{
RouteServerId: pulumi.Any(exampleAwsVpcRouteServer.RouteServerId),
VpcId: pulumi.Any(exampleAwsVpc.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Vpc.RouteServerVpcAssociation("example", new()
{
RouteServerId = exampleAwsVpcRouteServer.RouteServerId,
VpcId = exampleAwsVpc.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpc.RouteServerVpcAssociation;
import com.pulumi.aws.vpc.RouteServerVpcAssociationArgs;
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 example = new RouteServerVpcAssociation("example", RouteServerVpcAssociationArgs.builder()
.routeServerId(exampleAwsVpcRouteServer.routeServerId())
.vpcId(exampleAwsVpc.id())
.build());
}
}
resources:
example:
type: aws:vpc:RouteServerVpcAssociation
properties:
routeServerId: ${exampleAwsVpcRouteServer.routeServerId}
vpcId: ${exampleAwsVpc.id}
Create RouteServerVpcAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RouteServerVpcAssociation(name: string, args: RouteServerVpcAssociationArgs, opts?: CustomResourceOptions);
@overload
def RouteServerVpcAssociation(resource_name: str,
args: RouteServerVpcAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RouteServerVpcAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
route_server_id: Optional[str] = None,
vpc_id: Optional[str] = None,
timeouts: Optional[RouteServerVpcAssociationTimeoutsArgs] = None)
func NewRouteServerVpcAssociation(ctx *Context, name string, args RouteServerVpcAssociationArgs, opts ...ResourceOption) (*RouteServerVpcAssociation, error)
public RouteServerVpcAssociation(string name, RouteServerVpcAssociationArgs args, CustomResourceOptions? opts = null)
public RouteServerVpcAssociation(String name, RouteServerVpcAssociationArgs args)
public RouteServerVpcAssociation(String name, RouteServerVpcAssociationArgs args, CustomResourceOptions options)
type: aws:vpc:RouteServerVpcAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RouteServerVpcAssociationArgs
- 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 RouteServerVpcAssociationArgs
- 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 RouteServerVpcAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteServerVpcAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RouteServerVpcAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var routeServerVpcAssociationResource = new Aws.Vpc.RouteServerVpcAssociation("routeServerVpcAssociationResource", new()
{
RouteServerId = "string",
VpcId = "string",
Timeouts = new Aws.Vpc.Inputs.RouteServerVpcAssociationTimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := vpc.NewRouteServerVpcAssociation(ctx, "routeServerVpcAssociationResource", &vpc.RouteServerVpcAssociationArgs{
RouteServerId: pulumi.String("string"),
VpcId: pulumi.String("string"),
Timeouts: &vpc.RouteServerVpcAssociationTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
var routeServerVpcAssociationResource = new RouteServerVpcAssociation("routeServerVpcAssociationResource", RouteServerVpcAssociationArgs.builder()
.routeServerId("string")
.vpcId("string")
.timeouts(RouteServerVpcAssociationTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
route_server_vpc_association_resource = aws.vpc.RouteServerVpcAssociation("routeServerVpcAssociationResource",
route_server_id="string",
vpc_id="string",
timeouts={
"create": "string",
"delete": "string",
})
const routeServerVpcAssociationResource = new aws.vpc.RouteServerVpcAssociation("routeServerVpcAssociationResource", {
routeServerId: "string",
vpcId: "string",
timeouts: {
create: "string",
"delete": "string",
},
});
type: aws:vpc:RouteServerVpcAssociation
properties:
routeServerId: string
timeouts:
create: string
delete: string
vpcId: string
RouteServerVpcAssociation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RouteServerVpcAssociation resource accepts the following input properties:
- Route
Server stringId - The unique identifier for the route server to be associated.
- Vpc
Id string - The ID of the VPC to associate with the route server.
- Timeouts
Route
Server Vpc Association Timeouts
- Route
Server stringId - The unique identifier for the route server to be associated.
- Vpc
Id string - The ID of the VPC to associate with the route server.
- Timeouts
Route
Server Vpc Association Timeouts Args
- route
Server StringId - The unique identifier for the route server to be associated.
- vpc
Id String - The ID of the VPC to associate with the route server.
- timeouts
Route
Server Vpc Association Timeouts
- route
Server stringId - The unique identifier for the route server to be associated.
- vpc
Id string - The ID of the VPC to associate with the route server.
- timeouts
Route
Server Vpc Association Timeouts
- route_
server_ strid - The unique identifier for the route server to be associated.
- vpc_
id str - The ID of the VPC to associate with the route server.
- timeouts
Route
Server Vpc Association Timeouts Args
- route
Server StringId - The unique identifier for the route server to be associated.
- vpc
Id String - The ID of the VPC to associate with the route server.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the RouteServerVpcAssociation resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RouteServerVpcAssociation Resource
Get an existing RouteServerVpcAssociation 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?: RouteServerVpcAssociationState, opts?: CustomResourceOptions): RouteServerVpcAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
route_server_id: Optional[str] = None,
timeouts: Optional[RouteServerVpcAssociationTimeoutsArgs] = None,
vpc_id: Optional[str] = None) -> RouteServerVpcAssociation
func GetRouteServerVpcAssociation(ctx *Context, name string, id IDInput, state *RouteServerVpcAssociationState, opts ...ResourceOption) (*RouteServerVpcAssociation, error)
public static RouteServerVpcAssociation Get(string name, Input<string> id, RouteServerVpcAssociationState? state, CustomResourceOptions? opts = null)
public static RouteServerVpcAssociation get(String name, Output<String> id, RouteServerVpcAssociationState state, CustomResourceOptions options)
resources: _: type: aws:vpc:RouteServerVpcAssociation get: id: ${id}
- 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.
- Route
Server stringId - The unique identifier for the route server to be associated.
- Timeouts
Route
Server Vpc Association Timeouts - Vpc
Id string - The ID of the VPC to associate with the route server.
- Route
Server stringId - The unique identifier for the route server to be associated.
- Timeouts
Route
Server Vpc Association Timeouts Args - Vpc
Id string - The ID of the VPC to associate with the route server.
- route
Server StringId - The unique identifier for the route server to be associated.
- timeouts
Route
Server Vpc Association Timeouts - vpc
Id String - The ID of the VPC to associate with the route server.
- route
Server stringId - The unique identifier for the route server to be associated.
- timeouts
Route
Server Vpc Association Timeouts - vpc
Id string - The ID of the VPC to associate with the route server.
- route_
server_ strid - The unique identifier for the route server to be associated.
- timeouts
Route
Server Vpc Association Timeouts Args - vpc_
id str - The ID of the VPC to associate with the route server.
- route
Server StringId - The unique identifier for the route server to be associated.
- timeouts Property Map
- vpc
Id String - The ID of the VPC to associate with the route server.
Supporting Types
RouteServerVpcAssociationTimeouts, RouteServerVpcAssociationTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Import
Using pulumi import
, to to import VPC (Virtual Private Cloud) Route Server Association using the associated resource ID and VPC Id separated by a comma (,). For example:
$ pulumi import aws:vpc/routeServerVpcAssociation:RouteServerVpcAssociation example rs-12345678,vpc-0f001273ec18911b1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.