@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
239 lines (238 loc) • 7.12 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Creates and manages Scaleway flexible IPs.
* For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/elastic-metal-flexible-ip).
*
* > **Note:**
* Flexible IPs are exclusively available for Elastic Metal (bare metal) servers. They are not compatible with other Scaleway products.
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.elasticmetal.Ip("main", {reverse: "my-reverse.com"});
* ```
*
* ### With zone
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.elasticmetal.Ip("main", {zone: "fr-par-2"});
* ```
*
* ### With IPv6
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.elasticmetal.Ip("main", {isIpv6: true});
* ```
*
* ### With baremetal server
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.account.SshKey("main", {
* name: "main",
* publicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILHy/M5FVm5ydLGcal3e5LNcfTalbeN7QL/ZGCvDEdqJ foobar@example.com",
* });
* const byId = scaleway.elasticmetal.getOs({
* zone: "fr-par-2",
* name: "Ubuntu",
* version: "20.04 LTS (Focal Fossa)",
* });
* const myOffer = scaleway.elasticmetal.getOffer({
* zone: "fr-par-2",
* name: "EM-A210R-HDD",
* });
* const base = new scaleway.elasticmetal.Server("base", {
* zone: "fr-par-2",
* offer: myOffer.then(myOffer => myOffer.offerId),
* os: byId.then(byId => byId.osId),
* sshKeyIds: main.id,
* });
* const mainIp = new scaleway.elasticmetal.Ip("main", {
* serverId: base.id,
* zone: "fr-par-2",
* });
* ```
*
* ## Import
*
* Flexible IPs can be imported using the `{zone}/{id}`, e.g.
*
* bash
*
* ```sh
* $ pulumi import scaleway:elasticmetal/ip:Ip main fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*/
export declare class Ip extends pulumi.CustomResource {
/**
* Get an existing Ip 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: string, id: pulumi.Input<pulumi.ID>, state?: IpState, opts?: pulumi.CustomResourceOptions): Ip;
/**
* Returns true if the given object is an instance of Ip. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Ip;
/**
* The date and time of the creation of the Flexible IP (Format ISO 8601).
*/
readonly createdAt: pulumi.Output<string>;
/**
* A description of the flexible IP.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The IP address of the Flexible IP.
*/
readonly ipAddress: pulumi.Output<string>;
/**
* Defines whether the flexible IP has an IPv6 address.
*/
readonly isIpv6: pulumi.Output<boolean | undefined>;
/**
* The organization of the Flexible IP.
*/
readonly organizationId: pulumi.Output<string>;
/**
* The project of the Flexible IP.
*/
readonly projectId: pulumi.Output<string>;
/**
* The reverse domain associated with this flexible IP.
*/
readonly reverse: pulumi.Output<string>;
/**
* The ID of the associated server.
*/
readonly serverId: pulumi.Output<string | undefined>;
/**
* The status of the flexible IP.
*/
readonly status: pulumi.Output<string>;
/**
* A list of tags to apply to the flexible IP.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* The date and time of the last update of the Flexible IP (Format ISO 8601).
*/
readonly updatedAt: pulumi.Output<string>;
/**
* `zone`) The zone of the Flexible IP.
*/
readonly zone: pulumi.Output<string>;
/**
* Create a Ip resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: IpArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Ip resources.
*/
export interface IpState {
/**
* The date and time of the creation of the Flexible IP (Format ISO 8601).
*/
createdAt?: pulumi.Input<string>;
/**
* A description of the flexible IP.
*/
description?: pulumi.Input<string>;
/**
* The IP address of the Flexible IP.
*/
ipAddress?: pulumi.Input<string>;
/**
* Defines whether the flexible IP has an IPv6 address.
*/
isIpv6?: pulumi.Input<boolean>;
/**
* The organization of the Flexible IP.
*/
organizationId?: pulumi.Input<string>;
/**
* The project of the Flexible IP.
*/
projectId?: pulumi.Input<string>;
/**
* The reverse domain associated with this flexible IP.
*/
reverse?: pulumi.Input<string>;
/**
* The ID of the associated server.
*/
serverId?: pulumi.Input<string>;
/**
* The status of the flexible IP.
*/
status?: pulumi.Input<string>;
/**
* A list of tags to apply to the flexible IP.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The date and time of the last update of the Flexible IP (Format ISO 8601).
*/
updatedAt?: pulumi.Input<string>;
/**
* `zone`) The zone of the Flexible IP.
*/
zone?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Ip resource.
*/
export interface IpArgs {
/**
* A description of the flexible IP.
*/
description?: pulumi.Input<string>;
/**
* Defines whether the flexible IP has an IPv6 address.
*/
isIpv6?: pulumi.Input<boolean>;
/**
* The project of the Flexible IP.
*/
projectId?: pulumi.Input<string>;
/**
* The reverse domain associated with this flexible IP.
*/
reverse?: pulumi.Input<string>;
/**
* The ID of the associated server.
*/
serverId?: pulumi.Input<string>;
/**
* A list of tags to apply to the flexible IP.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* `zone`) The zone of the Flexible IP.
*/
zone?: pulumi.Input<string>;
}