@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
305 lines • 10.2 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Provides a Scaleway Key Manager Key resource.\
* This resource allows you to create and manage cryptographic keys in Scaleway Key Manager (KMS).
*
* ## Example Usage
*
* ### Symmetric Encryption Key
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const symmetric = new scaleway.keymanager.Key("symmetric", {
* name: "my-kms-key",
* region: "fr-par",
* projectId: "your-project-id",
* usage: "symmetric_encryption",
* algorithm: "aes_256_gcm",
* description: "Key for encrypting secrets",
* tags: [
* "env:prod",
* "kms",
* ],
* unprotected: true,
* rotationPolicy: {
* rotationPeriod: "720h",
* },
* });
* ```
*
* ### Asymmetric Encryption Key with RSA-4096
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const rsa4096 = new scaleway.keymanager.Key("rsa_4096", {
* name: "rsa-4096-key",
* region: "fr-par",
* usage: "asymmetric_encryption",
* algorithm: "rsa_oaep_4096_sha256",
* description: "Key for encrypting large files with RSA-4096",
* unprotected: true,
* });
* ```
*
* ### Asymmetric Signing Key
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const signing = new scaleway.keymanager.Key("signing", {
* name: "signing-key",
* region: "fr-par",
* usage: "asymmetric_signing",
* algorithm: "rsa_pss_2048_sha256",
* description: "Key for signing documents",
* unprotected: true,
* });
* ```
*
* ## Notes
*
* - **Protection**: By default, keys are protected and cannot be deleted. To allow deletion, set `unprotected = true` when creating the key.
* - **Rotation Policy**: The `rotationPolicy` block allows you to set automatic rotation for your key.
* - **Origin**: The `origin` argument is optional and defaults to `scalewayKms`. Use `external` if you want to import an external key (see Scaleway documentation for details).
* - **Project and Region**: If not specified, `projectId` and `region` will default to the provider configuration.
* - **Algorithm Validation**: The provider validates that the specified `algorithm` is compatible with the `usage` type at plan time, providing early feedback on configuration errors.
*
* ## Import
*
* You can import a key using its ID and region:
*
* ```sh
* $ pulumi import scaleway:index/keyManagerKey:KeyManagerKey main fr-par/11111111-2222-3333-4444-555555555555
* ```
*
* @deprecated scaleway.index/keymanagerkey.KeyManagerKey has been deprecated in favor of scaleway.keymanager/key.Key
*/
export declare class KeyManagerKey extends pulumi.CustomResource {
/**
* Get an existing KeyManagerKey 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?: KeyManagerKeyState, opts?: pulumi.CustomResourceOptions): KeyManagerKey;
/**
* Returns true if the given object is an instance of KeyManagerKey. 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 KeyManagerKey;
/**
* – The cryptographic algorithm to use. Valid values depend on the `usage`:
* - For `symmetricEncryption`:
*/
readonly algorithm: pulumi.Output<string>;
/**
* The date and time when the key was created.
*/
readonly createdAt: pulumi.Output<string>;
/**
* – A description for the key.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Whether the key is locked.
*/
readonly locked: pulumi.Output<boolean>;
/**
* The name of the key.
*/
readonly name: pulumi.Output<string>;
/**
* – The origin of the key. Valid values are:
*/
readonly origin: pulumi.Output<string | undefined>;
/**
* – The ID of the project the key belongs to.
*
* **Key Usage and Algorithm (both required):**
*/
readonly projectId: pulumi.Output<string>;
/**
* Whether the key is protected from deletion.
*/
readonly protected: pulumi.Output<boolean>;
/**
* The region in which to create the key (e.g., `fr-par`).
*/
readonly region: pulumi.Output<string | undefined>;
/**
* The date and time when the key was last rotated.
*/
readonly rotatedAt: pulumi.Output<string>;
/**
* The number of times the key has been rotated.
*/
readonly rotationCount: pulumi.Output<number>;
/**
* – Rotation policy for the key:
*/
readonly rotationPolicy: pulumi.Output<outputs.KeyManagerKeyRotationPolicy | undefined>;
/**
* The state of the key (e.g., `enabled`).
*/
readonly state: pulumi.Output<string>;
/**
* – A list of tags to assign to the key.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* – If `true`, the key can be deleted. Defaults to `false` (protected).
*/
readonly unprotected: pulumi.Output<boolean | undefined>;
/**
* The date and time when the key was last updated.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* – The usage type of the key. Valid values:
*/
readonly usage: pulumi.Output<string>;
/**
* Create a KeyManagerKey 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/keymanagerkey.KeyManagerKey has been deprecated in favor of scaleway.keymanager/key.Key */
constructor(name: string, args: KeyManagerKeyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering KeyManagerKey resources.
*/
export interface KeyManagerKeyState {
/**
* – The cryptographic algorithm to use. Valid values depend on the `usage`:
* - For `symmetricEncryption`:
*/
algorithm?: pulumi.Input<string | undefined>;
/**
* The date and time when the key was created.
*/
createdAt?: pulumi.Input<string | undefined>;
/**
* – A description for the key.
*/
description?: pulumi.Input<string | undefined>;
/**
* Whether the key is locked.
*/
locked?: pulumi.Input<boolean | undefined>;
/**
* The name of the key.
*/
name?: pulumi.Input<string | undefined>;
/**
* – The origin of the key. Valid values are:
*/
origin?: pulumi.Input<string | undefined>;
/**
* – The ID of the project the key belongs to.
*
* **Key Usage and Algorithm (both required):**
*/
projectId?: pulumi.Input<string | undefined>;
/**
* Whether the key is protected from deletion.
*/
protected?: pulumi.Input<boolean | undefined>;
/**
* The region in which to create the key (e.g., `fr-par`).
*/
region?: pulumi.Input<string | undefined>;
/**
* The date and time when the key was last rotated.
*/
rotatedAt?: pulumi.Input<string | undefined>;
/**
* The number of times the key has been rotated.
*/
rotationCount?: pulumi.Input<number | undefined>;
/**
* – Rotation policy for the key:
*/
rotationPolicy?: pulumi.Input<inputs.KeyManagerKeyRotationPolicy | undefined>;
/**
* The state of the key (e.g., `enabled`).
*/
state?: pulumi.Input<string | undefined>;
/**
* – A list of tags to assign to the key.
*/
tags?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* – If `true`, the key can be deleted. Defaults to `false` (protected).
*/
unprotected?: pulumi.Input<boolean | undefined>;
/**
* The date and time when the key was last updated.
*/
updatedAt?: pulumi.Input<string | undefined>;
/**
* – The usage type of the key. Valid values:
*/
usage?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a KeyManagerKey resource.
*/
export interface KeyManagerKeyArgs {
/**
* – The cryptographic algorithm to use. Valid values depend on the `usage`:
* - For `symmetricEncryption`:
*/
algorithm: pulumi.Input<string>;
/**
* – A description for the key.
*/
description?: pulumi.Input<string | undefined>;
/**
* The name of the key.
*/
name?: pulumi.Input<string | undefined>;
/**
* – The origin of the key. Valid values are:
*/
origin?: pulumi.Input<string | undefined>;
/**
* – The ID of the project the key belongs to.
*
* **Key Usage and Algorithm (both required):**
*/
projectId?: pulumi.Input<string | undefined>;
/**
* The region in which to create the key (e.g., `fr-par`).
*/
region?: pulumi.Input<string | undefined>;
/**
* – Rotation policy for the key:
*/
rotationPolicy?: pulumi.Input<inputs.KeyManagerKeyRotationPolicy | undefined>;
/**
* – A list of tags to assign to the key.
*/
tags?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* – If `true`, the key can be deleted. Defaults to `false` (protected).
*/
unprotected?: pulumi.Input<boolean | undefined>;
/**
* – The usage type of the key. Valid values:
*/
usage: pulumi.Input<string>;
}
//# sourceMappingURL=keyManagerKey.d.ts.map