@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
702 lines (701 loc) • 27.9 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 Instances. For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/instance/#path-instances-list-all-instances).
*
* Please check our [FAQ - Instances](https://www.scaleway.com/en/docs/faq/instances).
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const publicIp = new scaleway.instance.Ip("public_ip", {});
* const web = new scaleway.instance.Server("web", {
* type: "DEV1-S",
* image: "ubuntu_jammy",
* ipId: publicIp.id,
* });
* ```
*
* ### With additional volumes and tags
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const data = new scaleway.block.Volume("data", {
* sizeInGb: 100,
* iops: 5000,
* });
* const web = new scaleway.instance.Server("web", {
* type: "DEV1-S",
* image: "ubuntu_jammy",
* tags: [
* "hello",
* "public",
* ],
* rootVolume: {
* deleteOnTermination: false,
* },
* additionalVolumeIds: [data.id],
* });
* ```
*
* ### With a reserved IP
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const ip = new scaleway.instance.Ip("ip", {});
* const web = new scaleway.instance.Server("web", {
* type: "DEV1-S",
* image: "f974feac-abae-4365-b988-8ec7d1cec10d",
* tags: [
* "hello",
* "public",
* ],
* ipId: ip.id,
* });
* ```
*
* ### With security group
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const www = new scaleway.instance.SecurityGroup("www", {
* inboundDefaultPolicy: "drop",
* outboundDefaultPolicy: "accept",
* inboundRules: [
* {
* action: "accept",
* port: 22,
* ip: "212.47.225.64",
* },
* {
* action: "accept",
* port: 80,
* },
* {
* action: "accept",
* port: 443,
* },
* ],
* outboundRules: [{
* action: "drop",
* ipRange: "10.20.0.0/24",
* }],
* });
* const web = new scaleway.instance.Server("web", {
* type: "DEV1-S",
* image: "ubuntu_jammy",
* securityGroupId: www.id,
* });
* ```
*
* ### With private network
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const pn01 = new scaleway.network.PrivateNetwork("pn01", {name: "private_network_instance"});
* const base = new scaleway.instance.Server("base", {
* image: "ubuntu_jammy",
* type: "DEV1-S",
* privateNetworks: [{
* pnId: pn01.id,
* }],
* });
* ```
*
* ### Root volume configuration
*
* ### Resized block volume with installed image
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const image = new scaleway.instance.Server("image", {
* type: "PRO2-XXS",
* image: "ubuntu_jammy",
* rootVolume: {
* sizeInGb: 100,
* },
* });
* ```
*
* ### From snapshot
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const snapshot = scaleway.block.getSnapshot({
* name: "my_snapshot",
* });
* const fromSnapshot = new scaleway.block.Volume("from_snapshot", {
* snapshotId: snapshot.then(snapshot => snapshot.id),
* iops: 5000,
* });
* const fromSnapshotServer = new scaleway.instance.Server("from_snapshot", {
* type: "PRO2-XXS",
* rootVolume: {
* volumeId: fromSnapshot.id,
* volumeType: "sbs_volume",
* },
* });
* ```
*
* ### Using Scaleway Block Storage (SBS) volume
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const server = new scaleway.instance.Server("server", {
* type: "PLAY2-MICRO",
* image: "ubuntu_jammy",
* rootVolume: {
* volumeType: "sbs_volume",
* sbsIops: 15000,
* sizeInGb: 50,
* },
* });
* ```
*
* ## Private Network
*
* > **Important:** Updates to `privateNetwork` will recreate a new private network interface.
*
* - `pnId` - (Required) The private network ID where to connect.
* - `macAddress` The private NIC MAC address.
* - `status` The private NIC state.
* - `zone` - (Defaults to provider `zone`) The zone in which the server must be created.
*
* > **Important:** You can only attach an instance in the same zone as a private network.
* **Important:** Instance supports a maximum of 8 different private networks.
*
* ## Import
*
* Instance servers can be imported using the `{zone}/{id}`, e.g.
*
* bash
*
* ```sh
* $ pulumi import scaleway:instance/server:Server web fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*/
export declare class Server extends pulumi.CustomResource {
/**
* Get an existing Server 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?: ServerState, opts?: pulumi.CustomResourceOptions): Server;
/**
* Returns true if the given object is an instance of Server. 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 Server;
/**
* The [additional volumes](https://www.scaleway.com/en/developers/api/instance/#path-volume-types-list-volume-types)
* attached to the server. Updates to this field will trigger a stop/start of the server.
*
* > **Important:** If this field contains local volumes, the `state` must be set to `stopped`, otherwise it will fail.
*
* > **Important:** If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.
*/
readonly additionalVolumeIds: pulumi.Output<string[] | undefined>;
/**
* The boot Type of the server. Possible values are: `local`, `bootscript` or `rescue`.
*/
readonly bootType: pulumi.Output<string | undefined>;
/**
* ID of the target bootscript (set bootType to bootscript)
*
* @deprecated bootscript is not supported anymore.
*/
readonly bootscriptId: pulumi.Output<string>;
/**
* The cloud init script associated with this server
*/
readonly cloudInit: pulumi.Output<string>;
/**
* If true a dynamic IP will be attached to the server.
*/
readonly enableDynamicIp: pulumi.Output<boolean | undefined>;
/**
* Determines if IPv6 is enabled for the server.
* Deprecated: Please use a scaleway.instance.Ip with a `routedIpv6` type.
*
* @deprecated Please use a scaleway.instance.Ip with a `routedIpv6` type
*/
readonly enableIpv6: pulumi.Output<boolean | undefined>;
/**
* The UUID or the label of the base image used by the server. You can use [this endpoint](https://www.scaleway.com/en/developers/api/marketplace/#path-marketplace-images-list-marketplace-images)
* to find either the right `label` or the right local image `ID` for a given `type`. Optional when creating an instance with an existing root volume.
*
* You can check the available labels with our [CLI](https://www.scaleway.com/en/docs/compute/instances/api-cli/creating-managing-instances-with-cliv2/). ```scw marketplace image list```
*
* To retrieve more information by label please use: ```scw marketplace image get label=<LABEL>```
*/
readonly image: pulumi.Output<string | undefined>;
/**
* The ID of the reserved IP that is attached to the server.
*/
readonly ipId: pulumi.Output<string | undefined>;
/**
* List of ID of reserved IPs that are attached to the server. Cannot be used with `ipId`.
*
* > `ipId` to `ipIds` migration: if moving the ip from the old `ipId` field to the new `ipIds`, it should not detach the ip.
*/
readonly ipIds: pulumi.Output<string[] | undefined>;
/**
* The default ipv6 address routed to the server. ( Only set when enableIpv6 is set to true )
* Deprecated: Please use a scaleway.instance.Ip with a `routedIpv6` type.
*
* @deprecated Please use a scaleway.instance.Ip with a `routedIpv6` type
*/
readonly ipv6Address: pulumi.Output<string>;
/**
* The ipv6 gateway address. ( Only set when enableIpv6 is set to true )
* Deprecated: Please use a scaleway.instance.Ip with a `routedIpv6` type.
*
* @deprecated Please use a scaleway.instance.Ip with a `routedIpv6` type
*/
readonly ipv6Gateway: pulumi.Output<string>;
/**
* The prefix length of the ipv6 subnet routed to the server. ( Only set when enableIpv6 is set to true )
* Deprecated: Please use a scaleway.instance.Ip with a `routedIpv6` type.
*
* @deprecated Please use a scaleway.instance.Ip with a `routedIpv6` type
*/
readonly ipv6PrefixLength: pulumi.Output<number>;
/**
* The name of the server.
*/
readonly name: pulumi.Output<string>;
/**
* The organization ID the server is associated with.
*/
readonly organizationId: pulumi.Output<string>;
/**
* The [placement group](https://www.scaleway.com/en/developers/api/instance/#path-security-groups-update-a-security-group the server is attached to.
*
*
* > **Important:** When updating `placementGroupId` the `state` must be set to `stopped`, otherwise it will fail.
*/
readonly placementGroupId: pulumi.Output<string | undefined>;
/**
* (Deprecated) Always false, use instancePlacementGroup ressource to known when the placement group policy is respected.
*/
readonly placementGroupPolicyRespected: pulumi.Output<boolean>;
/**
* The Scaleway internal IP address of the server (Deprecated use ipamIp datasource instead).
*
* @deprecated Use ipamIp datasource instead to fetch your server's IP in your private network.
*/
readonly privateIp: pulumi.Output<string>;
/**
* The list of private IPv4 and IPv6 addresses associated with the resource.
*/
readonly privateIps: pulumi.Output<outputs.instance.ServerPrivateIp[]>;
/**
* The private network associated with the server.
* Use the `pnId` key to attach a [privateNetwork](https://www.scaleway.com/en/developers/api/instance/#path-private-nics-list-all-private-nics) on your instance.
*/
readonly privateNetworks: pulumi.Output<outputs.instance.ServerPrivateNetwork[] | undefined>;
/**
* `projectId`) The ID of the project the server is associated with.
*/
readonly projectId: pulumi.Output<string>;
/**
* Set to true to activate server protection option.
*/
readonly protected: pulumi.Output<boolean | undefined>;
/**
* The public IP address of the server (Deprecated use `publicIps` instead).
*
* @deprecated Use publicIps instead
*/
readonly publicIp: pulumi.Output<string>;
/**
* The list of public IPs of the server.
*/
readonly publicIps: pulumi.Output<outputs.instance.ServerPublicIp[]>;
/**
* If true, the server will be replaced if `type` is changed. Otherwise, the server will migrate.
*/
readonly replaceOnTypeChange: pulumi.Output<boolean | undefined>;
/**
* Root [volume](https://www.scaleway.com/en/developers/api/instance/#path-volume-types-list-volume-types) attached to the server on creation.
*/
readonly rootVolume: pulumi.Output<outputs.instance.ServerRootVolume>;
/**
* The security group the server is attached to
*/
readonly securityGroupId: pulumi.Output<string>;
/**
* The state of the server. Possible values are: `started`, `stopped` or `standby`.
*/
readonly state: pulumi.Output<string | undefined>;
/**
* The tags associated with the server.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* The commercial type of the server.
* You find all the available types on the [pricing page](https://www.scaleway.com/en/pricing/).
* Updates to this field will migrate the server, local storage constraint must be respected. [More info](https://www.scaleway.com/en/docs/compute/instances/api-cli/migrating-instances/).
* Use `replaceOnTypeChange` to trigger replacement instead of migration.
*
* > **Important:** If `type` change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.
*/
readonly type: pulumi.Output<string>;
/**
* The user data associated with the server.
* Use the `cloud-init` key to use [cloud-init](https://cloudinit.readthedocs.io/en/latest/) on your instance.
* You can define values using:
* - string
* - UTF-8 encoded file content using file
* - Binary files using filebase64.
*/
readonly userData: pulumi.Output<{
[key: string]: string;
}>;
/**
* `zone`) The zone in which the server should be created.
*/
readonly zone: pulumi.Output<string>;
/**
* Create a Server 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: ServerArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Server resources.
*/
export interface ServerState {
/**
* The [additional volumes](https://www.scaleway.com/en/developers/api/instance/#path-volume-types-list-volume-types)
* attached to the server. Updates to this field will trigger a stop/start of the server.
*
* > **Important:** If this field contains local volumes, the `state` must be set to `stopped`, otherwise it will fail.
*
* > **Important:** If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.
*/
additionalVolumeIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The boot Type of the server. Possible values are: `local`, `bootscript` or `rescue`.
*/
bootType?: pulumi.Input<string>;
/**
* ID of the target bootscript (set bootType to bootscript)
*
* @deprecated bootscript is not supported anymore.
*/
bootscriptId?: pulumi.Input<string>;
/**
* The cloud init script associated with this server
*/
cloudInit?: pulumi.Input<string>;
/**
* If true a dynamic IP will be attached to the server.
*/
enableDynamicIp?: pulumi.Input<boolean>;
/**
* Determines if IPv6 is enabled for the server.
* Deprecated: Please use a scaleway.instance.Ip with a `routedIpv6` type.
*
* @deprecated Please use a scaleway.instance.Ip with a `routedIpv6` type
*/
enableIpv6?: pulumi.Input<boolean>;
/**
* The UUID or the label of the base image used by the server. You can use [this endpoint](https://www.scaleway.com/en/developers/api/marketplace/#path-marketplace-images-list-marketplace-images)
* to find either the right `label` or the right local image `ID` for a given `type`. Optional when creating an instance with an existing root volume.
*
* You can check the available labels with our [CLI](https://www.scaleway.com/en/docs/compute/instances/api-cli/creating-managing-instances-with-cliv2/). ```scw marketplace image list```
*
* To retrieve more information by label please use: ```scw marketplace image get label=<LABEL>```
*/
image?: pulumi.Input<string>;
/**
* The ID of the reserved IP that is attached to the server.
*/
ipId?: pulumi.Input<string>;
/**
* List of ID of reserved IPs that are attached to the server. Cannot be used with `ipId`.
*
* > `ipId` to `ipIds` migration: if moving the ip from the old `ipId` field to the new `ipIds`, it should not detach the ip.
*/
ipIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The default ipv6 address routed to the server. ( Only set when enableIpv6 is set to true )
* Deprecated: Please use a scaleway.instance.Ip with a `routedIpv6` type.
*
* @deprecated Please use a scaleway.instance.Ip with a `routedIpv6` type
*/
ipv6Address?: pulumi.Input<string>;
/**
* The ipv6 gateway address. ( Only set when enableIpv6 is set to true )
* Deprecated: Please use a scaleway.instance.Ip with a `routedIpv6` type.
*
* @deprecated Please use a scaleway.instance.Ip with a `routedIpv6` type
*/
ipv6Gateway?: pulumi.Input<string>;
/**
* The prefix length of the ipv6 subnet routed to the server. ( Only set when enableIpv6 is set to true )
* Deprecated: Please use a scaleway.instance.Ip with a `routedIpv6` type.
*
* @deprecated Please use a scaleway.instance.Ip with a `routedIpv6` type
*/
ipv6PrefixLength?: pulumi.Input<number>;
/**
* The name of the server.
*/
name?: pulumi.Input<string>;
/**
* The organization ID the server is associated with.
*/
organizationId?: pulumi.Input<string>;
/**
* The [placement group](https://www.scaleway.com/en/developers/api/instance/#path-security-groups-update-a-security-group the server is attached to.
*
*
* > **Important:** When updating `placementGroupId` the `state` must be set to `stopped`, otherwise it will fail.
*/
placementGroupId?: pulumi.Input<string>;
/**
* (Deprecated) Always false, use instancePlacementGroup ressource to known when the placement group policy is respected.
*/
placementGroupPolicyRespected?: pulumi.Input<boolean>;
/**
* The Scaleway internal IP address of the server (Deprecated use ipamIp datasource instead).
*
* @deprecated Use ipamIp datasource instead to fetch your server's IP in your private network.
*/
privateIp?: pulumi.Input<string>;
/**
* The list of private IPv4 and IPv6 addresses associated with the resource.
*/
privateIps?: pulumi.Input<pulumi.Input<inputs.instance.ServerPrivateIp>[]>;
/**
* The private network associated with the server.
* Use the `pnId` key to attach a [privateNetwork](https://www.scaleway.com/en/developers/api/instance/#path-private-nics-list-all-private-nics) on your instance.
*/
privateNetworks?: pulumi.Input<pulumi.Input<inputs.instance.ServerPrivateNetwork>[]>;
/**
* `projectId`) The ID of the project the server is associated with.
*/
projectId?: pulumi.Input<string>;
/**
* Set to true to activate server protection option.
*/
protected?: pulumi.Input<boolean>;
/**
* The public IP address of the server (Deprecated use `publicIps` instead).
*
* @deprecated Use publicIps instead
*/
publicIp?: pulumi.Input<string>;
/**
* The list of public IPs of the server.
*/
publicIps?: pulumi.Input<pulumi.Input<inputs.instance.ServerPublicIp>[]>;
/**
* If true, the server will be replaced if `type` is changed. Otherwise, the server will migrate.
*/
replaceOnTypeChange?: pulumi.Input<boolean>;
/**
* Root [volume](https://www.scaleway.com/en/developers/api/instance/#path-volume-types-list-volume-types) attached to the server on creation.
*/
rootVolume?: pulumi.Input<inputs.instance.ServerRootVolume>;
/**
* The security group the server is attached to
*/
securityGroupId?: pulumi.Input<string>;
/**
* The state of the server. Possible values are: `started`, `stopped` or `standby`.
*/
state?: pulumi.Input<string>;
/**
* The tags associated with the server.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The commercial type of the server.
* You find all the available types on the [pricing page](https://www.scaleway.com/en/pricing/).
* Updates to this field will migrate the server, local storage constraint must be respected. [More info](https://www.scaleway.com/en/docs/compute/instances/api-cli/migrating-instances/).
* Use `replaceOnTypeChange` to trigger replacement instead of migration.
*
* > **Important:** If `type` change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.
*/
type?: pulumi.Input<string>;
/**
* The user data associated with the server.
* Use the `cloud-init` key to use [cloud-init](https://cloudinit.readthedocs.io/en/latest/) on your instance.
* You can define values using:
* - string
* - UTF-8 encoded file content using file
* - Binary files using filebase64.
*/
userData?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* `zone`) The zone in which the server should be created.
*/
zone?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Server resource.
*/
export interface ServerArgs {
/**
* The [additional volumes](https://www.scaleway.com/en/developers/api/instance/#path-volume-types-list-volume-types)
* attached to the server. Updates to this field will trigger a stop/start of the server.
*
* > **Important:** If this field contains local volumes, the `state` must be set to `stopped`, otherwise it will fail.
*
* > **Important:** If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.
*/
additionalVolumeIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The boot Type of the server. Possible values are: `local`, `bootscript` or `rescue`.
*/
bootType?: pulumi.Input<string>;
/**
* ID of the target bootscript (set bootType to bootscript)
*
* @deprecated bootscript is not supported anymore.
*/
bootscriptId?: pulumi.Input<string>;
/**
* The cloud init script associated with this server
*/
cloudInit?: pulumi.Input<string>;
/**
* If true a dynamic IP will be attached to the server.
*/
enableDynamicIp?: pulumi.Input<boolean>;
/**
* Determines if IPv6 is enabled for the server.
* Deprecated: Please use a scaleway.instance.Ip with a `routedIpv6` type.
*
* @deprecated Please use a scaleway.instance.Ip with a `routedIpv6` type
*/
enableIpv6?: pulumi.Input<boolean>;
/**
* The UUID or the label of the base image used by the server. You can use [this endpoint](https://www.scaleway.com/en/developers/api/marketplace/#path-marketplace-images-list-marketplace-images)
* to find either the right `label` or the right local image `ID` for a given `type`. Optional when creating an instance with an existing root volume.
*
* You can check the available labels with our [CLI](https://www.scaleway.com/en/docs/compute/instances/api-cli/creating-managing-instances-with-cliv2/). ```scw marketplace image list```
*
* To retrieve more information by label please use: ```scw marketplace image get label=<LABEL>```
*/
image?: pulumi.Input<string>;
/**
* The ID of the reserved IP that is attached to the server.
*/
ipId?: pulumi.Input<string>;
/**
* List of ID of reserved IPs that are attached to the server. Cannot be used with `ipId`.
*
* > `ipId` to `ipIds` migration: if moving the ip from the old `ipId` field to the new `ipIds`, it should not detach the ip.
*/
ipIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The name of the server.
*/
name?: pulumi.Input<string>;
/**
* The [placement group](https://www.scaleway.com/en/developers/api/instance/#path-security-groups-update-a-security-group the server is attached to.
*
*
* > **Important:** When updating `placementGroupId` the `state` must be set to `stopped`, otherwise it will fail.
*/
placementGroupId?: pulumi.Input<string>;
/**
* The list of private IPv4 and IPv6 addresses associated with the resource.
*/
privateIps?: pulumi.Input<pulumi.Input<inputs.instance.ServerPrivateIp>[]>;
/**
* The private network associated with the server.
* Use the `pnId` key to attach a [privateNetwork](https://www.scaleway.com/en/developers/api/instance/#path-private-nics-list-all-private-nics) on your instance.
*/
privateNetworks?: pulumi.Input<pulumi.Input<inputs.instance.ServerPrivateNetwork>[]>;
/**
* `projectId`) The ID of the project the server is associated with.
*/
projectId?: pulumi.Input<string>;
/**
* Set to true to activate server protection option.
*/
protected?: pulumi.Input<boolean>;
/**
* The list of public IPs of the server.
*/
publicIps?: pulumi.Input<pulumi.Input<inputs.instance.ServerPublicIp>[]>;
/**
* If true, the server will be replaced if `type` is changed. Otherwise, the server will migrate.
*/
replaceOnTypeChange?: pulumi.Input<boolean>;
/**
* Root [volume](https://www.scaleway.com/en/developers/api/instance/#path-volume-types-list-volume-types) attached to the server on creation.
*/
rootVolume?: pulumi.Input<inputs.instance.ServerRootVolume>;
/**
* The security group the server is attached to
*/
securityGroupId?: pulumi.Input<string>;
/**
* The state of the server. Possible values are: `started`, `stopped` or `standby`.
*/
state?: pulumi.Input<string>;
/**
* The tags associated with the server.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The commercial type of the server.
* You find all the available types on the [pricing page](https://www.scaleway.com/en/pricing/).
* Updates to this field will migrate the server, local storage constraint must be respected. [More info](https://www.scaleway.com/en/docs/compute/instances/api-cli/migrating-instances/).
* Use `replaceOnTypeChange` to trigger replacement instead of migration.
*
* > **Important:** If `type` change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.
*/
type: pulumi.Input<string>;
/**
* The user data associated with the server.
* Use the `cloud-init` key to use [cloud-init](https://cloudinit.readthedocs.io/en/latest/) on your instance.
* You can define values using:
* - string
* - UTF-8 encoded file content using file
* - Binary files using filebase64.
*/
userData?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* `zone`) The zone in which the server should be created.
*/
zone?: pulumi.Input<string>;
}