@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
95 lines • 4.52 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.BgpvpnRouterAssociateV2 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages a V2 BGP VPN router association resource within OpenStack.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const association1 = new openstack.bgpvpn.RouterAssociateV2("association_1", {
* bgpvpnId: "d57d39e1-dc63-44fd-8cbd-a4e1488100c5",
* routerId: "423fa80f-e0d7-4d02-a9a5-8b8c05812bf6",
* });
* ```
*
* ## Import
*
* BGP VPN router associations can be imported using the BGP VPN ID and BGP VPN
*
* router association ID separated by a slash, e.g.:
*
* hcl
*
* ```sh
* $ pulumi import openstack:index/bgpvpnRouterAssociateV2:BgpvpnRouterAssociateV2 association_1 e26d509e-fc2d-4fb5-8562-619911a9a6bc/3cc9df2d-80db-4536-8ba6-295d1d0f723f
* ```
*
* @deprecated openstack.index/bgpvpnrouterassociatev2.BgpvpnRouterAssociateV2 has been deprecated in favor of openstack.bgpvpn/routerassociatev2.RouterAssociateV2
*/
class BgpvpnRouterAssociateV2 extends pulumi.CustomResource {
/**
* Get an existing BgpvpnRouterAssociateV2 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) {
pulumi.log.warn("BgpvpnRouterAssociateV2 is deprecated: openstack.index/bgpvpnrouterassociatev2.BgpvpnRouterAssociateV2 has been deprecated in favor of openstack.bgpvpn/routerassociatev2.RouterAssociateV2");
return new BgpvpnRouterAssociateV2(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of BgpvpnRouterAssociateV2. 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'] === BgpvpnRouterAssociateV2.__pulumiType;
}
/** @deprecated openstack.index/bgpvpnrouterassociatev2.BgpvpnRouterAssociateV2 has been deprecated in favor of openstack.bgpvpn/routerassociatev2.RouterAssociateV2 */
constructor(name, argsOrState, opts) {
pulumi.log.warn("BgpvpnRouterAssociateV2 is deprecated: openstack.index/bgpvpnrouterassociatev2.BgpvpnRouterAssociateV2 has been deprecated in favor of openstack.bgpvpn/routerassociatev2.RouterAssociateV2");
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["advertiseExtraRoutes"] = state?.advertiseExtraRoutes;
resourceInputs["bgpvpnId"] = state?.bgpvpnId;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["region"] = state?.region;
resourceInputs["routerId"] = state?.routerId;
}
else {
const args = argsOrState;
if (args?.bgpvpnId === undefined && !opts.urn) {
throw new Error("Missing required property 'bgpvpnId'");
}
if (args?.routerId === undefined && !opts.urn) {
throw new Error("Missing required property 'routerId'");
}
resourceInputs["advertiseExtraRoutes"] = args?.advertiseExtraRoutes;
resourceInputs["bgpvpnId"] = args?.bgpvpnId;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["region"] = args?.region;
resourceInputs["routerId"] = args?.routerId;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(BgpvpnRouterAssociateV2.__pulumiType, name, resourceInputs, opts);
}
}
exports.BgpvpnRouterAssociateV2 = BgpvpnRouterAssociateV2;
/** @internal */
BgpvpnRouterAssociateV2.__pulumiType = 'openstack:index/bgpvpnRouterAssociateV2:BgpvpnRouterAssociateV2';
//# sourceMappingURL=bgpvpnRouterAssociateV2.js.map