1. Packages
  2. Dbtcloud Provider
  3. API Docs
  4. Environment
dbt Cloud v0.1.20 published on Friday, Sep 27, 2024 by Pulumi

dbtcloud.Environment

Explore with Pulumi AI

dbtcloud logo
dbt Cloud v0.1.20 published on Friday, Sep 27, 2024 by Pulumi

    Resource to manage dbt Cloud environments for the different dbt Cloud projects.

    In a given dbt Cloud project, one development environment can be defined and as many deployment environments as needed can be created.

    In August 2024, dbt Cloud released the “global connection” feature, allowing connections to be defined at the account level and reused across environments and projects. This version of the provider has the connection_id as an optional field but it is recommended to start setting it up in your projects. In future versions, this field will become mandatory.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    const ciEnvironment = new dbtcloud.Environment("ci_environment", {
        dbtVersion: "versionless",
        name: "CI",
        projectId: dbtProject.id,
        type: "deployment",
        credentialId: ciCredential.credentialId,
        connectionId: myGlobalConnection.id,
    });
    // we can also set a deployment environment as being the production one
    const prodEnvironment = new dbtcloud.Environment("prod_environment", {
        dbtVersion: "1.7.0-latest",
        name: "Prod",
        projectId: dbtProject.id,
        type: "deployment",
        credentialId: prodCredential.credentialId,
        deploymentType: "production",
        connectionId: myLegacyConnection.connectionId,
    });
    // Creating a development environment
    const devEnvironment = new dbtcloud.Environment("dev_environment", {
        dbtVersion: "versionless",
        name: "Dev",
        projectId: dbtProject.id,
        type: "development",
        connectionId: myOtherGlobalConnection,
    });
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    ci_environment = dbtcloud.Environment("ci_environment",
        dbt_version="versionless",
        name="CI",
        project_id=dbt_project["id"],
        type="deployment",
        credential_id=ci_credential["credentialId"],
        connection_id=my_global_connection["id"])
    # we can also set a deployment environment as being the production one
    prod_environment = dbtcloud.Environment("prod_environment",
        dbt_version="1.7.0-latest",
        name="Prod",
        project_id=dbt_project["id"],
        type="deployment",
        credential_id=prod_credential["credentialId"],
        deployment_type="production",
        connection_id=my_legacy_connection["connectionId"])
    # Creating a development environment
    dev_environment = dbtcloud.Environment("dev_environment",
        dbt_version="versionless",
        name="Dev",
        project_id=dbt_project["id"],
        type="development",
        connection_id=my_other_global_connection)
    
    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.NewEnvironment(ctx, "ci_environment", &dbtcloud.EnvironmentArgs{
    			DbtVersion:   pulumi.String("versionless"),
    			Name:         pulumi.String("CI"),
    			ProjectId:    pulumi.Any(dbtProject.Id),
    			Type:         pulumi.String("deployment"),
    			CredentialId: pulumi.Any(ciCredential.CredentialId),
    			ConnectionId: pulumi.Any(myGlobalConnection.Id),
    		})
    		if err != nil {
    			return err
    		}
    		// we can also set a deployment environment as being the production one
    		_, err = dbtcloud.NewEnvironment(ctx, "prod_environment", &dbtcloud.EnvironmentArgs{
    			DbtVersion:     pulumi.String("1.7.0-latest"),
    			Name:           pulumi.String("Prod"),
    			ProjectId:      pulumi.Any(dbtProject.Id),
    			Type:           pulumi.String("deployment"),
    			CredentialId:   pulumi.Any(prodCredential.CredentialId),
    			DeploymentType: pulumi.String("production"),
    			ConnectionId:   pulumi.Any(myLegacyConnection.ConnectionId),
    		})
    		if err != nil {
    			return err
    		}
    		// Creating a development environment
    		_, err = dbtcloud.NewEnvironment(ctx, "dev_environment", &dbtcloud.EnvironmentArgs{
    			DbtVersion:   pulumi.String("versionless"),
    			Name:         pulumi.String("Dev"),
    			ProjectId:    pulumi.Any(dbtProject.Id),
    			Type:         pulumi.String("development"),
    			ConnectionId: pulumi.Any(myOtherGlobalConnection),
    		})
    		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 ciEnvironment = new DbtCloud.Environment("ci_environment", new()
        {
            DbtVersion = "versionless",
            Name = "CI",
            ProjectId = dbtProject.Id,
            Type = "deployment",
            CredentialId = ciCredential.CredentialId,
            ConnectionId = myGlobalConnection.Id,
        });
    
        // we can also set a deployment environment as being the production one
        var prodEnvironment = new DbtCloud.Environment("prod_environment", new()
        {
            DbtVersion = "1.7.0-latest",
            Name = "Prod",
            ProjectId = dbtProject.Id,
            Type = "deployment",
            CredentialId = prodCredential.CredentialId,
            DeploymentType = "production",
            ConnectionId = myLegacyConnection.ConnectionId,
        });
    
        // Creating a development environment
        var devEnvironment = new DbtCloud.Environment("dev_environment", new()
        {
            DbtVersion = "versionless",
            Name = "Dev",
            ProjectId = dbtProject.Id,
            Type = "development",
            ConnectionId = myOtherGlobalConnection,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dbtcloud.Environment;
    import com.pulumi.dbtcloud.EnvironmentArgs;
    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) {
            var ciEnvironment = new Environment("ciEnvironment", EnvironmentArgs.builder()
                .dbtVersion("versionless")
                .name("CI")
                .projectId(dbtProject.id())
                .type("deployment")
                .credentialId(ciCredential.credentialId())
                .connectionId(myGlobalConnection.id())
                .build());
    
            // we can also set a deployment environment as being the production one
            var prodEnvironment = new Environment("prodEnvironment", EnvironmentArgs.builder()
                .dbtVersion("1.7.0-latest")
                .name("Prod")
                .projectId(dbtProject.id())
                .type("deployment")
                .credentialId(prodCredential.credentialId())
                .deploymentType("production")
                .connectionId(myLegacyConnection.connectionId())
                .build());
    
            // Creating a development environment
            var devEnvironment = new Environment("devEnvironment", EnvironmentArgs.builder()
                .dbtVersion("versionless")
                .name("Dev")
                .projectId(dbtProject.id())
                .type("development")
                .connectionId(myOtherGlobalConnection)
                .build());
    
        }
    }
    
    resources:
      ciEnvironment:
        type: dbtcloud:Environment
        name: ci_environment
        properties:
          dbtVersion: versionless
          name: CI
          projectId: ${dbtProject.id}
          type: deployment
          credentialId: ${ciCredential.credentialId}
          connectionId: ${myGlobalConnection.id}
      # we can also set a deployment environment as being the production one
      prodEnvironment:
        type: dbtcloud:Environment
        name: prod_environment
        properties:
          dbtVersion: 1.7.0-latest
          name: Prod
          projectId: ${dbtProject.id}
          type: deployment
          credentialId: ${prodCredential.credentialId}
          deploymentType: production
          connectionId: ${myLegacyConnection.connectionId}
      # Creating a development environment
      devEnvironment:
        type: dbtcloud:Environment
        name: dev_environment
        properties:
          dbtVersion: versionless
          name: Dev
          projectId: ${dbtProject.id}
          type: development
          connectionId: ${myOtherGlobalConnection}
    

    Create Environment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Environment(name: string, args: EnvironmentArgs, opts?: CustomResourceOptions);
    @overload
    def Environment(resource_name: str,
                    args: EnvironmentArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Environment(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    dbt_version: Optional[str] = None,
                    project_id: Optional[int] = None,
                    type: Optional[str] = None,
                    connection_id: Optional[int] = None,
                    credential_id: Optional[int] = None,
                    custom_branch: Optional[str] = None,
                    deployment_type: Optional[str] = None,
                    extended_attributes_id: Optional[int] = None,
                    is_active: Optional[bool] = None,
                    name: Optional[str] = None,
                    use_custom_branch: Optional[bool] = None)
    func NewEnvironment(ctx *Context, name string, args EnvironmentArgs, opts ...ResourceOption) (*Environment, error)
    public Environment(string name, EnvironmentArgs args, CustomResourceOptions? opts = null)
    public Environment(String name, EnvironmentArgs args)
    public Environment(String name, EnvironmentArgs args, CustomResourceOptions options)
    
    type: dbtcloud:Environment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args EnvironmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args EnvironmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args EnvironmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnvironmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnvironmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var environmentResource = new DbtCloud.Environment("environmentResource", new()
    {
        DbtVersion = "string",
        ProjectId = 0,
        Type = "string",
        ConnectionId = 0,
        CredentialId = 0,
        CustomBranch = "string",
        DeploymentType = "string",
        ExtendedAttributesId = 0,
        IsActive = false,
        Name = "string",
        UseCustomBranch = false,
    });
    
    example, err := dbtcloud.NewEnvironment(ctx, "environmentResource", &dbtcloud.EnvironmentArgs{
    	DbtVersion:           pulumi.String("string"),
    	ProjectId:            pulumi.Int(0),
    	Type:                 pulumi.String("string"),
    	ConnectionId:         pulumi.Int(0),
    	CredentialId:         pulumi.Int(0),
    	CustomBranch:         pulumi.String("string"),
    	DeploymentType:       pulumi.String("string"),
    	ExtendedAttributesId: pulumi.Int(0),
    	IsActive:             pulumi.Bool(false),
    	Name:                 pulumi.String("string"),
    	UseCustomBranch:      pulumi.Bool(false),
    })
    
    var environmentResource = new Environment("environmentResource", EnvironmentArgs.builder()
        .dbtVersion("string")
        .projectId(0)
        .type("string")
        .connectionId(0)
        .credentialId(0)
        .customBranch("string")
        .deploymentType("string")
        .extendedAttributesId(0)
        .isActive(false)
        .name("string")
        .useCustomBranch(false)
        .build());
    
    environment_resource = dbtcloud.Environment("environmentResource",
        dbt_version="string",
        project_id=0,
        type="string",
        connection_id=0,
        credential_id=0,
        custom_branch="string",
        deployment_type="string",
        extended_attributes_id=0,
        is_active=False,
        name="string",
        use_custom_branch=False)
    
    const environmentResource = new dbtcloud.Environment("environmentResource", {
        dbtVersion: "string",
        projectId: 0,
        type: "string",
        connectionId: 0,
        credentialId: 0,
        customBranch: "string",
        deploymentType: "string",
        extendedAttributesId: 0,
        isActive: false,
        name: "string",
        useCustomBranch: false,
    });
    
    type: dbtcloud:Environment
    properties:
        connectionId: 0
        credentialId: 0
        customBranch: string
        dbtVersion: string
        deploymentType: string
        extendedAttributesId: 0
        isActive: false
        name: string
        projectId: 0
        type: string
        useCustomBranch: false
    

    Environment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Environment resource accepts the following input properties:

    DbtVersion string
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    ProjectId int
    Project ID to create the environment in
    Type string
    The type of environment (must be either development or deployment)
    ConnectionId int
    CredentialId int
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    CustomBranch string
    Which custom branch to use in this environment
    DeploymentType string
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    ExtendedAttributesId int
    ID of the extended attributes for the environment
    IsActive bool
    Whether the environment is active
    Name string
    Environment name
    UseCustomBranch bool
    Whether to use a custom git branch in this environment
    DbtVersion string
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    ProjectId int
    Project ID to create the environment in
    Type string
    The type of environment (must be either development or deployment)
    ConnectionId int
    CredentialId int
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    CustomBranch string
    Which custom branch to use in this environment
    DeploymentType string
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    ExtendedAttributesId int
    ID of the extended attributes for the environment
    IsActive bool
    Whether the environment is active
    Name string
    Environment name
    UseCustomBranch bool
    Whether to use a custom git branch in this environment
    dbtVersion String
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    projectId Integer
    Project ID to create the environment in
    type String
    The type of environment (must be either development or deployment)
    connectionId Integer
    credentialId Integer
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    customBranch String
    Which custom branch to use in this environment
    deploymentType String
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    extendedAttributesId Integer
    ID of the extended attributes for the environment
    isActive Boolean
    Whether the environment is active
    name String
    Environment name
    useCustomBranch Boolean
    Whether to use a custom git branch in this environment
    dbtVersion string
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    projectId number
    Project ID to create the environment in
    type string
    The type of environment (must be either development or deployment)
    connectionId number
    credentialId number
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    customBranch string
    Which custom branch to use in this environment
    deploymentType string
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    extendedAttributesId number
    ID of the extended attributes for the environment
    isActive boolean
    Whether the environment is active
    name string
    Environment name
    useCustomBranch boolean
    Whether to use a custom git branch in this environment
    dbt_version str
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    project_id int
    Project ID to create the environment in
    type str
    The type of environment (must be either development or deployment)
    connection_id int
    credential_id int
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    custom_branch str
    Which custom branch to use in this environment
    deployment_type str
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    extended_attributes_id int
    ID of the extended attributes for the environment
    is_active bool
    Whether the environment is active
    name str
    Environment name
    use_custom_branch bool
    Whether to use a custom git branch in this environment
    dbtVersion String
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    projectId Number
    Project ID to create the environment in
    type String
    The type of environment (must be either development or deployment)
    connectionId Number
    credentialId Number
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    customBranch String
    Which custom branch to use in this environment
    deploymentType String
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    extendedAttributesId Number
    ID of the extended attributes for the environment
    isActive Boolean
    Whether the environment is active
    name String
    Environment name
    useCustomBranch Boolean
    Whether to use a custom git branch in this environment

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Environment resource produces the following output properties:

    EnvironmentId int
    Environment ID within the project
    Id string
    The provider-assigned unique ID for this managed resource.
    EnvironmentId int
    Environment ID within the project
    Id string
    The provider-assigned unique ID for this managed resource.
    environmentId Integer
    Environment ID within the project
    id String
    The provider-assigned unique ID for this managed resource.
    environmentId number
    Environment ID within the project
    id string
    The provider-assigned unique ID for this managed resource.
    environment_id int
    Environment ID within the project
    id str
    The provider-assigned unique ID for this managed resource.
    environmentId Number
    Environment ID within the project
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Environment Resource

    Get an existing Environment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: EnvironmentState, opts?: CustomResourceOptions): Environment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_id: Optional[int] = None,
            credential_id: Optional[int] = None,
            custom_branch: Optional[str] = None,
            dbt_version: Optional[str] = None,
            deployment_type: Optional[str] = None,
            environment_id: Optional[int] = None,
            extended_attributes_id: Optional[int] = None,
            is_active: Optional[bool] = None,
            name: Optional[str] = None,
            project_id: Optional[int] = None,
            type: Optional[str] = None,
            use_custom_branch: Optional[bool] = None) -> Environment
    func GetEnvironment(ctx *Context, name string, id IDInput, state *EnvironmentState, opts ...ResourceOption) (*Environment, error)
    public static Environment Get(string name, Input<string> id, EnvironmentState? state, CustomResourceOptions? opts = null)
    public static Environment get(String name, Output<String> id, EnvironmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ConnectionId int
    CredentialId int
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    CustomBranch string
    Which custom branch to use in this environment
    DbtVersion string
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    DeploymentType string
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    EnvironmentId int
    Environment ID within the project
    ExtendedAttributesId int
    ID of the extended attributes for the environment
    IsActive bool
    Whether the environment is active
    Name string
    Environment name
    ProjectId int
    Project ID to create the environment in
    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
    CredentialId int
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    CustomBranch string
    Which custom branch to use in this environment
    DbtVersion string
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    DeploymentType string
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    EnvironmentId int
    Environment ID within the project
    ExtendedAttributesId int
    ID of the extended attributes for the environment
    IsActive bool
    Whether the environment is active
    Name string
    Environment name
    ProjectId int
    Project ID to create the environment in
    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
    credentialId Integer
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    customBranch String
    Which custom branch to use in this environment
    dbtVersion String
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    deploymentType String
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    environmentId Integer
    Environment ID within the project
    extendedAttributesId Integer
    ID of the extended attributes for the environment
    isActive Boolean
    Whether the environment is active
    name String
    Environment name
    projectId Integer
    Project ID to create the environment in
    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
    credentialId number
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    customBranch string
    Which custom branch to use in this environment
    dbtVersion string
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    deploymentType string
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    environmentId number
    Environment ID within the project
    extendedAttributesId number
    ID of the extended attributes for the environment
    isActive boolean
    Whether the environment is active
    name string
    Environment name
    projectId number
    Project ID to create the environment in
    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
    credential_id int
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    custom_branch str
    Which custom branch to use in this environment
    dbt_version str
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    deployment_type str
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    environment_id int
    Environment ID within the project
    extended_attributes_id int
    ID of the extended attributes for the environment
    is_active bool
    Whether the environment is active
    name str
    Environment name
    project_id int
    Project ID to create the environment in
    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
    credentialId Number
    Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
    customBranch String
    Which custom branch to use in this environment
    dbtVersion String
    Version number of dbt to use in this environment. It needs to be in the format major.minor.0-latest (e.g. 1.5.0-latest), major.minor.0-pre or versionless. In a future version of the provider versionless will be the default if no version is provided
    deploymentType String
    The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments
    environmentId Number
    Environment ID within the project
    extendedAttributesId Number
    ID of the extended attributes for the environment
    isActive Boolean
    Whether the environment is active
    name String
    Environment name
    projectId Number
    Project ID to create the environment in
    type String
    The type of environment (must be either development or deployment)
    useCustomBranch Boolean
    Whether to use a custom git branch in this environment

    Import

    using import blocks (requires Terraform >= 1.5)

    import {

    to = dbtcloud_environment.prod_environment

    id = “project_id:environment_id”

    }

    import {

    to = dbtcloud_environment.prod_environment

    id = “12345:6789”

    }

    using the older import command

    $ pulumi import dbtcloud:index/environment:Environment prod_environment "project_id:environment_id"
    
    $ pulumi import dbtcloud:index/environment:Environment prod_environment 12345:6789
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 v0.1.20 published on Friday, Sep 27, 2024 by Pulumi