@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
165 lines (164 loc) • 6.04 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.
*
* ## 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.
*
* bash
*
* ```sh
* $ pulumi import scaleway:index/secretVersion:SecretVersion main fr-par/11111111-1111-1111-1111-111111111111/2
* ```
*
* @deprecated scaleway.index/secretversion.SecretVersion has been deprecated in favor of scaleway.secrets/version.Version
*/
export declare class SecretVersion extends pulumi.CustomResource {
/**
* Get an existing SecretVersion 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?: SecretVersionState, opts?: pulumi.CustomResourceOptions): SecretVersion;
/**
* Returns true if the given object is an instance of SecretVersion. 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 SecretVersion;
/**
* The date and time of the secret version's creation (in RFC 3339 format).
*/
readonly createdAt: pulumi.Output<string>;
/**
* The 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](https://www.terraform.io/#data-information).
*/
readonly data: pulumi.Output<string>;
/**
* 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>;
/**
* 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 SecretVersion 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.
*/
/** @deprecated scaleway.index/secretversion.SecretVersion has been deprecated in favor of scaleway.secrets/version.Version */
constructor(name: string, args: SecretVersionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering SecretVersion resources.
*/
export interface SecretVersionState {
/**
* The date and time of the secret version's creation (in RFC 3339 format).
*/
createdAt?: pulumi.Input<string>;
/**
* The 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](https://www.terraform.io/#data-information).
*/
data?: pulumi.Input<string>;
/**
* Description of the secret version (e.g. `my-new-description`).
*/
description?: pulumi.Input<string>;
/**
* ). The region where the resource exists.
*/
region?: pulumi.Input<string>;
/**
* The revision number of the secret version.
*/
revision?: pulumi.Input<string>;
/**
* The ID of the secret associated with the version.
*/
secretId?: pulumi.Input<string>;
/**
* The status of the secret version.
*/
status?: pulumi.Input<string>;
/**
* The date and time of the secret version's last update (in RFC 3339 format).
*/
updatedAt?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a SecretVersion resource.
*/
export interface SecretVersionArgs {
/**
* The 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](https://www.terraform.io/#data-information).
*/
data: pulumi.Input<string>;
/**
* Description of the secret version (e.g. `my-new-description`).
*/
description?: pulumi.Input<string>;
/**
* ). The region where the resource exists.
*/
region?: pulumi.Input<string>;
/**
* The ID of the secret associated with the version.
*/
secretId: pulumi.Input<string>;
}