UNPKG

@aschot/pulumi-dbtcloud

Version:

A Pulumi package for creating and managing dbt Cloud resources.

120 lines (119 loc) 4.81 kB
import * as pulumi from "@pulumi/pulumi"; /** * *Note*: Some upstream resources can be slow to create, so if creating a project or environment at * the same time as the environment variables, it's recommended to use the `dependsOn` meta argument. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as dbtcloud from "@aschot/pulumi-dbtcloud"; * * // NOTE for customers using the LEGACY dbt_cloud provider: * const dbtMyEnvVar = new dbtcloud.EnvironmentVariable("dbtMyEnvVar", { * projectId: dbtcloud_project.dbt_project.id, * environmentValues: { * project: "my_project_level_value", * Dev: "my_env_level_value", * CI: "my_ci_override_value", * Prod: "my_prod_override_value", * }, * }, { * dependsOn: [ * dbtcloud_project.dbt_project, * dbtcloud_environment.dev_env, * dbtcloud_environment.ci_env, * dbtcloud_environment.prod_env, * ], * }); * ``` * * ## Import * * Import using a project ID and environment variable name found in the URL and UI or via the API. * * ```sh * $ pulumi import dbtcloud:index/environmentVariable:EnvironmentVariable test_environment_variable "project_id:environment_variable_name" * ``` * * ```sh * $ pulumi import dbtcloud:index/environmentVariable:EnvironmentVariable test_environment_variable 12345:DBT_ENV_VAR * ``` */ export declare class EnvironmentVariable extends pulumi.CustomResource { /** * Get an existing EnvironmentVariable 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?: EnvironmentVariableState, opts?: pulumi.CustomResourceOptions): EnvironmentVariable; /** * Returns true if the given object is an instance of EnvironmentVariable. 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 EnvironmentVariable; /** * Map from environment names to respective variable value, a special key `project` should be set for the project default variable value. This field is not set as sensitive so take precautions when using secret environment variables. */ readonly environmentValues: pulumi.Output<{ [key: string]: any; }>; /** * Name for the variable, must be unique within a project, must be prefixed with 'DBT_' */ readonly name: pulumi.Output<string>; /** * Project for the variable to be created in */ readonly projectId: pulumi.Output<number>; /** * Create a EnvironmentVariable 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: EnvironmentVariableArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering EnvironmentVariable resources. */ export interface EnvironmentVariableState { /** * Map from environment names to respective variable value, a special key `project` should be set for the project default variable value. This field is not set as sensitive so take precautions when using secret environment variables. */ environmentValues?: pulumi.Input<{ [key: string]: any; }>; /** * Name for the variable, must be unique within a project, must be prefixed with 'DBT_' */ name?: pulumi.Input<string>; /** * Project for the variable to be created in */ projectId?: pulumi.Input<number>; } /** * The set of arguments for constructing a EnvironmentVariable resource. */ export interface EnvironmentVariableArgs { /** * Map from environment names to respective variable value, a special key `project` should be set for the project default variable value. This field is not set as sensitive so take precautions when using secret environment variables. */ environmentValues: pulumi.Input<{ [key: string]: any; }>; /** * Name for the variable, must be unique within a project, must be prefixed with 'DBT_' */ name?: pulumi.Input<string>; /** * Project for the variable to be created in */ projectId: pulumi.Input<number>; }