UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

101 lines 4.03 kB
"use strict"; // *** 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.Ec2CredentialV3 = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a V3 EC2 Credential resource within OpenStack Keystone. * EC2 credentials in OpenStack are used to access S3 compatible Swift/RadosGW * endpoints or to authenticate against Keystone. * * > **Note:** All arguments including the EC2 credential access key and secret * will be stored in the raw state as plain-text. Read more about sensitive data * in state. * * ## Example Usage * * ### EC2 credential in current project scope * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const ec2Key1 = new openstack.identity.Ec2CredentialV3("ec2_key1", {}); * ``` * * ### EC2 credential in pre-defined project scope * * This allows administrative users to create EC2 credentials for a scope different * from the current auth scope. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const ec2Key1 = new openstack.identity.Ec2CredentialV3("ec2_key1", {projectId: "f7ac731cc11f40efbc03a9f9e1d1d21f"}); * ``` * * ## Import * * EC2 Credentials can be imported using the `access`, e.g. * * ```sh * $ pulumi import openstack:identity/ec2CredentialV3:Ec2CredentialV3 ec2_cred_1 2d0ac4a2f81b4b0f9513ee49e780647d * ``` */ class Ec2CredentialV3 extends pulumi.CustomResource { /** * Get an existing Ec2CredentialV3 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 Ec2CredentialV3(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Ec2CredentialV3. 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'] === Ec2CredentialV3.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["access"] = state?.access; resourceInputs["projectId"] = state?.projectId; resourceInputs["region"] = state?.region; resourceInputs["secret"] = state?.secret; resourceInputs["trustId"] = state?.trustId; resourceInputs["userId"] = state?.userId; } else { const args = argsOrState; resourceInputs["projectId"] = args?.projectId; resourceInputs["region"] = args?.region; resourceInputs["userId"] = args?.userId; resourceInputs["access"] = undefined /*out*/; resourceInputs["secret"] = undefined /*out*/; resourceInputs["trustId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["secret"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Ec2CredentialV3.__pulumiType, name, resourceInputs, opts); } } exports.Ec2CredentialV3 = Ec2CredentialV3; /** @internal */ Ec2CredentialV3.__pulumiType = 'openstack:identity/ec2CredentialV3:Ec2CredentialV3'; //# sourceMappingURL=ec2CredentialV3.js.map