@elcodev/pulumi-pass
Version:
A Pulumi package for creating and managing pass/gopass secrets.
61 lines • 2.52 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 });
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class PassPassword extends pulumi.CustomResource {
constructor(name, argsOrState, opts) {
let inputs = {};
if (opts && opts.id) {
const state = argsOrState;
inputs["data"] = state ? state.data : undefined;
inputs["password"] = state ? state.password : undefined;
inputs["path"] = state ? state.path : undefined;
}
else {
const args = argsOrState;
if (!args || args.password === undefined) {
throw new Error("Missing required property 'password'");
}
if (!args || args.path === undefined) {
throw new Error("Missing required property 'path'");
}
inputs["data"] = args ? args.data : undefined;
inputs["password"] = args ? args.password : undefined;
inputs["path"] = args ? args.path : undefined;
}
if (!opts) {
opts = {};
}
if (!opts.version) {
opts.version = utilities.getVersion();
}
super(PassPassword.__pulumiType, name, inputs, opts);
}
/**
* Get an existing PassPassword 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.
*/
static get(name, id, state, opts) {
return new PassPassword(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of PassPassword. 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'] === PassPassword.__pulumiType;
}
}
exports.PassPassword = PassPassword;
/** @internal */
PassPassword.__pulumiType = 'pass:index/passPassword:PassPassword';
//# sourceMappingURL=passPassword.js.map