@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
96 lines • 4.13 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.PublicGatewayIpReverseDns = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages Scaleway Public Gateway public (flexible) IPs' reverse DNS.
* For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/public-gateway/#path-ips-list-ips).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.network.PublicGatewayIp("main", {});
* const tfA = new scaleway.domain.Record("tf_A", {
* dnsZone: "example.com",
* name: "tf",
* type: "A",
* data: main.address,
* ttl: 3600,
* priority: 1,
* });
* const mainPublicGatewayIpReverseDns = new scaleway.network.PublicGatewayIpReverseDns("main", {
* gatewayIpId: main.id,
* reverse: "tf.example.com",
* });
* ```
*
* ## Import
*
* Public Gateway IP reverse DNS can be imported using `{zone}/{id}`, e.g.
*
* bash
*
* ```sh
* $ pulumi import scaleway:network/publicGatewayIpReverseDns:PublicGatewayIpReverseDns reverse fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*/
class PublicGatewayIpReverseDns extends pulumi.CustomResource {
/**
* Get an existing PublicGatewayIpReverseDns 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 PublicGatewayIpReverseDns(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of PublicGatewayIpReverseDns. 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'] === PublicGatewayIpReverseDns.__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);
const aliasOpts = { aliases: [{ type: "scaleway:index/vpcPublicGatewayIpReverseDns:VpcPublicGatewayIpReverseDns" }] };
opts = pulumi.mergeOptions(opts, aliasOpts);
super(PublicGatewayIpReverseDns.__pulumiType, name, resourceInputs, opts);
}
}
exports.PublicGatewayIpReverseDns = PublicGatewayIpReverseDns;
/** @internal */
PublicGatewayIpReverseDns.__pulumiType = 'scaleway:network/publicGatewayIpReverseDns:PublicGatewayIpReverseDns';
//# sourceMappingURL=publicGatewayIpReverseDns.js.map