UNPKG

@pulumi/gcp

Version:

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

167 lines (166 loc) 5.63 kB
import * as pulumi from "@pulumi/pulumi"; /** * User workloads Secret used by Airflow tasks that run with Kubernetes Executor or KubernetesPodOperator. * Intended for Composer 3 Environments. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as std from "@pulumi/std"; * * const example = new gcp.composer.Environment("example", { * name: "example-environment", * project: "example-project", * region: "us-central1", * config: { * softwareConfig: { * imageVersion: "example-image-version", * }, * }, * }); * const exampleUserWorkloadsSecret = new gcp.composer.UserWorkloadsSecret("example", { * name: "example-secret", * project: "example-project", * region: "us-central1", * environment: example.name, * data: { * email: std.base64encode({ * input: "example-email", * }).then(invoke => invoke.result), * password: std.base64encode({ * input: "example-password", * }).then(invoke => invoke.result), * }, * }); * ``` * * ## Import * * Secret can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{region}}/environments/{{environment}}/userWorkloadsSecrets/{{name}}` * * * `{{project}}/{{region}}/{{environment}}/{{name}}` * * * `{{environment}}/{{name}}` * * When using the `pulumi import` command, Environment can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:composer/userWorkloadsSecret:UserWorkloadsSecret example projects/{{project}}/locations/{{region}}/environments/{{environment}}/userWorkloadsSecrets/{{name}} * ``` * * ```sh * $ pulumi import gcp:composer/userWorkloadsSecret:UserWorkloadsSecret example {{project}}/{{region}}/{{environment}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:composer/userWorkloadsSecret:UserWorkloadsSecret example {{environment}}/{{name}} * ``` */ export declare class UserWorkloadsSecret extends pulumi.CustomResource { /** * Get an existing UserWorkloadsSecret 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?: UserWorkloadsSecretState, opts?: pulumi.CustomResourceOptions): UserWorkloadsSecret; /** * Returns true if the given object is an instance of UserWorkloadsSecret. 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 UserWorkloadsSecret; /** * A map of the secret data. */ readonly data: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Environment where the Kubernetes Secret will be stored and used. */ readonly environment: pulumi.Output<string>; /** * Name of the Kubernetes Secret. */ readonly name: pulumi.Output<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output<string>; /** * The location or Compute Engine region for the environment. */ readonly region: pulumi.Output<string>; /** * Create a UserWorkloadsSecret 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. */ constructor(name: string, args: UserWorkloadsSecretArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering UserWorkloadsSecret resources. */ export interface UserWorkloadsSecretState { /** * A map of the secret data. */ data?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Environment where the Kubernetes Secret will be stored and used. */ environment?: pulumi.Input<string>; /** * Name of the Kubernetes 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 for the environment. */ region?: pulumi.Input<string>; } /** * The set of arguments for constructing a UserWorkloadsSecret resource. */ export interface UserWorkloadsSecretArgs { /** * A map of the secret data. */ data?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Environment where the Kubernetes Secret will be stored and used. */ environment: pulumi.Input<string>; /** * Name of the Kubernetes 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 for the environment. */ region?: pulumi.Input<string>; }