@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
124 lines • 5.71 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.InstanceTemplate = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Books and manages Autoscaling Instance templates.
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.autoscaling.InstanceTemplate("main", {
* name: "asg-template",
* commercialType: "PLAY2-MICRO",
* tags: [
* "terraform-test",
* "basic",
* ],
* volumes: [{
* name: "as-volume",
* volumeType: "sbs",
* boot: true,
* fromSnapshot: {
* snapshotId: mainScalewayBlockSnapshot.id,
* },
* perfIops: 5000,
* }],
* publicIpsV4Count: 1,
* privateNetworkIds: [mainScalewayVpcPrivateNetwork.id],
* });
* ```
*
* ## Import
*
* Autoscaling Instance templates can be imported using `{zone}/{id}`, e.g.
*
* bash
*
* ```sh
* $ pulumi import scaleway:autoscaling/instanceTemplate:InstanceTemplate main fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*/
class InstanceTemplate extends pulumi.CustomResource {
/**
* Get an existing InstanceTemplate 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 InstanceTemplate(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of InstanceTemplate. 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'] === InstanceTemplate.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["cloudInit"] = state ? state.cloudInit : undefined;
resourceInputs["commercialType"] = state ? state.commercialType : undefined;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["imageId"] = state ? state.imageId : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["placementGroupId"] = state ? state.placementGroupId : undefined;
resourceInputs["privateNetworkIds"] = state ? state.privateNetworkIds : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["publicIpsV4Count"] = state ? state.publicIpsV4Count : undefined;
resourceInputs["publicIpsV6Count"] = state ? state.publicIpsV6Count : undefined;
resourceInputs["securityGroupId"] = state ? state.securityGroupId : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
resourceInputs["volumes"] = state ? state.volumes : undefined;
resourceInputs["zone"] = state ? state.zone : undefined;
}
else {
const args = argsOrState;
if ((!args || args.commercialType === undefined) && !opts.urn) {
throw new Error("Missing required property 'commercialType'");
}
resourceInputs["cloudInit"] = args ? args.cloudInit : undefined;
resourceInputs["commercialType"] = args ? args.commercialType : undefined;
resourceInputs["imageId"] = args ? args.imageId : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["placementGroupId"] = args ? args.placementGroupId : undefined;
resourceInputs["privateNetworkIds"] = args ? args.privateNetworkIds : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
resourceInputs["publicIpsV4Count"] = args ? args.publicIpsV4Count : undefined;
resourceInputs["publicIpsV6Count"] = args ? args.publicIpsV6Count : undefined;
resourceInputs["securityGroupId"] = args ? args.securityGroupId : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["volumes"] = args ? args.volumes : undefined;
resourceInputs["zone"] = args ? args.zone : undefined;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(InstanceTemplate.__pulumiType, name, resourceInputs, opts);
}
}
exports.InstanceTemplate = InstanceTemplate;
/** @internal */
InstanceTemplate.__pulumiType = 'scaleway:autoscaling/instanceTemplate:InstanceTemplate';
//# sourceMappingURL=instanceTemplate.js.map