@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
190 lines • 7.71 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The `scaleway.secrets.Version` resource allows you to create and manage secret versions in Scaleway Secret Manager.
*
* Refer to the Secret Manager [product documentation](https://www.scaleway.com/en/docs/secret-manager/) and [API documentation](https://www.scaleway.com/en/developers/api/secret-manager/) for more information.
*
* > **Security Best Practice:**
* For enhanced security, we recommend using the `dataWo` write-only argument instead of the regular `data` argument. This ensures your sensitive data is never stored in Terraform state files, providing superior protection against accidental exposure. Write-Only arguments are supported in Terraform 1.11.0 and later.
*
* ## Example Usage
*
* ### Create a secret and a version
*
* The following commands allow you to:
*
* - create a secret named `foo`
* - create a version of this secret containing the `myNewSecret` data
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.secrets.Secret("main", {
* name: "foo",
* description: "barr",
* tags: [
* "foo",
* "terraform",
* ],
* });
* const v1 = new scaleway.secrets.Version("v1", {
* description: "version1",
* secretId: main.id,
* data: "my_new_secret",
* });
* ```
*
* ## Import
*
* This section explains how to import a secret version using the `{region}/{id}/{revision}` format.
*
* > **Important:** Keep in mind that if you import with the `latest` revision, you will overwrite the previous version you might have been using.
*
* ```sh
* $ pulumi import scaleway:secrets/version:Version main fr-par/11111111-1111-1111-1111-111111111111/2
* ```
*/
export declare class Version extends pulumi.CustomResource {
/**
* Get an existing Version 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: string, id: pulumi.Input<pulumi.ID>, state?: VersionState, opts?: pulumi.CustomResourceOptions): Version;
/**
* Returns true if the given object is an instance of Version. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Version;
/**
* The date and time of the secret version's creation (in RFC 3339 format).
*/
readonly createdAt: pulumi.Output<string>;
/**
* The raw data payload of the secret version. Must not exceed 64KiB in size (e.g. `my-secret-version-payload`). Find out more on the data section.
*/
readonly data: pulumi.Output<string | undefined>;
/**
* **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
* The raw data payload of your secret version in write-only mode. Must not exceed 64KiB in size (e.g. `my-secret-version-payload`). Find out more on the data section.
*/
readonly dataWo: pulumi.Output<string | undefined>;
/**
* The version of the write-only data. To update the `dataWo`, you must also update the `dataWoVersion`.
*/
readonly dataWoVersion: pulumi.Output<number | undefined>;
/**
* Description of the secret version (e.g. `my-new-description`).
*/
readonly description: pulumi.Output<string | undefined>;
/**
* ). The region where the resource exists.
*/
readonly region: pulumi.Output<string | undefined>;
/**
* The revision number of the secret version.
*/
readonly revision: pulumi.Output<string>;
/**
* The ID of the secret associated with the version.
*/
readonly secretId: pulumi.Output<string>;
/**
* The status of the secret version.
*/
readonly status: pulumi.Output<string>;
/**
* The date and time of the secret version's last update (in RFC 3339 format).
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Create a Version resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: VersionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Version resources.
*/
export interface VersionState {
/**
* The date and time of the secret version's creation (in RFC 3339 format).
*/
createdAt?: pulumi.Input<string | undefined>;
/**
* The raw data payload of the secret version. Must not exceed 64KiB in size (e.g. `my-secret-version-payload`). Find out more on the data section.
*/
data?: pulumi.Input<string | undefined>;
/**
* **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
* The raw data payload of your secret version in write-only mode. Must not exceed 64KiB in size (e.g. `my-secret-version-payload`). Find out more on the data section.
*/
dataWo?: pulumi.Input<string | undefined>;
/**
* The version of the write-only data. To update the `dataWo`, you must also update the `dataWoVersion`.
*/
dataWoVersion?: pulumi.Input<number | undefined>;
/**
* Description of the secret version (e.g. `my-new-description`).
*/
description?: pulumi.Input<string | undefined>;
/**
* ). The region where the resource exists.
*/
region?: pulumi.Input<string | undefined>;
/**
* The revision number of the secret version.
*/
revision?: pulumi.Input<string | undefined>;
/**
* The ID of the secret associated with the version.
*/
secretId?: pulumi.Input<string | undefined>;
/**
* The status of the secret version.
*/
status?: pulumi.Input<string | undefined>;
/**
* The date and time of the secret version's last update (in RFC 3339 format).
*/
updatedAt?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a Version resource.
*/
export interface VersionArgs {
/**
* The raw data payload of the secret version. Must not exceed 64KiB in size (e.g. `my-secret-version-payload`). Find out more on the data section.
*/
data?: pulumi.Input<string | undefined>;
/**
* **NOTE:** This field is write-only and its value will not be updated in state as part of read operations.
* The raw data payload of your secret version in write-only mode. Must not exceed 64KiB in size (e.g. `my-secret-version-payload`). Find out more on the data section.
*/
dataWo?: pulumi.Input<string | undefined>;
/**
* The version of the write-only data. To update the `dataWo`, you must also update the `dataWoVersion`.
*/
dataWoVersion?: pulumi.Input<number | undefined>;
/**
* Description of the secret version (e.g. `my-new-description`).
*/
description?: pulumi.Input<string | undefined>;
/**
* ). The region where the resource exists.
*/
region?: pulumi.Input<string | undefined>;
/**
* The ID of the secret associated with the version.
*/
secretId: pulumi.Input<string>;
}
//# sourceMappingURL=version.d.ts.map