UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

150 lines (149 loc) 4.93 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides access to Kubernetes Secret configuration for a given project, region and Composer Environment. * * To get more information about Composer User Workloads Secrets, see: * * * [API documentation](https://cloud.google.com/composer/docs/reference/rest/v1/projects.locations.environments.userWorkloadsSecrets) * * How-to Guides * * [Official Documentation](https://cloud.google.com/artifact-registry/docs/overview) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as std from "@pulumi/std"; * * const exampleEnvironment = new gcp.composer.Environment("example", { * name: "example-environment", * config: { * softwareConfig: { * imageVersion: "composer-3-airflow-2", * }, * }, * }); * const exampleUserWorkloadsSecret = new gcp.composer.UserWorkloadsSecret("example", { * environment: exampleEnvironment.name, * name: "example-secret", * data: { * username: std.base64encode({ * input: "username", * }).then(invoke => invoke.result), * password: std.base64encode({ * input: "password", * }).then(invoke => invoke.result), * }, * }); * const example = exampleEnvironment.name.apply(name => gcp.composer.getUserWorkloadsSecretOutput({ * environment: name, * name: googleComposerUserWorkloadsSecret.example.name, * })); * export const debug = example; * ``` */ export declare function getUserWorkloadsSecret(args: GetUserWorkloadsSecretArgs, opts?: pulumi.InvokeOptions): Promise<GetUserWorkloadsSecretResult>; /** * A collection of arguments for invoking getUserWorkloadsSecret. */ export interface GetUserWorkloadsSecretArgs { /** * Environment where the Secret is stored. */ environment: string; /** * Name of the Secret. */ name: string; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: string; /** * The location or Compute Engine region of the environment. */ region?: string; } /** * A collection of values returned by getUserWorkloadsSecret. */ export interface GetUserWorkloadsSecretResult { readonly data: { [key: string]: string; }; readonly environment: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly name: string; readonly project?: string; readonly region?: string; } /** * Provides access to Kubernetes Secret configuration for a given project, region and Composer Environment. * * To get more information about Composer User Workloads Secrets, see: * * * [API documentation](https://cloud.google.com/composer/docs/reference/rest/v1/projects.locations.environments.userWorkloadsSecrets) * * How-to Guides * * [Official Documentation](https://cloud.google.com/artifact-registry/docs/overview) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as std from "@pulumi/std"; * * const exampleEnvironment = new gcp.composer.Environment("example", { * name: "example-environment", * config: { * softwareConfig: { * imageVersion: "composer-3-airflow-2", * }, * }, * }); * const exampleUserWorkloadsSecret = new gcp.composer.UserWorkloadsSecret("example", { * environment: exampleEnvironment.name, * name: "example-secret", * data: { * username: std.base64encode({ * input: "username", * }).then(invoke => invoke.result), * password: std.base64encode({ * input: "password", * }).then(invoke => invoke.result), * }, * }); * const example = exampleEnvironment.name.apply(name => gcp.composer.getUserWorkloadsSecretOutput({ * environment: name, * name: googleComposerUserWorkloadsSecret.example.name, * })); * export const debug = example; * ``` */ export declare function getUserWorkloadsSecretOutput(args: GetUserWorkloadsSecretOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetUserWorkloadsSecretResult>; /** * A collection of arguments for invoking getUserWorkloadsSecret. */ export interface GetUserWorkloadsSecretOutputArgs { /** * Environment where the Secret is stored. */ environment: pulumi.Input<string>; /** * Name of the Secret. */ name: pulumi.Input<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * The location or Compute Engine region of the environment. */ region?: pulumi.Input<string>; }