@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
148 lines • 6.22 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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.IpamIpReverseDns = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
* Manage the reverse DNS of IP addresses managed by Scaleway's IP Address Management (IPAM) service.
*
* For more information about IPAM, see the main [documentation](https://www.scaleway.com/en/docs/vpc/concepts/#ipam).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
* import * as std from "@pulumi/std";
*
* const ip01 = new scaleway.instance.Ip("ip01", {type: "routed_ipv6"});
* const srv01 = new scaleway.instance.Server("srv01", {
* name: "tf-tests-instance-server-ips",
* ipIds: [ip01.id],
* image: "ubuntu_jammy",
* type: "PRO2-XXS",
* state: "stopped",
* });
* const ipam01 = scaleway.ipam.getIpOutput({
* resource: {
* id: srv01.id,
* type: "instance_server",
* },
* type: "ipv6",
* });
* const tfAAAA = new scaleway.domain.Record("tf_AAAA", {
* dnsZone: "example.com",
* name: "",
* type: "AAAA",
* data: std.cidrhost({
* input: ipam01.apply(ipam01 => ipam01.addressCidr),
* host: 42,
* }).result,
* ttl: 3600,
* priority: 1,
* });
* const base = new scaleway.ipam.IpReverseDns("base", {
* ipamIpId: ipam01.apply(ipam01 => ipam01.id),
* hostname: "example.com",
* address: std.cidrhost({
* input: ipam01.apply(ipam01 => ipam01.addressCidr),
* host: 42,
* }).result,
* });
* ```
*
* ## Import
*
* IPAM IP reverse DNS can be imported using `{region}/{id}`, e.g.
*
* ```sh
* $ pulumi import scaleway:index/ipamIpReverseDns:IpamIpReverseDns main fr-par/11111111-1111-1111-1111-111111111111
* ```
*
* @deprecated scaleway.index/ipamipreversedns.IpamIpReverseDns has been deprecated in favor of scaleway.ipam/ipreversedns.IpReverseDns
*/
class IpamIpReverseDns extends pulumi.CustomResource {
/**
* Get an existing IpamIpReverseDns 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("IpamIpReverseDns is deprecated: scaleway.index/ipamipreversedns.IpamIpReverseDns has been deprecated in favor of scaleway.ipam/ipreversedns.IpReverseDns");
return new IpamIpReverseDns(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'scaleway:index/ipamIpReverseDns:IpamIpReverseDns';
/**
* Returns true if the given object is an instance of IpamIpReverseDns. 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'] === IpamIpReverseDns.__pulumiType;
}
/** @deprecated scaleway.index/ipamipreversedns.IpamIpReverseDns has been deprecated in favor of scaleway.ipam/ipreversedns.IpReverseDns */
constructor(name, argsOrState, opts) {
pulumi.log.warn("IpamIpReverseDns is deprecated: scaleway.index/ipamipreversedns.IpamIpReverseDns has been deprecated in favor of scaleway.ipam/ipreversedns.IpReverseDns");
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["address"] = state?.address;
resourceInputs["hostname"] = state?.hostname;
resourceInputs["ipamIpId"] = state?.ipamIpId;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.address === undefined && !opts.urn) {
throw new Error("Missing required property 'address'");
}
if (args?.hostname === undefined && !opts.urn) {
throw new Error("Missing required property 'hostname'");
}
if (args?.ipamIpId === undefined && !opts.urn) {
throw new Error("Missing required property 'ipamIpId'");
}
resourceInputs["address"] = args?.address;
resourceInputs["hostname"] = args?.hostname;
resourceInputs["ipamIpId"] = args?.ipamIpId;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(IpamIpReverseDns.__pulumiType, name, resourceInputs, opts);
}
}
exports.IpamIpReverseDns = IpamIpReverseDns;
//# sourceMappingURL=ipamIpReverseDns.js.map