@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
78 lines • 3.38 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.VpnGatewayRoutePropagation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Requests automatic route propagation between a VPN gateway and a route table.
*
* > **Note:** This resource should not be used with a route table that has
* the `propagatingVgws` argument set. If that argument is set, any route
* propagation not explicitly listed in its value will be removed.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.ec2.VpnGatewayRoutePropagation("example", {
* vpnGatewayId: exampleAwsVpnGateway.id,
* routeTableId: exampleAwsRouteTable.id,
* });
* ```
*/
class VpnGatewayRoutePropagation extends pulumi.CustomResource {
/**
* Get an existing VpnGatewayRoutePropagation 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 VpnGatewayRoutePropagation(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of VpnGatewayRoutePropagation. 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'] === VpnGatewayRoutePropagation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["region"] = state?.region;
resourceInputs["routeTableId"] = state?.routeTableId;
resourceInputs["vpnGatewayId"] = state?.vpnGatewayId;
}
else {
const args = argsOrState;
if (args?.routeTableId === undefined && !opts.urn) {
throw new Error("Missing required property 'routeTableId'");
}
if (args?.vpnGatewayId === undefined && !opts.urn) {
throw new Error("Missing required property 'vpnGatewayId'");
}
resourceInputs["region"] = args?.region;
resourceInputs["routeTableId"] = args?.routeTableId;
resourceInputs["vpnGatewayId"] = args?.vpnGatewayId;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VpnGatewayRoutePropagation.__pulumiType, name, resourceInputs, opts);
}
}
exports.VpnGatewayRoutePropagation = VpnGatewayRoutePropagation;
/** @internal */
VpnGatewayRoutePropagation.__pulumiType = 'aws:ec2/vpnGatewayRoutePropagation:VpnGatewayRoutePropagation';
//# sourceMappingURL=vpnGatewayRoutePropagation.js.map