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 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 "@ediri/scaleway"; * * const publicIp = new scaleway.InstanceIp("publicIp", {}); * const web = new scaleway.InstanceServer("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 "@ediri/scaleway"; * * const data = new scaleway.InstanceVolume("data", { * sizeInGb: 100, * type: "b_ssd", * }); * const web = new scaleway.InstanceServer("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 "@ediri/scaleway"; * * const ip = new scaleway.InstanceIp("ip", {}); * const web = new scaleway.InstanceServer("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 "@ediri/scaleway"; * * const www = new scaleway.InstanceSecurityGroup("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.InstanceServer("web", { * type: "DEV1-S", * image: "ubuntu_jammy", * securityGroupId: www.id, * }); * ``` * * ### With user data and cloud-init * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fs from "fs"; * import * as scaleway from "@ediri/scaleway"; * * const web = new scaleway.InstanceServer("web", { * type: "DEV1-S", * image: "ubuntu_jammy", * userData: { * foo: "bar", * "cloud-init": fs.readFileSync(`${path.module}/cloud-init.yml`, "utf8"), * }, * }); * ``` * * ### With private network * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const pn01 = new scaleway.VpcPrivateNetwork("pn01", {}); * const base = new scaleway.InstanceServer("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 "@ediri/scaleway"; * * const image = new scaleway.InstanceServer("image", { * image: "ubuntu_jammy", * rootVolume: { * sizeInGb: 100, * volumeType: "b_ssd", * }, * type: "PRO2-XXS", * }); * ``` * * ### From snapshot * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * import * as scaleway from "@pulumi/scaleway"; * * const snapshot = scaleway.getInstanceSnapshot({ * name: "my_snapshot", * }); * const fromSnapshotInstanceVolume = new scaleway.InstanceVolume("fromSnapshotInstanceVolume", { * fromSnapshotId: snapshot.then(snapshot => snapshot.id), * type: "b_ssd", * }); * const fromSnapshotInstanceServer = new scaleway.InstanceServer("fromSnapshotInstanceServer", { * type: "PRO2-XXS", * rootVolume: { * volumeId: fromSnapshotInstanceVolume.id, * }, * }); * ``` * * ### Using Scaleway Block Storage (SBS) volume * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const server = new scaleway.InstanceServer("server", { * image: "ubuntu_jammy", * rootVolume: { * sbsIops: 15000, * sizeInGb: 50, * volumeType: "sbs_volume", * }, * type: "PLAY2-MICRO", * }); * ``` * * ## 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:index/instanceServer:InstanceServer web fr-par-1/11111111-1111-1111-1111-111111111111 * ``` */ export declare class InstanceServer extends pulumi.CustomResource { /** * Get an existing InstanceServer 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, state?: InstanceServerState, opts?: pulumi.CustomResourceOptions): InstanceServer; /** * Returns true if the given object is an instance of InstanceServer. 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 InstanceServer; /** * 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; /** * The boot Type of the server. Possible values are: `local`, `bootscript` or `rescue`. */ readonly bootType: pulumi.Output; /** * ID of the target bootscript (set bootType to bootscript) * * @deprecated bootscript is not supported anymore. */ readonly bootscriptId: pulumi.Output; /** * The cloud init script associated with this server */ readonly cloudInit: pulumi.Output; /** * If true a dynamic IP will be attached to the server. */ readonly enableDynamicIp: pulumi.Output; /** * Determines if IPv6 is enabled for the server. Useful only with `routedIpEnabled` as false, otherwise ipv6 is always supported. * Deprecated: Please use a scaleway.InstanceIp with a `routedIpv6` type. * * @deprecated Please use a scaleway.InstanceIp with a `routedIpv6` type */ readonly enableIpv6: pulumi.Output; /** * 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=