@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
377 lines (376 loc) • 13.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Creates and manages Scaleway Compute Baremetal servers. For more information, see [the documentation](https://developers.scaleway.com/en/products/baremetal/api).
*
* ## Examples
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
* import * as scaleway from "@pulumi/scaleway";
*
* const main = scaleway.getAccountSshKey({
* name: "main",
* });
* const base = new scaleway.BaremetalServer("base", {
* zone: "fr-par-2",
* offer: "GP-BM1-S",
* os: "d17d6872-0412-45d9-a198-af82c34d3c5c",
* sshKeyIds: [main.then(main => main.id)],
* });
* ```
*
* ### Without install config
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
* import * as scaleway from "@pulumi/scaleway";
*
* const myOffer = scaleway.getBaremetalOffer({
* zone: "fr-par-2",
* name: "EM-B112X-SSD",
* });
* const base = new scaleway.BaremetalServer("base", {
* zone: "fr-par-2",
* offer: myOffer.then(myOffer => myOffer.offerId),
* installConfigAfterward: true,
* });
* ```
*
* ## Import
*
* Baremetal servers can be imported using the `{zone}/{id}`, e.g. bash
*
* ```sh
* $ pulumi import scaleway:index/baremetalServer:BaremetalServer web fr-par-2/11111111-1111-1111-1111-111111111111
* ```
*/
export declare class BaremetalServer extends pulumi.CustomResource {
/**
* Get an existing BaremetalServer 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?: BaremetalServerState, opts?: pulumi.CustomResourceOptions): BaremetalServer;
/**
* Returns true if the given object is an instance of BaremetalServer. 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 BaremetalServer;
/**
* A description for the server.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The domain of the server.
*/
readonly domain: pulumi.Output<string>;
/**
* The hostname of the server.
*/
readonly hostname: pulumi.Output<string | undefined>;
/**
* If True, this boolean allows to create a server without the install config if you want to provide it later.
*/
readonly installConfigAfterward: pulumi.Output<boolean | undefined>;
/**
* (List of) The IPs of the server.
*/
readonly ips: pulumi.Output<outputs.BaremetalServerIp[]>;
/**
* (List of) The IPv4 addresses of the server.
*/
readonly ipv4s: pulumi.Output<outputs.BaremetalServerIpv4[]>;
/**
* (List of) The IPv6 addresses of the server.
*/
readonly ipv6s: pulumi.Output<outputs.BaremetalServerIpv6[]>;
/**
* The name of the server.
*/
readonly name: pulumi.Output<string>;
/**
* The offer name or UUID of the baremetal server.
* Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-334154) to find the right offer.
*
* > **Important:** Updates to `offer` will recreate the server.
*/
readonly offer: pulumi.Output<string>;
/**
* The ID of the offer.
*/
readonly offerId: pulumi.Output<string>;
/**
* The name of the offer.
*/
readonly offerName: pulumi.Output<string>;
/**
* The options to enable on the server.
* > The `options` block supports:
*/
readonly options: pulumi.Output<outputs.BaremetalServerOption[] | undefined>;
/**
* The organization ID the server is associated with.
*/
readonly organizationId: pulumi.Output<string>;
/**
* The UUID of the os to install on the server.
* Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-87598a) to find the right OS ID.
* > **Important:** Updates to `os` will reinstall the server.
*/
readonly os: pulumi.Output<string | undefined>;
/**
* The name of the os.
*/
readonly osName: pulumi.Output<string>;
/**
* Password used for the installation. May be required depending on used os.
*/
readonly password: pulumi.Output<string | undefined>;
/**
* The private networks to attach to the server. For more information, see [the documentation](https://www.scaleway.com/en/docs/compute/elastic-metal/how-to/use-private-networks/)
*/
readonly privateNetworks: pulumi.Output<outputs.BaremetalServerPrivateNetwork[] | undefined>;
/**
* `projectId`) The ID of the project the server is associated with.
*/
readonly projectId: pulumi.Output<string>;
/**
* If True, this boolean allows to reinstall the server on install config changes.
* > **Important:** Updates to `sshKeyIds`, `user`, `password`, `serviceUser` or `servicePassword` will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.
*/
readonly reinstallOnConfigChanges: pulumi.Output<boolean | undefined>;
/**
* Password used for the service to install. May be required depending on used os.
*/
readonly servicePassword: pulumi.Output<string | undefined>;
/**
* User used for the service to install.
*/
readonly serviceUser: pulumi.Output<string>;
/**
* List of SSH keys allowed to connect to the server.
*/
readonly sshKeyIds: pulumi.Output<string[] | undefined>;
/**
* The tags associated with the server.
*/
readonly tags: pulumi.Output<string[]>;
/**
* User used for the installation.
*/
readonly user: pulumi.Output<string>;
/**
* `zone`) The zone in which the server should be created.
*/
readonly zone: pulumi.Output<string>;
/**
* Create a BaremetalServer 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: BaremetalServerArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering BaremetalServer resources.
*/
export interface BaremetalServerState {
/**
* A description for the server.
*/
description?: pulumi.Input<string>;
/**
* The domain of the server.
*/
domain?: pulumi.Input<string>;
/**
* The hostname of the server.
*/
hostname?: pulumi.Input<string>;
/**
* If True, this boolean allows to create a server without the install config if you want to provide it later.
*/
installConfigAfterward?: pulumi.Input<boolean>;
/**
* (List of) The IPs of the server.
*/
ips?: pulumi.Input<pulumi.Input<inputs.BaremetalServerIp>[]>;
/**
* (List of) The IPv4 addresses of the server.
*/
ipv4s?: pulumi.Input<pulumi.Input<inputs.BaremetalServerIpv4>[]>;
/**
* (List of) The IPv6 addresses of the server.
*/
ipv6s?: pulumi.Input<pulumi.Input<inputs.BaremetalServerIpv6>[]>;
/**
* The name of the server.
*/
name?: pulumi.Input<string>;
/**
* The offer name or UUID of the baremetal server.
* Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-334154) to find the right offer.
*
* > **Important:** Updates to `offer` will recreate the server.
*/
offer?: pulumi.Input<string>;
/**
* The ID of the offer.
*/
offerId?: pulumi.Input<string>;
/**
* The name of the offer.
*/
offerName?: pulumi.Input<string>;
/**
* The options to enable on the server.
* > The `options` block supports:
*/
options?: pulumi.Input<pulumi.Input<inputs.BaremetalServerOption>[]>;
/**
* The organization ID the server is associated with.
*/
organizationId?: pulumi.Input<string>;
/**
* The UUID of the os to install on the server.
* Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-87598a) to find the right OS ID.
* > **Important:** Updates to `os` will reinstall the server.
*/
os?: pulumi.Input<string>;
/**
* The name of the os.
*/
osName?: pulumi.Input<string>;
/**
* Password used for the installation. May be required depending on used os.
*/
password?: pulumi.Input<string>;
/**
* The private networks to attach to the server. For more information, see [the documentation](https://www.scaleway.com/en/docs/compute/elastic-metal/how-to/use-private-networks/)
*/
privateNetworks?: pulumi.Input<pulumi.Input<inputs.BaremetalServerPrivateNetwork>[]>;
/**
* `projectId`) The ID of the project the server is associated with.
*/
projectId?: pulumi.Input<string>;
/**
* If True, this boolean allows to reinstall the server on install config changes.
* > **Important:** Updates to `sshKeyIds`, `user`, `password`, `serviceUser` or `servicePassword` will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.
*/
reinstallOnConfigChanges?: pulumi.Input<boolean>;
/**
* Password used for the service to install. May be required depending on used os.
*/
servicePassword?: pulumi.Input<string>;
/**
* User used for the service to install.
*/
serviceUser?: pulumi.Input<string>;
/**
* List of SSH keys allowed to connect to the server.
*/
sshKeyIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The tags associated with the server.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* User used for the installation.
*/
user?: pulumi.Input<string>;
/**
* `zone`) The zone in which the server should be created.
*/
zone?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a BaremetalServer resource.
*/
export interface BaremetalServerArgs {
/**
* A description for the server.
*/
description?: pulumi.Input<string>;
/**
* The hostname of the server.
*/
hostname?: pulumi.Input<string>;
/**
* If True, this boolean allows to create a server without the install config if you want to provide it later.
*/
installConfigAfterward?: pulumi.Input<boolean>;
/**
* The name of the server.
*/
name?: pulumi.Input<string>;
/**
* The offer name or UUID of the baremetal server.
* Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-334154) to find the right offer.
*
* > **Important:** Updates to `offer` will recreate the server.
*/
offer: pulumi.Input<string>;
/**
* The options to enable on the server.
* > The `options` block supports:
*/
options?: pulumi.Input<pulumi.Input<inputs.BaremetalServerOption>[]>;
/**
* The UUID of the os to install on the server.
* Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-87598a) to find the right OS ID.
* > **Important:** Updates to `os` will reinstall the server.
*/
os?: pulumi.Input<string>;
/**
* Password used for the installation. May be required depending on used os.
*/
password?: pulumi.Input<string>;
/**
* The private networks to attach to the server. For more information, see [the documentation](https://www.scaleway.com/en/docs/compute/elastic-metal/how-to/use-private-networks/)
*/
privateNetworks?: pulumi.Input<pulumi.Input<inputs.BaremetalServerPrivateNetwork>[]>;
/**
* `projectId`) The ID of the project the server is associated with.
*/
projectId?: pulumi.Input<string>;
/**
* If True, this boolean allows to reinstall the server on install config changes.
* > **Important:** Updates to `sshKeyIds`, `user`, `password`, `serviceUser` or `servicePassword` will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.
*/
reinstallOnConfigChanges?: pulumi.Input<boolean>;
/**
* Password used for the service to install. May be required depending on used os.
*/
servicePassword?: pulumi.Input<string>;
/**
* User used for the service to install.
*/
serviceUser?: pulumi.Input<string>;
/**
* List of SSH keys allowed to connect to the server.
*/
sshKeyIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The tags associated with the server.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* User used for the installation.
*/
user?: pulumi.Input<string>;
/**
* `zone`) The zone in which the server should be created.
*/
zone?: pulumi.Input<string>;
}