UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

118 lines 4.34 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Instance = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * (Deprecated! Recommend use volcengine.escloud_v2.EscloudInstanceV2 replace) Provides a resource to manage escloud instance * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooZones = volcengine.ecs.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet_new", * description: "tfdesc", * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const fooInstance = new volcengine.escloud.Instance("fooInstance", {instanceConfiguration: { * version: "V6_7", * zoneNumber: 1, * enableHttps: true, * adminUserName: "admin", * adminPassword: "Password@@", * chargeType: "PostPaid", * configurationCode: "es.standard", * enablePureMaster: true, * instanceName: "acc-test-0", * nodeSpecsAssigns: [ * { * type: "Master", * number: 3, * resourceSpecName: "es.x4.medium", * storageSpecName: "es.volume.essd.pl0", * storageSize: 100, * }, * { * type: "Hot", * number: 2, * resourceSpecName: "es.x4.large", * storageSpecName: "es.volume.essd.pl0", * storageSize: 100, * }, * { * type: "Kibana", * number: 1, * resourceSpecName: "kibana.x2.small", * }, * ], * subnetId: fooSubnet.id, * projectName: "default", * forceRestartAfterScale: false, * }}); * ``` * * ## Import * * ESCloud Instance can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:escloud/instance:Instance default n769ewmjjqyqh5dv * ``` */ class Instance extends pulumi.CustomResource { /** * Get an existing Instance 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) { return new Instance(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Instance. 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'] === Instance.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["instanceConfiguration"] = state ? state.instanceConfiguration : undefined; } else { const args = argsOrState; if ((!args || args.instanceConfiguration === undefined) && !opts.urn) { throw new Error("Missing required property 'instanceConfiguration'"); } resourceInputs["instanceConfiguration"] = args ? args.instanceConfiguration : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Instance.__pulumiType, name, resourceInputs, opts); } } exports.Instance = Instance; /** @internal */ Instance.__pulumiType = 'volcengine:escloud/instance:Instance'; //# sourceMappingURL=instance.js.map