import * as pulumi from "@pulumi/pulumi"; /** * The `scaleway.SecretVersion` data source is used to get information about a specific secret version stored in Scaleway Secret Manager. * * Refer to the Secret Manager [product documentation](https://www.scaleway.com/en/docs/identity-and-access-management/secret-manager/) and [API documentation](https://www.scaleway.com/en/developers/api/secret-manager/) for more information. * * ## Example Usage * * ### Use Secret Manager * * The following commands allow you to: * * - create a secret named `fooii` * - create a new version of `fooii` containing data (`yourSecret`) * - retrieve the secret version specified by the secret ID and the desired version * - retrieve the secret version specified by the secret name and the desired version * * The output blocks display the sensitive data contained in your secret version. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * import * as scaleway from "@pulumi/scaleway"; * * // Create a secret named fooii * const mainSecret = new scaleway.Secret("mainSecret", {description: "barr"}); * // Create a version of fooii containing data * const mainSecretVersion = new scaleway.SecretVersion("mainSecretVersion", { * description: "your description", * secretId: mainSecret.id, * data: "your_secret", * }); * const dataBySecretId = scaleway.getSecretVersionOutput({ * secretId: mainSecret.id, * revision: "1", * }); * const dataBySecretName = scaleway.getSecretVersionOutput({ * secretName: mainSecret.name, * revision: "1", * }); * export const scalewaySecretAccessPayload = dataBySecretName.apply(dataBySecretName => dataBySecretName.data); * export const scalewaySecretAccessPayloadById = dataBySecretId.apply(dataBySecretId => dataBySecretId.data); * ``` * * ## Data information * * Note: This data source provides you with access to the secret payload, which is encoded in base64. * * Keep in mind that this is a sensitive attribute. For more information, * see Sensitive Data in State. * * > **Important:** This property is sensitive and will not be displayed in the pulumi preview, for security reasons. */ export declare function getSecretVersion(args?: GetSecretVersionArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getSecretVersion. */ export interface GetSecretVersionArgs { organizationId?: string; /** * The ID of the Scaleway Project associated with the secret version. */ projectId?: string; region?: string; /** * The revision for this secret version. Refer to alternative values (ex: `latest`) in the [API documentation](https://www.scaleway.com/en/developers/api/secret-manager/#path-secret-versions-access-a-secrets-version-using-the-secrets-id) */ revision?: string; /** * The ID of the secret associated with the secret version. Only one of `secretId` and `secretName` should be specified. */ secretId?: string; /** * The name of the secret associated with the secret version. * Only one of `secretId` and `secretName` should be specified. */ secretName?: string; } /** * A collection of values returned by getSecretVersion. */ export interface GetSecretVersionResult { /** * The date and time of the secret version's creation in RFC 3339 format. */ readonly createdAt: string; /** * The data payload of the secret version. This is a sensitive attribute containing the secret value. Learn more in the [data section](https://www.terraform.io/#data-information). */ readonly data: string; /** * (Optional) The description of the secret version (e.g. `my-new-description`). */ readonly description: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly organizationId: string; readonly projectId?: string; readonly region?: string; readonly revision?: string; readonly secretId?: string; readonly secretName?: string; /** * The status of the secret version. */ readonly status: string; /** * The date and time of the secret version's last update in RFC 3339 format. */ readonly updatedAt: string; } /** * The `scaleway.SecretVersion` data source is used to get information about a specific secret version stored in Scaleway Secret Manager. * * Refer to the Secret Manager [product documentation](https://www.scaleway.com/en/docs/identity-and-access-management/secret-manager/) and [API documentation](https://www.scaleway.com/en/developers/api/secret-manager/) for more information. * * ## Example Usage * * ### Use Secret Manager * * The following commands allow you to: * * - create a secret named `fooii` * - create a new version of `fooii` containing data (`yourSecret`) * - retrieve the secret version specified by the secret ID and the desired version * - retrieve the secret version specified by the secret name and the desired version * * The output blocks display the sensitive data contained in your secret version. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * import * as scaleway from "@pulumi/scaleway"; * * // Create a secret named fooii * const mainSecret = new scaleway.Secret("mainSecret", {description: "barr"}); * // Create a version of fooii containing data * const mainSecretVersion = new scaleway.SecretVersion("mainSecretVersion", { * description: "your description", * secretId: mainSecret.id, * data: "your_secret", * }); * const dataBySecretId = scaleway.getSecretVersionOutput({ * secretId: mainSecret.id, * revision: "1", * }); * const dataBySecretName = scaleway.getSecretVersionOutput({ * secretName: mainSecret.name, * revision: "1", * }); * export const scalewaySecretAccessPayload = dataBySecretName.apply(dataBySecretName => dataBySecretName.data); * export const scalewaySecretAccessPayloadById = dataBySecretId.apply(dataBySecretId => dataBySecretId.data); * ``` * * ## Data information * * Note: This data source provides you with access to the secret payload, which is encoded in base64. * * Keep in mind that this is a sensitive attribute. For more information, * see Sensitive Data in State. * * > **Important:** This property is sensitive and will not be displayed in the pulumi preview, for security reasons. */ export declare function getSecretVersionOutput(args?: GetSecretVersionOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getSecretVersion. */ export interface GetSecretVersionOutputArgs { organizationId?: pulumi.Input; /** * The ID of the Scaleway Project associated with the secret version. */ projectId?: pulumi.Input; region?: pulumi.Input; /** * The revision for this secret version. Refer to alternative values (ex: `latest`) in the [API documentation](https://www.scaleway.com/en/developers/api/secret-manager/#path-secret-versions-access-a-secrets-version-using-the-secrets-id) */ revision?: pulumi.Input; /** * The ID of the secret associated with the secret version. Only one of `secretId` and `secretName` should be specified. */ secretId?: pulumi.Input; /** * The name of the secret associated with the secret version. * Only one of `secretId` and `secretName` should be specified. */ secretName?: pulumi.Input; }