UNPKG

@pulumi/hcloud

Version:

A Pulumi package for creating and managing hcloud cloud resources.

76 lines 2.32 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.getServerTypeOutput = exports.getServerType = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides details about a specific Hetzner Cloud Server Type. * * Use this resource to get detailed information about specific Server Type. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as hcloud from "@pulumi/hcloud"; * * const byId = hcloud.getServerType({ * id: 22, * }); * const byName = hcloud.getServerType({ * name: "cx22", * }); * const main = new hcloud.Server("main", { * name: "my-server", * location: "fsn1", * image: "debian-12", * serverType: byName.then(byName => byName.name), * }); * ``` */ function getServerType(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("hcloud:index/getServerType:getServerType", { "id": args.id, "name": args.name, }, opts); } exports.getServerType = getServerType; /** * Provides details about a specific Hetzner Cloud Server Type. * * Use this resource to get detailed information about specific Server Type. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as hcloud from "@pulumi/hcloud"; * * const byId = hcloud.getServerType({ * id: 22, * }); * const byName = hcloud.getServerType({ * name: "cx22", * }); * const main = new hcloud.Server("main", { * name: "my-server", * location: "fsn1", * image: "debian-12", * serverType: byName.then(byName => byName.name), * }); * ``` */ function getServerTypeOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("hcloud:index/getServerType:getServerType", { "id": args.id, "name": args.name, }, opts); } exports.getServerTypeOutput = getServerTypeOutput; //# sourceMappingURL=getServerType.js.map