@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
105 lines • 4.85 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.LoadbalancerIp = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Creates and manages Scaleway Load Balancer IP addresses.
*
* For more information, see the [main documentation](https://www.scaleway.com/en/docs/load-balancer/how-to/create-manage-flex-ips/) or [API documentation](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-ip-addresses-list-ip-addresses).
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const ip = new scaleway.loadbalancers.Ip("ip", {reverse: "my-reverse.com"});
* ```
*
* ### With IPv6
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const ipv6 = new scaleway.loadbalancers.Ip("ipv6", {isIpv6: true});
* ```
*
* ## Import
*
* IPs can be imported using `{zone}/{id}`, e.g.
*
* bash
*
* ```sh
* $ pulumi import scaleway:index/loadbalancerIp:LoadbalancerIp ip01 fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*
* @deprecated scaleway.index/loadbalancerip.LoadbalancerIp has been deprecated in favor of scaleway.loadbalancers/ip.Ip
*/
class LoadbalancerIp extends pulumi.CustomResource {
/**
* Get an existing LoadbalancerIp 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("LoadbalancerIp is deprecated: scaleway.index/loadbalancerip.LoadbalancerIp has been deprecated in favor of scaleway.loadbalancers/ip.Ip");
return new LoadbalancerIp(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of LoadbalancerIp. 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'] === LoadbalancerIp.__pulumiType;
}
/** @deprecated scaleway.index/loadbalancerip.LoadbalancerIp has been deprecated in favor of scaleway.loadbalancers/ip.Ip */
constructor(name, argsOrState, opts) {
pulumi.log.warn("LoadbalancerIp is deprecated: scaleway.index/loadbalancerip.LoadbalancerIp has been deprecated in favor of scaleway.loadbalancers/ip.Ip");
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["ipAddress"] = state ? state.ipAddress : undefined;
resourceInputs["isIpv6"] = state ? state.isIpv6 : undefined;
resourceInputs["lbId"] = state ? state.lbId : undefined;
resourceInputs["organizationId"] = state ? state.organizationId : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["reverse"] = state ? state.reverse : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["zone"] = state ? state.zone : undefined;
}
else {
const args = argsOrState;
resourceInputs["isIpv6"] = args ? args.isIpv6 : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
resourceInputs["reverse"] = args ? args.reverse : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["zone"] = args ? args.zone : undefined;
resourceInputs["ipAddress"] = undefined /*out*/;
resourceInputs["lbId"] = undefined /*out*/;
resourceInputs["organizationId"] = undefined /*out*/;
resourceInputs["region"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(LoadbalancerIp.__pulumiType, name, resourceInputs, opts);
}
}
exports.LoadbalancerIp = LoadbalancerIp;
/** @internal */
LoadbalancerIp.__pulumiType = 'scaleway:index/loadbalancerIp:LoadbalancerIp';
//# sourceMappingURL=loadbalancerIp.js.map