@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
92 lines • 4.43 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.LocalGatewayRouteTableVpcAssociation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an EC2 Local Gateway Route Table VPC Association. More information can be found in the [Outposts User Guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-local-gateways.html#vpc-associations).
*
* ## Example Usage
*
* ```typescript
* 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
*
* Using `pulumi import`, import `aws_ec2_local_gateway_route_table_vpc_association` using the Local Gateway Route Table VPC Association identifier. For example:
*
* ```sh
* $ pulumi import aws:ec2/localGatewayRouteTableVpcAssociation:LocalGatewayRouteTableVpcAssociation example lgw-vpc-assoc-1234567890abcdef
* ```
*/
class LocalGatewayRouteTableVpcAssociation extends pulumi.CustomResource {
/**
* Get an existing LocalGatewayRouteTableVpcAssociation resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new LocalGatewayRouteTableVpcAssociation(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of LocalGatewayRouteTableVpcAssociation. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === LocalGatewayRouteTableVpcAssociation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["localGatewayId"] = state?.localGatewayId;
resourceInputs["localGatewayRouteTableId"] = state?.localGatewayRouteTableId;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["vpcId"] = state?.vpcId;
}
else {
const args = argsOrState;
if (args?.localGatewayRouteTableId === undefined && !opts.urn) {
throw new Error("Missing required property 'localGatewayRouteTableId'");
}
if (args?.vpcId === undefined && !opts.urn) {
throw new Error("Missing required property 'vpcId'");
}
resourceInputs["localGatewayRouteTableId"] = args?.localGatewayRouteTableId;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["vpcId"] = args?.vpcId;
resourceInputs["localGatewayId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(LocalGatewayRouteTableVpcAssociation.__pulumiType, name, resourceInputs, opts);
}
}
exports.LocalGatewayRouteTableVpcAssociation = LocalGatewayRouteTableVpcAssociation;
/** @internal */
LocalGatewayRouteTableVpcAssociation.__pulumiType = 'aws:ec2/localGatewayRouteTableVpcAssociation:LocalGatewayRouteTableVpcAssociation';
//# sourceMappingURL=localGatewayRouteTableVpcAssociation.js.map