dbt Cloud v1.2.0 published on Wednesday, Oct 15, 2025 by Pulumi
dbtcloud.getEnvironmentVariable
dbt Cloud v1.2.0 published on Wednesday, Oct 15, 2025 by Pulumi
Environment variable credential data source
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dbtcloud from "@pulumi/dbtcloud";
const myVar = dbtcloud.getEnvironmentVariable({
projectId: 70403103985068,
name: "DBT_MY_PARTIAL_VAR",
});
import pulumi
import pulumi_dbtcloud as dbtcloud
my_var = dbtcloud.get_environment_variable(project_id=70403103985068,
name="DBT_MY_PARTIAL_VAR")
package main
import (
"github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbtcloud.LookupEnvironmentVariable(ctx, &dbtcloud.LookupEnvironmentVariableArgs{
ProjectId: 70403103985068,
Name: "DBT_MY_PARTIAL_VAR",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DbtCloud = Pulumi.DbtCloud;
return await Deployment.RunAsync(() =>
{
var myVar = DbtCloud.GetEnvironmentVariable.Invoke(new()
{
ProjectId = 70403103985068,
Name = "DBT_MY_PARTIAL_VAR",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.DbtcloudFunctions;
import com.pulumi.dbtcloud.inputs.GetEnvironmentVariableArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var myVar = DbtcloudFunctions.getEnvironmentVariable(GetEnvironmentVariableArgs.builder()
.projectId(70403103985068)
.name("DBT_MY_PARTIAL_VAR")
.build());
}
}
variables:
myVar:
fn::invoke:
function: dbtcloud:getEnvironmentVariable
arguments:
projectId: '70403103985068'
name: DBT_MY_PARTIAL_VAR
Using getEnvironmentVariable
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getEnvironmentVariable(args: GetEnvironmentVariableArgs, opts?: InvokeOptions): Promise<GetEnvironmentVariableResult>
function getEnvironmentVariableOutput(args: GetEnvironmentVariableOutputArgs, opts?: InvokeOptions): Output<GetEnvironmentVariableResult>def get_environment_variable(name: Optional[str] = None,
project_id: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetEnvironmentVariableResult
def get_environment_variable_output(name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentVariableResult]func LookupEnvironmentVariable(ctx *Context, args *LookupEnvironmentVariableArgs, opts ...InvokeOption) (*LookupEnvironmentVariableResult, error)
func LookupEnvironmentVariableOutput(ctx *Context, args *LookupEnvironmentVariableOutputArgs, opts ...InvokeOption) LookupEnvironmentVariableResultOutput> Note: This function is named LookupEnvironmentVariable in the Go SDK.
public static class GetEnvironmentVariable
{
public static Task<GetEnvironmentVariableResult> InvokeAsync(GetEnvironmentVariableArgs args, InvokeOptions? opts = null)
public static Output<GetEnvironmentVariableResult> Invoke(GetEnvironmentVariableInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetEnvironmentVariableResult> getEnvironmentVariable(GetEnvironmentVariableArgs args, InvokeOptions options)
public static Output<GetEnvironmentVariableResult> getEnvironmentVariable(GetEnvironmentVariableArgs args, InvokeOptions options)
fn::invoke:
function: dbtcloud:index/getEnvironmentVariable:getEnvironmentVariable
arguments:
# arguments dictionaryThe following arguments are supported:
- name str
- Name for the variable, must be unique within a project, must be prefixed with 'DBT_'
- project_
id int - Project ID to create the environment variable in
getEnvironmentVariable Result
The following output properties are available:
- Environment
Values Dictionary<string, string> - Map from environment names to respective variable value, a special key
projectshould be set for the project default variable value. This field is not set as sensitive so take precautions when using secret environment variables. - Id string
- The ID of this resource. Contains the project ID and the environment variable ID.
- Name string
- Name for the variable, must be unique within a project, must be prefixed with 'DBT_'
- Project
Id int - Project ID to create the environment variable in
- Environment
Values map[string]string - Map from environment names to respective variable value, a special key
projectshould be set for the project default variable value. This field is not set as sensitive so take precautions when using secret environment variables. - Id string
- The ID of this resource. Contains the project ID and the environment variable ID.
- Name string
- Name for the variable, must be unique within a project, must be prefixed with 'DBT_'
- Project
Id int - Project ID to create the environment variable in
- environment
Values Map<String,String> - Map from environment names to respective variable value, a special key
projectshould be set for the project default variable value. This field is not set as sensitive so take precautions when using secret environment variables. - id String
- The ID of this resource. Contains the project ID and the environment variable ID.
- name String
- Name for the variable, must be unique within a project, must be prefixed with 'DBT_'
- project
Id Integer - Project ID to create the environment variable in
- environment
Values {[key: string]: string} - Map from environment names to respective variable value, a special key
projectshould be set for the project default variable value. This field is not set as sensitive so take precautions when using secret environment variables. - id string
- The ID of this resource. Contains the project ID and the environment variable ID.
- name string
- Name for the variable, must be unique within a project, must be prefixed with 'DBT_'
- project
Id number - Project ID to create the environment variable in
- environment_
values Mapping[str, str] - Map from environment names to respective variable value, a special key
projectshould be set for the project default variable value. This field is not set as sensitive so take precautions when using secret environment variables. - id str
- The ID of this resource. Contains the project ID and the environment variable ID.
- name str
- Name for the variable, must be unique within a project, must be prefixed with 'DBT_'
- project_
id int - Project ID to create the environment variable in
- environment
Values Map<String> - Map from environment names to respective variable value, a special key
projectshould be set for the project default variable value. This field is not set as sensitive so take precautions when using secret environment variables. - id String
- The ID of this resource. Contains the project ID and the environment variable ID.
- name String
- Name for the variable, must be unique within a project, must be prefixed with 'DBT_'
- project
Id Number - Project ID to create the environment variable in
Package Details
- Repository
- dbtcloud pulumi/pulumi-dbtcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dbtcloudTerraform Provider.
dbt Cloud v1.2.0 published on Wednesday, Oct 15, 2025 by Pulumi
