1. Packages
  2. dbt Cloud Provider
  3. API Docs
  4. getEnvironment
dbt Cloud v1.0.0 published on Wednesday, Jun 11, 2025 by Pulumi

dbtcloud.getEnvironment

Explore with Pulumi AI

dbtcloud logo
dbt Cloud v1.0.0 published on Wednesday, Jun 11, 2025 by Pulumi

    Retrieve data for a single environment

    Using getEnvironment

    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 getEnvironment(args: GetEnvironmentArgs, opts?: InvokeOptions): Promise<GetEnvironmentResult>
    function getEnvironmentOutput(args: GetEnvironmentOutputArgs, opts?: InvokeOptions): Output<GetEnvironmentResult>
    def get_environment(environment_id: Optional[int] = None,
                        project_id: Optional[int] = None,
                        opts: Optional[InvokeOptions] = None) -> GetEnvironmentResult
    def get_environment_output(environment_id: Optional[pulumi.Input[int]] = None,
                        project_id: Optional[pulumi.Input[int]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentResult]
    func LookupEnvironment(ctx *Context, args *LookupEnvironmentArgs, opts ...InvokeOption) (*LookupEnvironmentResult, error)
    func LookupEnvironmentOutput(ctx *Context, args *LookupEnvironmentOutputArgs, opts ...InvokeOption) LookupEnvironmentResultOutput

    > Note: This function is named LookupEnvironment in the Go SDK.

    public static class GetEnvironment 
    {
        public static Task<GetEnvironmentResult> InvokeAsync(GetEnvironmentArgs args, InvokeOptions? opts = null)
        public static Output<GetEnvironmentResult> Invoke(GetEnvironmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
    public static Output<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: dbtcloud:index/getEnvironment:getEnvironment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EnvironmentId int
    The ID of the environment
    ProjectId int
    The project ID to which the environment belongs
    EnvironmentId int
    The ID of the environment
    ProjectId int
    The project ID to which the environment belongs
    environmentId Integer
    The ID of the environment
    projectId Integer
    The project ID to which the environment belongs
    environmentId number
    The ID of the environment
    projectId number
    The project ID to which the environment belongs
    environment_id int
    The ID of the environment
    project_id int
    The project ID to which the environment belongs
    environmentId Number
    The ID of the environment
    projectId Number
    The project ID to which the environment belongs

    getEnvironment Result

    The following output properties are available:

    ConnectionId int
    CredentialsId int
    Credential ID for this environment. A credential is not required for development environments, as dbt Cloud defaults to the user's credentials, but deployment environments will have this.
    CustomBranch string
    The custom branch name to use
    DbtVersion string
    Version number of dbt to use in this environment.
    DeploymentType string
    The type of deployment environment (currently 'production', 'staging' or empty)
    EnableModelQueryHistory bool
    Whether model query history is on
    EnvironmentId int
    The ID of the environment
    ExtendedAttributesId int
    The ID of the extended attributes applied
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the environment
    ProjectId int
    The project ID to which the environment belongs
    Type string
    The type of environment (must be either development or deployment)
    UseCustomBranch bool
    Whether to use a custom git branch in this environment
    ConnectionId int
    CredentialsId int
    Credential ID for this environment. A credential is not required for development environments, as dbt Cloud defaults to the user's credentials, but deployment environments will have this.
    CustomBranch string
    The custom branch name to use
    DbtVersion string
    Version number of dbt to use in this environment.
    DeploymentType string
    The type of deployment environment (currently 'production', 'staging' or empty)
    EnableModelQueryHistory bool
    Whether model query history is on
    EnvironmentId int
    The ID of the environment
    ExtendedAttributesId int
    The ID of the extended attributes applied
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the environment
    ProjectId int
    The project ID to which the environment belongs
    Type string
    The type of environment (must be either development or deployment)
    UseCustomBranch bool
    Whether to use a custom git branch in this environment
    connectionId Integer
    credentialsId Integer
    Credential ID for this environment. A credential is not required for development environments, as dbt Cloud defaults to the user's credentials, but deployment environments will have this.
    customBranch String
    The custom branch name to use
    dbtVersion String
    Version number of dbt to use in this environment.
    deploymentType String
    The type of deployment environment (currently 'production', 'staging' or empty)
    enableModelQueryHistory Boolean
    Whether model query history is on
    environmentId Integer
    The ID of the environment
    extendedAttributesId Integer
    The ID of the extended attributes applied
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the environment
    projectId Integer
    The project ID to which the environment belongs
    type String
    The type of environment (must be either development or deployment)
    useCustomBranch Boolean
    Whether to use a custom git branch in this environment
    connectionId number
    credentialsId number
    Credential ID for this environment. A credential is not required for development environments, as dbt Cloud defaults to the user's credentials, but deployment environments will have this.
    customBranch string
    The custom branch name to use
    dbtVersion string
    Version number of dbt to use in this environment.
    deploymentType string
    The type of deployment environment (currently 'production', 'staging' or empty)
    enableModelQueryHistory boolean
    Whether model query history is on
    environmentId number
    The ID of the environment
    extendedAttributesId number
    The ID of the extended attributes applied
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the environment
    projectId number
    The project ID to which the environment belongs
    type string
    The type of environment (must be either development or deployment)
    useCustomBranch boolean
    Whether to use a custom git branch in this environment
    connection_id int
    credentials_id int
    Credential ID for this environment. A credential is not required for development environments, as dbt Cloud defaults to the user's credentials, but deployment environments will have this.
    custom_branch str
    The custom branch name to use
    dbt_version str
    Version number of dbt to use in this environment.
    deployment_type str
    The type of deployment environment (currently 'production', 'staging' or empty)
    enable_model_query_history bool
    Whether model query history is on
    environment_id int
    The ID of the environment
    extended_attributes_id int
    The ID of the extended attributes applied
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the environment
    project_id int
    The project ID to which the environment belongs
    type str
    The type of environment (must be either development or deployment)
    use_custom_branch bool
    Whether to use a custom git branch in this environment
    connectionId Number
    credentialsId Number
    Credential ID for this environment. A credential is not required for development environments, as dbt Cloud defaults to the user's credentials, but deployment environments will have this.
    customBranch String
    The custom branch name to use
    dbtVersion String
    Version number of dbt to use in this environment.
    deploymentType String
    The type of deployment environment (currently 'production', 'staging' or empty)
    enableModelQueryHistory Boolean
    Whether model query history is on
    environmentId Number
    The ID of the environment
    extendedAttributesId Number
    The ID of the extended attributes applied
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the environment
    projectId Number
    The project ID to which the environment belongs
    type String
    The type of environment (must be either development or deployment)
    useCustomBranch Boolean
    Whether to use a custom git branch in this environment

    Package Details

    Repository
    dbtcloud pulumi/pulumi-dbtcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dbtcloud Terraform Provider.
    dbtcloud logo
    dbt Cloud v1.0.0 published on Wednesday, Jun 11, 2025 by Pulumi