@pulumi/hcloud
Version:
A Pulumi package for creating and managing hcloud cloud resources.
84 lines • 2.65 kB
JavaScript
;
// *** 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.getSshKeyOutput = exports.getSshKey = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as hcloud from "@pulumi/hcloud";
*
* const byId = hcloud.getSshKey({
* id: 24332897,
* });
* const byName = hcloud.getSshKey({
* name: "my-ssh-key",
* });
* const byFingerprint = hcloud.getSshKey({
* fingerprint: "55:58:dc:bd:61:6e:7d:24:07:a7:7d:9b:be:99:83:a8",
* });
* const byLabel = hcloud.getSshKey({
* withSelector: "key=value",
* });
* const main = new hcloud.Server("main", {sshKeys: [
* byId.then(byId => byId.id),
* byName.then(byName => byName.id),
* byFingerprint.then(byFingerprint => byFingerprint.id),
* ]});
* ```
*/
function getSshKey(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("hcloud:index/getSshKey:getSshKey", {
"fingerprint": args.fingerprint,
"id": args.id,
"name": args.name,
"selector": args.selector,
"withSelector": args.withSelector,
}, opts);
}
exports.getSshKey = getSshKey;
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as hcloud from "@pulumi/hcloud";
*
* const byId = hcloud.getSshKey({
* id: 24332897,
* });
* const byName = hcloud.getSshKey({
* name: "my-ssh-key",
* });
* const byFingerprint = hcloud.getSshKey({
* fingerprint: "55:58:dc:bd:61:6e:7d:24:07:a7:7d:9b:be:99:83:a8",
* });
* const byLabel = hcloud.getSshKey({
* withSelector: "key=value",
* });
* const main = new hcloud.Server("main", {sshKeys: [
* byId.then(byId => byId.id),
* byName.then(byName => byName.id),
* byFingerprint.then(byFingerprint => byFingerprint.id),
* ]});
* ```
*/
function getSshKeyOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("hcloud:index/getSshKey:getSshKey", {
"fingerprint": args.fingerprint,
"id": args.id,
"name": args.name,
"selector": args.selector,
"withSelector": args.withSelector,
}, opts);
}
exports.getSshKeyOutput = getSshKeyOutput;
//# sourceMappingURL=getSshKey.js.map