UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

194 lines 8.53 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.AppleSiliconServer = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * The `scaleway.applesilicon.Server` resource creates and manages Scaleway Apple silicon servers. * * For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/apple-silicon/). * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const server = new scaleway.applesilicon.Server("server", { * name: "test-m1", * type: "M1-M", * }); * ``` * * ### Enable VPC and attach private network * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const vpc_apple_silicon = new scaleway.network.Vpc("vpc-apple-silicon", {name: "vpc-apple-silicon"}); * const pn_apple_silicon = new scaleway.network.PrivateNetwork("pn-apple-silicon", { * name: "pn-apple-silicon", * vpcId: vpc_apple_silicon.id, * }); * const my_server = new scaleway.applesilicon.Server("my-server", { * name: "TestAccServerEnableVPC", * type: "M2-M", * enableVpc: true, * privateNetworks: [{ * id: pn_apple_silicon.id, * }], * }); * ``` * * ### With `github` runner * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const byName = scaleway.applesilicon.getOs({ * name: "devos-sequoia-15.6", * }); * const main = new scaleway.applesilicon.Runner("main", { * name: "TestAccRunnerGithub", * ciProvider: "github", * url: "https://github.com/my-repo-url", * token: "MY_GITHUB_RUNNER_TOKEN", * }); * const mainServer = new scaleway.applesilicon.Server("main", { * name: "TestAccServerRunner", * type: "M2-L", * publicBandwidth: 1000000000, * osId: byName.then(byName => byName.id), * runnerIds: [main.id], * }); * ``` * * ## Import * * Instance servers can be imported using the `{zone}/{id}`, e.g. * * ```sh * $ pulumi import scaleway:index/appleSiliconServer:AppleSiliconServer main fr-par-1/11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/applesiliconserver.AppleSiliconServer has been deprecated in favor of scaleway.applesilicon/server.Server */ class AppleSiliconServer extends pulumi.CustomResource { /** * Get an existing AppleSiliconServer 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("AppleSiliconServer is deprecated: scaleway.index/applesiliconserver.AppleSiliconServer has been deprecated in favor of scaleway.applesilicon/server.Server"); return new AppleSiliconServer(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'scaleway:index/appleSiliconServer:AppleSiliconServer'; /** * Returns true if the given object is an instance of AppleSiliconServer. 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'] === AppleSiliconServer.__pulumiType; } /** @deprecated scaleway.index/applesiliconserver.AppleSiliconServer has been deprecated in favor of scaleway.applesilicon/server.Server */ constructor(name, argsOrState, opts) { pulumi.log.warn("AppleSiliconServer is deprecated: scaleway.index/applesiliconserver.AppleSiliconServer has been deprecated in favor of scaleway.applesilicon/server.Server"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["commitment"] = state?.commitment; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["deletableAt"] = state?.deletableAt; resourceInputs["enableVpc"] = state?.enableVpc; resourceInputs["ip"] = state?.ip; resourceInputs["name"] = state?.name; resourceInputs["organizationId"] = state?.organizationId; resourceInputs["osId"] = state?.osId; resourceInputs["password"] = state?.password; resourceInputs["privateIps"] = state?.privateIps; resourceInputs["privateNetworks"] = state?.privateNetworks; resourceInputs["projectId"] = state?.projectId; resourceInputs["publicBandwidth"] = state?.publicBandwidth; resourceInputs["runnerIds"] = state?.runnerIds; resourceInputs["state"] = state?.state; resourceInputs["type"] = state?.type; resourceInputs["updatedAt"] = state?.updatedAt; resourceInputs["username"] = state?.username; resourceInputs["vncUrl"] = state?.vncUrl; resourceInputs["vpcStatus"] = state?.vpcStatus; resourceInputs["zone"] = state?.zone; } else { const args = argsOrState; if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["commitment"] = args?.commitment; resourceInputs["enableVpc"] = args?.enableVpc; resourceInputs["name"] = args?.name; resourceInputs["osId"] = args?.osId; resourceInputs["privateIps"] = args?.privateIps; resourceInputs["privateNetworks"] = args?.privateNetworks; resourceInputs["projectId"] = args?.projectId; resourceInputs["publicBandwidth"] = args?.publicBandwidth; resourceInputs["runnerIds"] = args?.runnerIds; resourceInputs["type"] = args?.type; resourceInputs["zone"] = args?.zone; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["deletableAt"] = undefined /*out*/; resourceInputs["ip"] = undefined /*out*/; resourceInputs["organizationId"] = undefined /*out*/; resourceInputs["password"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; resourceInputs["username"] = undefined /*out*/; resourceInputs["vncUrl"] = undefined /*out*/; resourceInputs["vpcStatus"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["password"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(AppleSiliconServer.__pulumiType, name, resourceInputs, opts); } } exports.AppleSiliconServer = AppleSiliconServer; //# sourceMappingURL=appleSiliconServer.js.map