UNPKG

@pulumi/gcp

Version:

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

183 lines (182 loc) 6.33 kB
import * as pulumi from "@pulumi/pulumi"; /** * User workloads ConfigMap used by Airflow tasks that run with Kubernetes Executor or KubernetesPodOperator. * Intended for Composer 3 Environments. * * To get more information about UserWorkloadsConfigMap, see: * * * [API documentation](https://cloud.google.com/composer/docs/reference/rest/v1/projects.locations.environments.userWorkloadsConfigMaps) * * ## Example Usage * * ### Composer User Workloads Config Map Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const environment = new gcp.composer.Environment("environment", { * name: "test-environment", * region: "us-central1", * config: { * softwareConfig: { * imageVersion: "composer-3-airflow-2", * }, * }, * }); * const configMap = new gcp.composer.UserWorkloadsConfigMap("config_map", { * name: "test-config-map", * region: "us-central1", * environment: environment.name, * data: { * api_host: "apihost:443", * }, * }); * ``` * * ## Import * * UserWorkloadsConfigMap can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{region}}/environments/{{environment}}/userWorkloadsConfigMaps/{{name}}` * * * `{{project}}/{{region}}/{{environment}}/{{name}}` * * * `{{region}}/{{environment}}/{{name}}` * * * `{{environment}}/{{name}}` * * When using the `pulumi import` command, UserWorkloadsConfigMap can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:composer/userWorkloadsConfigMap:UserWorkloadsConfigMap default projects/{{project}}/locations/{{region}}/environments/{{environment}}/userWorkloadsConfigMaps/{{name}} * ``` * * ```sh * $ pulumi import gcp:composer/userWorkloadsConfigMap:UserWorkloadsConfigMap default {{project}}/{{region}}/{{environment}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:composer/userWorkloadsConfigMap:UserWorkloadsConfigMap default {{region}}/{{environment}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:composer/userWorkloadsConfigMap:UserWorkloadsConfigMap default {{environment}}/{{name}} * ``` */ export declare class UserWorkloadsConfigMap extends pulumi.CustomResource { /** * Get an existing UserWorkloadsConfigMap 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?: UserWorkloadsConfigMapState, opts?: pulumi.CustomResourceOptions): UserWorkloadsConfigMap; /** * Returns true if the given object is an instance of UserWorkloadsConfigMap. 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 UserWorkloadsConfigMap; /** * The "data" field of Kubernetes ConfigMap, organized in key-value pairs. * For details see: https://kubernetes.io/docs/concepts/configuration/configmap/ */ readonly data: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Environment where the Kubernetes ConfigMap will be stored and used. * * * - - - */ readonly environment: pulumi.Output<string>; /** * Name of the Kubernetes ConfigMap. */ 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 UserWorkloadsConfigMap 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: UserWorkloadsConfigMapArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering UserWorkloadsConfigMap resources. */ export interface UserWorkloadsConfigMapState { /** * The "data" field of Kubernetes ConfigMap, organized in key-value pairs. * For details see: https://kubernetes.io/docs/concepts/configuration/configmap/ */ data?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Environment where the Kubernetes ConfigMap will be stored and used. * * * - - - */ environment?: pulumi.Input<string>; /** * Name of the Kubernetes ConfigMap. */ 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 UserWorkloadsConfigMap resource. */ export interface UserWorkloadsConfigMapArgs { /** * The "data" field of Kubernetes ConfigMap, organized in key-value pairs. * For details see: https://kubernetes.io/docs/concepts/configuration/configmap/ */ data?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Environment where the Kubernetes ConfigMap will be stored and used. * * * - - - */ environment: pulumi.Input<string>; /** * Name of the Kubernetes ConfigMap. */ 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>; }