UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

246 lines 9.38 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * The `scaleway.secrets.Secret` resource allows you to create and manage secrets 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 * * The following command allows you to create a secret named `foo` with a description (`barr`), and tags (`foo` and `terraform`). * * ```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", * ], * }); * ``` * * ### Apply the ephemeral policy on a secret * * The following command shows you how to apply the [ephemeral policy](https://www.scaleway.com/en/docs/identity-and-access-management/secret-manager/concepts/#ephemeral-policy) on your secret named `foo`. * * In the example below, your secret's lifetime is of 24 hours, your secret versions will expire once they are accessed, and they are disabled after being accessed. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const ephemeral = new scaleway.secrets.Secret("ephemeral", { * name: "foo", * ephemeralPolicies: [{ * ttl: "24h", * expiresOnceAccessed: true, * action: "disable", * }], * }); * ``` * * ## Import * * This section explains how to import a secret using the `{region}/{id}` format. * * ```sh * $ pulumi import scaleway:index/secret:Secret main fr-par/11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/secret.Secret has been deprecated in favor of scaleway.secrets/secret.Secret */ export declare class Secret extends pulumi.CustomResource { /** * Get an existing Secret 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?: SecretState, opts?: pulumi.CustomResourceOptions): Secret; /** * Returns true if the given object is an instance of Secret. 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 Secret; /** * Date and time of the secret's creation (in RFC 3339 format). */ readonly createdAt: pulumi.Output<string>; /** * Description of the secret (e.g. `my-new-description`). */ readonly description: pulumi.Output<string | undefined>; /** * Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions. */ readonly ephemeralPolicies: pulumi.Output<outputs.SecretEphemeralPolicy[] | undefined>; /** * Name of the secret (e.g. `my-secret`). */ readonly name: pulumi.Output<string>; /** * Path of the secret, defaults to `/`. */ readonly path: pulumi.Output<string | undefined>; /** * The project ID containing is the secret. */ readonly projectId: pulumi.Output<string>; /** * True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false. */ readonly protected: pulumi.Output<boolean | undefined>; /** * `region`) The region * in which the resource exists. */ readonly region: pulumi.Output<string | undefined>; /** * The status of the secret. */ readonly status: pulumi.Output<string>; /** * Tags of the secret (e.g. `["tag", "secret"]`). */ readonly tags: pulumi.Output<string[] | undefined>; /** * Type of the secret. If not specified, the type is Opaque. Available values can be found in [SDK Constants](https://pkg.go.dev/github.com/scaleway/scaleway-sdk-go@master/api/secret/v1beta1#pkg-constants). */ readonly type: pulumi.Output<string | undefined>; /** * Date and time of the secret's last update (in RFC 3339 format). */ readonly updatedAt: pulumi.Output<string>; /** * The amount of secret versions. */ readonly versionCount: pulumi.Output<number>; /** * List of the versions of the secret */ readonly versions: pulumi.Output<outputs.SecretVersion[]>; /** * Create a Secret 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/secret.Secret has been deprecated in favor of scaleway.secrets/secret.Secret */ constructor(name: string, args?: SecretArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Secret resources. */ export interface SecretState { /** * Date and time of the secret's creation (in RFC 3339 format). */ createdAt?: pulumi.Input<string | undefined>; /** * Description of the secret (e.g. `my-new-description`). */ description?: pulumi.Input<string | undefined>; /** * Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions. */ ephemeralPolicies?: pulumi.Input<pulumi.Input<inputs.SecretEphemeralPolicy>[] | undefined>; /** * Name of the secret (e.g. `my-secret`). */ name?: pulumi.Input<string | undefined>; /** * Path of the secret, defaults to `/`. */ path?: pulumi.Input<string | undefined>; /** * The project ID containing is the secret. */ projectId?: pulumi.Input<string | undefined>; /** * True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false. */ protected?: pulumi.Input<boolean | undefined>; /** * `region`) The region * in which the resource exists. */ region?: pulumi.Input<string | undefined>; /** * The status of the secret. */ status?: pulumi.Input<string | undefined>; /** * Tags of the secret (e.g. `["tag", "secret"]`). */ tags?: pulumi.Input<pulumi.Input<string>[] | undefined>; /** * Type of the secret. If not specified, the type is Opaque. Available values can be found in [SDK Constants](https://pkg.go.dev/github.com/scaleway/scaleway-sdk-go@master/api/secret/v1beta1#pkg-constants). */ type?: pulumi.Input<string | undefined>; /** * Date and time of the secret's last update (in RFC 3339 format). */ updatedAt?: pulumi.Input<string | undefined>; /** * The amount of secret versions. */ versionCount?: pulumi.Input<number | undefined>; /** * List of the versions of the secret */ versions?: pulumi.Input<pulumi.Input<inputs.SecretVersion>[] | undefined>; } /** * The set of arguments for constructing a Secret resource. */ export interface SecretArgs { /** * Description of the secret (e.g. `my-new-description`). */ description?: pulumi.Input<string | undefined>; /** * Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions. */ ephemeralPolicies?: pulumi.Input<pulumi.Input<inputs.SecretEphemeralPolicy>[] | undefined>; /** * Name of the secret (e.g. `my-secret`). */ name?: pulumi.Input<string | undefined>; /** * Path of the secret, defaults to `/`. */ path?: pulumi.Input<string | undefined>; /** * The project ID containing is the secret. */ projectId?: pulumi.Input<string | undefined>; /** * True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false. */ protected?: pulumi.Input<boolean | undefined>; /** * `region`) The region * in which the resource exists. */ region?: pulumi.Input<string | undefined>; /** * Tags of the secret (e.g. `["tag", "secret"]`). */ tags?: pulumi.Input<pulumi.Input<string>[] | undefined>; /** * Type of the secret. If not specified, the type is Opaque. Available values can be found in [SDK Constants](https://pkg.go.dev/github.com/scaleway/scaleway-sdk-go@master/api/secret/v1beta1#pkg-constants). */ type?: pulumi.Input<string | undefined>; } //# sourceMappingURL=secret.d.ts.map