@pulumi/consul
Version:
A Pulumi package for creating and managing consul resources.
123 lines • 4.97 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! ***
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.getAclTokenSecretIdOutput = exports.getAclTokenSecretId = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
* > **Warning:** When using this is resource, the ACL Token secret ID will be
* written to the Terraform state. It is strongly recommended to use the `pgpKey`
* attribute and to make sure the remote state has strong access controls before
* using this resource.
*
* The `consulAclTokenSecret` data source returns the secret ID associated to
* the accessor ID. This can be useful to make systems that cannot use an auth
* method to interface with Consul.
*
* If you want to get other attributes of the Consul ACL token, please use the
* [`consul.AclToken` data source](https://www.terraform.io/docs/providers/consul/d/acl_token.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as consul from "@pulumi/consul";
*
* const test = new consul.AclPolicy("test", {
* name: "test",
* rules: "node \"\" { policy = \"read\" }",
* datacenters: ["dc1"],
* });
* const testAclToken = new consul.AclToken("test", {
* description: "test",
* policies: [test.name],
* local: true,
* });
* const read = consul.getAclTokenSecretIdOutput({
* accessorId: testAclToken.id,
* pgpKey: "keybase:my_username",
* });
* export const consulAclTokenSecretId = read.apply(read => read.encryptedSecretId);
* ```
*/
function getAclTokenSecretId(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("consul:index/getAclTokenSecretId:getAclTokenSecretId", {
"accessorId": args.accessorId,
"namespace": args.namespace,
"partition": args.partition,
"pgpKey": args.pgpKey,
}, opts);
}
exports.getAclTokenSecretId = getAclTokenSecretId;
/**
* > **Warning:** When using this is resource, the ACL Token secret ID will be
* written to the Terraform state. It is strongly recommended to use the `pgpKey`
* attribute and to make sure the remote state has strong access controls before
* using this resource.
*
* The `consulAclTokenSecret` data source returns the secret ID associated to
* the accessor ID. This can be useful to make systems that cannot use an auth
* method to interface with Consul.
*
* If you want to get other attributes of the Consul ACL token, please use the
* [`consul.AclToken` data source](https://www.terraform.io/docs/providers/consul/d/acl_token.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as consul from "@pulumi/consul";
*
* const test = new consul.AclPolicy("test", {
* name: "test",
* rules: "node \"\" { policy = \"read\" }",
* datacenters: ["dc1"],
* });
* const testAclToken = new consul.AclToken("test", {
* description: "test",
* policies: [test.name],
* local: true,
* });
* const read = consul.getAclTokenSecretIdOutput({
* accessorId: testAclToken.id,
* pgpKey: "keybase:my_username",
* });
* export const consulAclTokenSecretId = read.apply(read => read.encryptedSecretId);
* ```
*/
function getAclTokenSecretIdOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("consul:index/getAclTokenSecretId:getAclTokenSecretId", {
"accessorId": args.accessorId,
"namespace": args.namespace,
"partition": args.partition,
"pgpKey": args.pgpKey,
}, opts);
}
exports.getAclTokenSecretIdOutput = getAclTokenSecretIdOutput;
//# sourceMappingURL=getAclTokenSecretId.js.map