@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
127 lines (126 loc) • 4.53 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Get the value and metadata from a Secret Manager secret version. For more information see the [official documentation](https://cloud.google.com/secret-manager/docs/) and [API](https://cloud.google.com/secret-manager/docs/reference/rest/v1/projects.secrets.versions). If you don't need the metadata (i.e., if you want to use a more limited role to access the secret version only), see also the gcp.secretmanager.getSecretVersionAccess datasource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const basic = gcp.secretmanager.getSecretVersion({
* secret: "my-secret",
* });
* ```
*/
/** @deprecated gcp.monitoring.getSecretVersion has been deprecated in favor of gcp.secretmanager.getSecretVersion */
export declare function getSecretVersion(args: GetSecretVersionArgs, opts?: pulumi.InvokeOptions): Promise<GetSecretVersionResult>;
/**
* A collection of arguments for invoking getSecretVersion.
*/
export interface GetSecretVersionArgs {
/**
* If set to `false`, the `secretData`
* will not be fetched. Default is `true`.
*/
fetchSecretData?: boolean;
/**
* If set to `true`, the secret data is
* expected to be base64-encoded string.
*/
isSecretDataBase64?: boolean;
/**
* The project to get the secret version for. If it
* is not provided, the provider project is used.
*/
project?: string;
/**
* The secret to get the secret version for.
*/
secret: string;
/**
* The version of the secret to get. If it
* is not provided, the latest version is retrieved.
*/
version?: string;
}
/**
* A collection of values returned by getSecretVersion.
*/
export interface GetSecretVersionResult {
/**
* The time at which the Secret was created.
*/
readonly createTime: string;
/**
* The time at which the Secret was destroyed. Only present if state is DESTROYED.
*/
readonly destroyTime: string;
/**
* True if the current state of the SecretVersion is enabled.
*/
readonly enabled: boolean;
readonly fetchSecretData?: boolean;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly isSecretDataBase64?: boolean;
/**
* The resource name of the SecretVersion. Format:
* `projects/{{project}}/secrets/{{secret_id}}/versions/{{version}}`
*/
readonly name: string;
readonly project: string;
readonly secret: string;
/**
* The secret data. No larger than 64KiB.
*/
readonly secretData: string;
readonly version: string;
}
/**
* Get the value and metadata from a Secret Manager secret version. For more information see the [official documentation](https://cloud.google.com/secret-manager/docs/) and [API](https://cloud.google.com/secret-manager/docs/reference/rest/v1/projects.secrets.versions). If you don't need the metadata (i.e., if you want to use a more limited role to access the secret version only), see also the gcp.secretmanager.getSecretVersionAccess datasource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const basic = gcp.secretmanager.getSecretVersion({
* secret: "my-secret",
* });
* ```
*/
/** @deprecated gcp.monitoring.getSecretVersion has been deprecated in favor of gcp.secretmanager.getSecretVersion */
export declare function getSecretVersionOutput(args: GetSecretVersionOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSecretVersionResult>;
/**
* A collection of arguments for invoking getSecretVersion.
*/
export interface GetSecretVersionOutputArgs {
/**
* If set to `false`, the `secretData`
* will not be fetched. Default is `true`.
*/
fetchSecretData?: pulumi.Input<boolean>;
/**
* If set to `true`, the secret data is
* expected to be base64-encoded string.
*/
isSecretDataBase64?: pulumi.Input<boolean>;
/**
* The project to get the secret version for. If it
* is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The secret to get the secret version for.
*/
secret: pulumi.Input<string>;
/**
* The version of the secret to get. If it
* is not provided, the latest version is retrieved.
*/
version?: pulumi.Input<string>;
}