import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Use this data source to access information about a [Secret](https://docs.controlplane.com/reference/secret) within Control Plane.
*
* ## Required
*
* - **name** (String) Name of the secret.
*
* ## Outputs
*
* The following attributes are exported:
*
* - **cpln_id** (String) The ID, in GUID format, of the secret.
* - **name** (String) Name of the secret.
* - **description** (String) Description of the secret.
* - **tags** (Map of String) Key-value map of resource tags.
* - **self_link** (String) Full link to this resource. Can be referenced by other resources.
* - **secret_link** (String) Output used when linking a secret to an environment variable or volume, in the format: `cpln://secret/SECRET_NAME`.
* - **dictionary_as_envs** (Map of String) If a dictionary secret is defined, this output will be a key-value map in the following format: `key = cpln://secret/SECRET_NAME.key`.
* - **aws** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#aws).
* - **azure_connector** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#azure-connector).
* - **azure_sdk** (String, Sensitive) JSON string containing the Docker secret. [Reference Page](https://docs.controlplane.com/reference/secret#azure).
* - **dictionary** (Map of String) List of unique key-value pairs. [Reference Page](https://docs.controlplane.com/reference/secret#dictionary).
* - **docker** (String, Sensitive) JSON string containing the Docker secret. [Reference Page](https://docs.controlplane.com/reference/secret#docker).
* - **ecr** (Block List, Max: 1) (see below).
* - **gcp** (String, Sensitive) JSON string containing the GCP secret. [Reference Page](https://docs.controlplane.com/reference/secret#gcp)
* - **keypair** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#keypair).
* - **nats_account** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#nats-account).
* - **opaque** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#opaque).
* - **tls** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#tls).
* - **userpass** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#username).
*
*
*
* ### `aws`
*
* Optional:
*
* - **access_key** (String, Sensitive) Access Key provided by AWS.
* - **role_arn** (String) Role ARN provided by AWS.
* - **secret_key** (String, Sensitive) Secret Key provided by AWS.
* - **external_id** (String) AWS IAM Role External ID.
*
*
*
* ### `azureConnector`
*
* Optional:
*
* - **code** (String, Sensitive) Code/Key to authenticate to deployment URL.
* - **url** (String, Sensitive) Deployment URL.
*
*
*
* ### `ecr`
*
* [Reference Page](https://docs.controlplane.com/reference/secret#ecr)
*
* Optional:
*
* - **access_key** (String) Access Key provided by AWS.
* - **repos** (Set of String) List of ECR repositories.
* - **role_arn** (String) Role ARN provided by AWS.
* - **secret_key** (String, Sensitive) Secret Key provided by AWS.
* - **external_id** (String) AWS IAM Role External ID. Used when setting up cross-account access to your ECR repositories.
*
*
*
* ### `keypair`
*
* Optional:
*
* - **passphrase** (String, Sensitive) Passphrase for private key.
* - **public_key** (String) Public Key.
* - **secret_key** (String, Sensitive) Secret/Private Key.
*
*
*
* ### `natsAccount`
*
* Required:
*
* - **account_id** (String) Account ID.
* - **private_key** (String) Private Key.
*
*
*
* ### `opaque`
*
* Optional:
*
* - **encoding** (String) Available encodings: `plain`, `base64`. Default: `plain`.
* - **payload** (String, Sensitive) Plain text or base64 encoded string. Use `encoding` attribute to specify encoding.
*
*
*
* ### `tls`
*
* Optional:
*
* - **cert** (String) Public Certificate.
* - **chain** (String) Chain Certificate.
* - **key** (String, Sensitive) Private Certificate.
*
*
*
* ### `userpass`
*
* Optional:
*
* - **encoding** (String) Available encodings: `plain`, `base64`. Default: `plain`.
* - **password** (String, Sensitive) Password.
* - **username** (String) Username.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cpln from "@pulumiverse/cpln";
*
* export = async () => {
* const example = await cpln.getSecret({
* name: "example-secret-opaque",
* });
* return {
* "example-secret-payload": example.opaques?.payload,
* };
* }
* ```
*/
export declare function getSecret(args: GetSecretArgs, opts?: pulumi.InvokeOptions): Promise;
/**
* A collection of arguments for invoking getSecret.
*/
export interface GetSecretArgs {
aws?: inputs.GetSecretAw[];
azureConnectors?: inputs.GetSecretAzureConnector[];
ecrs?: inputs.GetSecretEcr[];
keypairs?: inputs.GetSecretKeypair[];
name: string;
natsAccounts?: inputs.GetSecretNatsAccount[];
opaques?: inputs.GetSecretOpaque[];
tls?: inputs.GetSecretTl[];
userpasses?: inputs.GetSecretUserpass[];
}
/**
* A collection of values returned by getSecret.
*/
export interface GetSecretResult {
readonly aws?: outputs.GetSecretAw[];
readonly azureConnectors?: outputs.GetSecretAzureConnector[];
readonly azureSdk: string;
readonly cplnId: string;
readonly description: string;
readonly dictionary: {
[key: string]: string;
};
readonly dictionaryAsEnvs: {
[key: string]: string;
};
readonly docker: string;
readonly ecrs?: outputs.GetSecretEcr[];
readonly gcp: string;
readonly id: string;
readonly keypairs?: outputs.GetSecretKeypair[];
readonly name: string;
readonly natsAccounts?: outputs.GetSecretNatsAccount[];
readonly opaques?: outputs.GetSecretOpaque[];
readonly secretLink: string;
readonly selfLink: string;
readonly tags: {
[key: string]: string;
};
readonly tls?: outputs.GetSecretTl[];
readonly userpasses?: outputs.GetSecretUserpass[];
}
/**
* Use this data source to access information about a [Secret](https://docs.controlplane.com/reference/secret) within Control Plane.
*
* ## Required
*
* - **name** (String) Name of the secret.
*
* ## Outputs
*
* The following attributes are exported:
*
* - **cpln_id** (String) The ID, in GUID format, of the secret.
* - **name** (String) Name of the secret.
* - **description** (String) Description of the secret.
* - **tags** (Map of String) Key-value map of resource tags.
* - **self_link** (String) Full link to this resource. Can be referenced by other resources.
* - **secret_link** (String) Output used when linking a secret to an environment variable or volume, in the format: `cpln://secret/SECRET_NAME`.
* - **dictionary_as_envs** (Map of String) If a dictionary secret is defined, this output will be a key-value map in the following format: `key = cpln://secret/SECRET_NAME.key`.
* - **aws** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#aws).
* - **azure_connector** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#azure-connector).
* - **azure_sdk** (String, Sensitive) JSON string containing the Docker secret. [Reference Page](https://docs.controlplane.com/reference/secret#azure).
* - **dictionary** (Map of String) List of unique key-value pairs. [Reference Page](https://docs.controlplane.com/reference/secret#dictionary).
* - **docker** (String, Sensitive) JSON string containing the Docker secret. [Reference Page](https://docs.controlplane.com/reference/secret#docker).
* - **ecr** (Block List, Max: 1) (see below).
* - **gcp** (String, Sensitive) JSON string containing the GCP secret. [Reference Page](https://docs.controlplane.com/reference/secret#gcp)
* - **keypair** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#keypair).
* - **nats_account** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#nats-account).
* - **opaque** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#opaque).
* - **tls** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#tls).
* - **userpass** (Block List, Max: 1) (see below) [Reference Page](https://docs.controlplane.com/reference/secret#username).
*
*
*
* ### `aws`
*
* Optional:
*
* - **access_key** (String, Sensitive) Access Key provided by AWS.
* - **role_arn** (String) Role ARN provided by AWS.
* - **secret_key** (String, Sensitive) Secret Key provided by AWS.
* - **external_id** (String) AWS IAM Role External ID.
*
*
*
* ### `azureConnector`
*
* Optional:
*
* - **code** (String, Sensitive) Code/Key to authenticate to deployment URL.
* - **url** (String, Sensitive) Deployment URL.
*
*
*
* ### `ecr`
*
* [Reference Page](https://docs.controlplane.com/reference/secret#ecr)
*
* Optional:
*
* - **access_key** (String) Access Key provided by AWS.
* - **repos** (Set of String) List of ECR repositories.
* - **role_arn** (String) Role ARN provided by AWS.
* - **secret_key** (String, Sensitive) Secret Key provided by AWS.
* - **external_id** (String) AWS IAM Role External ID. Used when setting up cross-account access to your ECR repositories.
*
*
*
* ### `keypair`
*
* Optional:
*
* - **passphrase** (String, Sensitive) Passphrase for private key.
* - **public_key** (String) Public Key.
* - **secret_key** (String, Sensitive) Secret/Private Key.
*
*
*
* ### `natsAccount`
*
* Required:
*
* - **account_id** (String) Account ID.
* - **private_key** (String) Private Key.
*
*
*
* ### `opaque`
*
* Optional:
*
* - **encoding** (String) Available encodings: `plain`, `base64`. Default: `plain`.
* - **payload** (String, Sensitive) Plain text or base64 encoded string. Use `encoding` attribute to specify encoding.
*
*
*
* ### `tls`
*
* Optional:
*
* - **cert** (String) Public Certificate.
* - **chain** (String) Chain Certificate.
* - **key** (String, Sensitive) Private Certificate.
*
*
*
* ### `userpass`
*
* Optional:
*
* - **encoding** (String) Available encodings: `plain`, `base64`. Default: `plain`.
* - **password** (String, Sensitive) Password.
* - **username** (String) Username.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cpln from "@pulumiverse/cpln";
*
* export = async () => {
* const example = await cpln.getSecret({
* name: "example-secret-opaque",
* });
* return {
* "example-secret-payload": example.opaques?.payload,
* };
* }
* ```
*/
export declare function getSecretOutput(args: GetSecretOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output;
/**
* A collection of arguments for invoking getSecret.
*/
export interface GetSecretOutputArgs {
aws?: pulumi.Input[]>;
azureConnectors?: pulumi.Input[]>;
ecrs?: pulumi.Input[]>;
keypairs?: pulumi.Input[]>;
name: pulumi.Input;
natsAccounts?: pulumi.Input[]>;
opaques?: pulumi.Input[]>;
tls?: pulumi.Input[]>;
userpasses?: pulumi.Input[]>;
}