Try AWS Native preview for resources not in the classic version.
aws.ec2.LocalGatewayRouteTableVpcAssociation
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Manages an EC2 Local Gateway Route Table VPC Association. More information can be found in the Outposts User Guide.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2.getLocalGatewayRouteTable({
outpostArn: "arn:aws:outposts:us-west-2:123456789012:outpost/op-1234567890abcdef",
});
const exampleVpc = new aws.ec2.Vpc("example", {cidrBlock: "10.0.0.0/16"});
const exampleLocalGatewayRouteTableVpcAssociation = new aws.ec2.LocalGatewayRouteTableVpcAssociation("example", {
localGatewayRouteTableId: example.then(example => example.id),
vpcId: exampleVpc.id,
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.get_local_gateway_route_table(outpost_arn="arn:aws:outposts:us-west-2:123456789012:outpost/op-1234567890abcdef")
example_vpc = aws.ec2.Vpc("example", cidr_block="10.0.0.0/16")
example_local_gateway_route_table_vpc_association = aws.ec2.LocalGatewayRouteTableVpcAssociation("example",
local_gateway_route_table_id=example.id,
vpc_id=example_vpc.id)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ec2.GetLocalGatewayRouteTable(ctx, &ec2.GetLocalGatewayRouteTableArgs{
OutpostArn: pulumi.StringRef("arn:aws:outposts:us-west-2:123456789012:outpost/op-1234567890abcdef"),
}, nil)
if err != nil {
return err
}
exampleVpc, err := ec2.NewVpc(ctx, "example", &ec2.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
_, err = ec2.NewLocalGatewayRouteTableVpcAssociation(ctx, "example", &ec2.LocalGatewayRouteTableVpcAssociationArgs{
LocalGatewayRouteTableId: pulumi.String(example.Id),
VpcId: exampleVpc.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 = Aws.Ec2.GetLocalGatewayRouteTable.Invoke(new()
{
OutpostArn = "arn:aws:outposts:us-west-2:123456789012:outpost/op-1234567890abcdef",
});
var exampleVpc = new Aws.Ec2.Vpc("example", new()
{
CidrBlock = "10.0.0.0/16",
});
var exampleLocalGatewayRouteTableVpcAssociation = new Aws.Ec2.LocalGatewayRouteTableVpcAssociation("example", new()
{
LocalGatewayRouteTableId = example.Apply(getLocalGatewayRouteTableResult => getLocalGatewayRouteTableResult.Id),
VpcId = exampleVpc.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetLocalGatewayRouteTableArgs;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.ec2.LocalGatewayRouteTableVpcAssociation;
import com.pulumi.aws.ec2.LocalGatewayRouteTableVpcAssociationArgs;
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) {
final var example = Ec2Functions.getLocalGatewayRouteTable(GetLocalGatewayRouteTableArgs.builder()
.outpostArn("arn:aws:outposts:us-west-2:123456789012:outpost/op-1234567890abcdef")
.build());
var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
var exampleLocalGatewayRouteTableVpcAssociation = new LocalGatewayRouteTableVpcAssociation("exampleLocalGatewayRouteTableVpcAssociation", LocalGatewayRouteTableVpcAssociationArgs.builder()
.localGatewayRouteTableId(example.applyValue(getLocalGatewayRouteTableResult -> getLocalGatewayRouteTableResult.id()))
.vpcId(exampleVpc.id())
.build());
}
}
resources:
exampleVpc:
type: aws:ec2:Vpc
name: example
properties:
cidrBlock: 10.0.0.0/16
exampleLocalGatewayRouteTableVpcAssociation:
type: aws:ec2:LocalGatewayRouteTableVpcAssociation
name: example
properties:
localGatewayRouteTableId: ${example.id}
vpcId: ${exampleVpc.id}
variables:
example:
fn::invoke:
Function: aws:ec2:getLocalGatewayRouteTable
Arguments:
outpostArn: arn:aws:outposts:us-west-2:123456789012:outpost/op-1234567890abcdef
Create LocalGatewayRouteTableVpcAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LocalGatewayRouteTableVpcAssociation(name: string, args: LocalGatewayRouteTableVpcAssociationArgs, opts?: CustomResourceOptions);
@overload
def LocalGatewayRouteTableVpcAssociation(resource_name: str,
args: LocalGatewayRouteTableVpcAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LocalGatewayRouteTableVpcAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
local_gateway_route_table_id: Optional[str] = None,
vpc_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewLocalGatewayRouteTableVpcAssociation(ctx *Context, name string, args LocalGatewayRouteTableVpcAssociationArgs, opts ...ResourceOption) (*LocalGatewayRouteTableVpcAssociation, error)
public LocalGatewayRouteTableVpcAssociation(string name, LocalGatewayRouteTableVpcAssociationArgs args, CustomResourceOptions? opts = null)
public LocalGatewayRouteTableVpcAssociation(String name, LocalGatewayRouteTableVpcAssociationArgs args)
public LocalGatewayRouteTableVpcAssociation(String name, LocalGatewayRouteTableVpcAssociationArgs args, CustomResourceOptions options)
type: aws:ec2:LocalGatewayRouteTableVpcAssociation
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 LocalGatewayRouteTableVpcAssociationArgs
- 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 LocalGatewayRouteTableVpcAssociationArgs
- 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 LocalGatewayRouteTableVpcAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LocalGatewayRouteTableVpcAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LocalGatewayRouteTableVpcAssociationArgs
- 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 localGatewayRouteTableVpcAssociationResource = new Aws.Ec2.LocalGatewayRouteTableVpcAssociation("localGatewayRouteTableVpcAssociationResource", new()
{
LocalGatewayRouteTableId = "string",
VpcId = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := ec2.NewLocalGatewayRouteTableVpcAssociation(ctx, "localGatewayRouteTableVpcAssociationResource", &ec2.LocalGatewayRouteTableVpcAssociationArgs{
LocalGatewayRouteTableId: pulumi.String("string"),
VpcId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var localGatewayRouteTableVpcAssociationResource = new LocalGatewayRouteTableVpcAssociation("localGatewayRouteTableVpcAssociationResource", LocalGatewayRouteTableVpcAssociationArgs.builder()
.localGatewayRouteTableId("string")
.vpcId("string")
.tags(Map.of("string", "string"))
.build());
local_gateway_route_table_vpc_association_resource = aws.ec2.LocalGatewayRouteTableVpcAssociation("localGatewayRouteTableVpcAssociationResource",
local_gateway_route_table_id="string",
vpc_id="string",
tags={
"string": "string",
})
const localGatewayRouteTableVpcAssociationResource = new aws.ec2.LocalGatewayRouteTableVpcAssociation("localGatewayRouteTableVpcAssociationResource", {
localGatewayRouteTableId: "string",
vpcId: "string",
tags: {
string: "string",
},
});
type: aws:ec2:LocalGatewayRouteTableVpcAssociation
properties:
localGatewayRouteTableId: string
tags:
string: string
vpcId: string
LocalGatewayRouteTableVpcAssociation 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 LocalGatewayRouteTableVpcAssociation resource accepts the following input properties:
- Local
Gateway stringRoute Table Id - Identifier of EC2 Local Gateway Route Table.
- Vpc
Id string Identifier of EC2 VPC.
The following arguments are optional:
- Dictionary<string, string>
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Local
Gateway stringRoute Table Id - Identifier of EC2 Local Gateway Route Table.
- Vpc
Id string Identifier of EC2 VPC.
The following arguments are optional:
- map[string]string
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- local
Gateway StringRoute Table Id - Identifier of EC2 Local Gateway Route Table.
- vpc
Id String Identifier of EC2 VPC.
The following arguments are optional:
- Map<String,String>
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- local
Gateway stringRoute Table Id - Identifier of EC2 Local Gateway Route Table.
- vpc
Id string Identifier of EC2 VPC.
The following arguments are optional:
- {[key: string]: string}
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- local_
gateway_ strroute_ table_ id - Identifier of EC2 Local Gateway Route Table.
- vpc_
id str Identifier of EC2 VPC.
The following arguments are optional:
- Mapping[str, str]
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- local
Gateway StringRoute Table Id - Identifier of EC2 Local Gateway Route Table.
- vpc
Id String Identifier of EC2 VPC.
The following arguments are optional:
- Map<String>
- Key-value map of resource tags. 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 LocalGatewayRouteTableVpcAssociation resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Local
Gateway stringId - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Id string
- The provider-assigned unique ID for this managed resource.
- Local
Gateway stringId - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id String
- The provider-assigned unique ID for this managed resource.
- local
Gateway StringId - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id string
- The provider-assigned unique ID for this managed resource.
- local
Gateway stringId - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id str
- The provider-assigned unique ID for this managed resource.
- local_
gateway_ strid - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id String
- The provider-assigned unique ID for this managed resource.
- local
Gateway StringId - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Look up Existing LocalGatewayRouteTableVpcAssociation Resource
Get an existing LocalGatewayRouteTableVpcAssociation 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?: LocalGatewayRouteTableVpcAssociationState, opts?: CustomResourceOptions): LocalGatewayRouteTableVpcAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
local_gateway_id: Optional[str] = None,
local_gateway_route_table_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
vpc_id: Optional[str] = None) -> LocalGatewayRouteTableVpcAssociation
func GetLocalGatewayRouteTableVpcAssociation(ctx *Context, name string, id IDInput, state *LocalGatewayRouteTableVpcAssociationState, opts ...ResourceOption) (*LocalGatewayRouteTableVpcAssociation, error)
public static LocalGatewayRouteTableVpcAssociation Get(string name, Input<string> id, LocalGatewayRouteTableVpcAssociationState? state, CustomResourceOptions? opts = null)
public static LocalGatewayRouteTableVpcAssociation get(String name, Output<String> id, LocalGatewayRouteTableVpcAssociationState 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.
- Local
Gateway stringId - Local
Gateway stringRoute Table Id - Identifier of EC2 Local Gateway Route Table.
- Dictionary<string, string>
- Key-value map of resource tags. 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
default_tags
configuration block. - Vpc
Id string Identifier of EC2 VPC.
The following arguments are optional:
- Local
Gateway stringId - Local
Gateway stringRoute Table Id - Identifier of EC2 Local Gateway Route Table.
- map[string]string
- Key-value map of resource tags. 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
default_tags
configuration block. - Vpc
Id string Identifier of EC2 VPC.
The following arguments are optional:
- local
Gateway StringId - local
Gateway StringRoute Table Id - Identifier of EC2 Local Gateway Route Table.
- Map<String,String>
- Key-value map of resource tags. 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
default_tags
configuration block. - vpc
Id String Identifier of EC2 VPC.
The following arguments are optional:
- local
Gateway stringId - local
Gateway stringRoute Table Id - Identifier of EC2 Local Gateway Route Table.
- {[key: string]: string}
- Key-value map of resource tags. 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
default_tags
configuration block. - vpc
Id string Identifier of EC2 VPC.
The following arguments are optional:
- local_
gateway_ strid - local_
gateway_ strroute_ table_ id - Identifier of EC2 Local Gateway Route Table.
- Mapping[str, str]
- Key-value map of resource tags. 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
default_tags
configuration block. - vpc_
id str Identifier of EC2 VPC.
The following arguments are optional:
- local
Gateway StringId - local
Gateway StringRoute Table Id - Identifier of EC2 Local Gateway Route Table.
- Map<String>
- Key-value map of resource tags. 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
default_tags
configuration block. - vpc
Id String Identifier of EC2 VPC.
The following arguments are optional:
Import
Using pulumi import
, import aws_ec2_local_gateway_route_table_vpc_association
using the Local Gateway Route Table VPC Association identifier. For example:
$ pulumi import aws:ec2/localGatewayRouteTableVpcAssociation:LocalGatewayRouteTableVpcAssociation example lgw-vpc-assoc-1234567890abcdef
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.
Try AWS Native preview for resources not in the classic version.