@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
168 lines (167 loc) • 5.77 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* The `scaleway.secrets.Secret` data source is used to get information about a specific secret in Scaleway's 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
*
* ### Create a secret and get its information
*
* The following commands allow you to:
*
* - create a secret named `foo` with the description `barr`
* - retrieve the secret's information using the secret's ID
* - retrieve the secret's information using the secret's name
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Create a secret
* const main = new scaleway.secrets.Secret("main", {
* name: "foo",
* description: "barr",
* });
* // Get the secret information specified by the secret ID
* const mySecret = scaleway.secrets.getSecret({
* secretId: "11111111-1111-1111-1111-111111111111",
* });
* // Get the secret information specified by the secret name
* const byName = scaleway.secrets.getSecret({
* name: "your_secret_name",
* });
* ```
*/
/** @deprecated scaleway.index/getsecret.getSecret has been deprecated in favor of scaleway.secrets/getsecret.getSecret */
export declare function getSecret(args?: GetSecretArgs, opts?: pulumi.InvokeOptions): Promise<GetSecretResult>;
/**
* A collection of arguments for invoking getSecret.
*/
export interface GetSecretArgs {
/**
* The name of the secret.
* Only one of `name` and `secretId` should be specified.
*/
name?: string;
/**
* The ID of the Scaleway Organization the Project is associated with. If no default `organizationId` is set, it must be set explicitly in this data source.
*/
organizationId?: string;
/**
* The path of the secret.
* Conflicts with `secretId`.
*/
path?: string;
/**
* ). The ID of the
* Project the secret is associated with.
*/
projectId?: string;
/**
* ). The region in which the secret exists.
*/
region?: string;
/**
* The ID of the secret.
* Only one of `name` and `secretId` should be specified.
*/
secretId?: string;
}
/**
* A collection of values returned by getSecret.
*/
export interface GetSecretResult {
readonly createdAt: string;
readonly description: string;
readonly ephemeralPolicies: outputs.GetSecretEphemeralPolicy[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly name?: string;
readonly organizationId: string;
readonly path?: string;
readonly projectId?: string;
readonly protected: boolean;
readonly region?: string;
readonly secretId?: string;
readonly status: string;
readonly tags: string[];
readonly type: string;
readonly updatedAt: string;
readonly versionCount: number;
readonly versions: outputs.GetSecretVersion[];
}
/**
* The `scaleway.secrets.Secret` data source is used to get information about a specific secret in Scaleway's 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
*
* ### Create a secret and get its information
*
* The following commands allow you to:
*
* - create a secret named `foo` with the description `barr`
* - retrieve the secret's information using the secret's ID
* - retrieve the secret's information using the secret's name
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Create a secret
* const main = new scaleway.secrets.Secret("main", {
* name: "foo",
* description: "barr",
* });
* // Get the secret information specified by the secret ID
* const mySecret = scaleway.secrets.getSecret({
* secretId: "11111111-1111-1111-1111-111111111111",
* });
* // Get the secret information specified by the secret name
* const byName = scaleway.secrets.getSecret({
* name: "your_secret_name",
* });
* ```
*/
/** @deprecated scaleway.index/getsecret.getSecret has been deprecated in favor of scaleway.secrets/getsecret.getSecret */
export declare function getSecretOutput(args?: GetSecretOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSecretResult>;
/**
* A collection of arguments for invoking getSecret.
*/
export interface GetSecretOutputArgs {
/**
* The name of the secret.
* Only one of `name` and `secretId` should be specified.
*/
name?: pulumi.Input<string>;
/**
* The ID of the Scaleway Organization the Project is associated with. If no default `organizationId` is set, it must be set explicitly in this data source.
*/
organizationId?: pulumi.Input<string>;
/**
* The path of the secret.
* Conflicts with `secretId`.
*/
path?: pulumi.Input<string>;
/**
* ). The ID of the
* Project the secret is associated with.
*/
projectId?: pulumi.Input<string>;
/**
* ). The region in which the secret exists.
*/
region?: pulumi.Input<string>;
/**
* The ID of the secret.
* Only one of `name` and `secretId` should be specified.
*/
secretId?: pulumi.Input<string>;
}