@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
91 lines • 4.03 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.VpcPublicGatewayIpReverseDns = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages Scaleway VPC Public Gateways IPs reverse DNS.
* For more information, see [the documentation](https://developers.scaleway.com/en/products/vpc-gw/api/v1/#ips-268151).
*
* ## Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const mainVpcPublicGatewayIp = new scaleway.VpcPublicGatewayIp("mainVpcPublicGatewayIp", {});
* const tfA = new scaleway.DomainRecord("tfA", {
* dnsZone: "example.com",
* type: "A",
* data: mainVpcPublicGatewayIp.address,
* ttl: 3600,
* priority: 1,
* });
* const mainVpcPublicGatewayIpReverseDns = new scaleway.VpcPublicGatewayIpReverseDns("mainVpcPublicGatewayIpReverseDns", {
* gatewayIpId: mainVpcPublicGatewayIp.id,
* reverse: "tf.example.com",
* });
* ```
*
* ## Import
*
* Public gateway IPs reverse DNS can be imported using the `{zone}/{id}`, e.g. bash
*
* ```sh
* $ pulumi import scaleway:index/vpcPublicGatewayIpReverseDns:VpcPublicGatewayIpReverseDns main fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*/
class VpcPublicGatewayIpReverseDns extends pulumi.CustomResource {
/**
* Get an existing VpcPublicGatewayIpReverseDns 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 VpcPublicGatewayIpReverseDns(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of VpcPublicGatewayIpReverseDns. 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'] === VpcPublicGatewayIpReverseDns.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["gatewayIpId"] = state ? state.gatewayIpId : undefined;
resourceInputs["reverse"] = state ? state.reverse : undefined;
resourceInputs["zone"] = state ? state.zone : undefined;
}
else {
const args = argsOrState;
if ((!args || args.gatewayIpId === undefined) && !opts.urn) {
throw new Error("Missing required property 'gatewayIpId'");
}
if ((!args || args.reverse === undefined) && !opts.urn) {
throw new Error("Missing required property 'reverse'");
}
resourceInputs["gatewayIpId"] = args ? args.gatewayIpId : undefined;
resourceInputs["reverse"] = args ? args.reverse : undefined;
resourceInputs["zone"] = args ? args.zone : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VpcPublicGatewayIpReverseDns.__pulumiType, name, resourceInputs, opts);
}
}
exports.VpcPublicGatewayIpReverseDns = VpcPublicGatewayIpReverseDns;
/** @internal */
VpcPublicGatewayIpReverseDns.__pulumiType = 'scaleway:index/vpcPublicGatewayIpReverseDns:VpcPublicGatewayIpReverseDns';
//# sourceMappingURL=vpcPublicGatewayIpReverseDns.js.map