dbtcloud.Environment
Explore with Pulumi AI
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.id,
});
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["id"])
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.Id),
})
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.Id,
});
});
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.id())
.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.id}
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,
project_id: Optional[int] = None,
type: Optional[str] = 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,
enable_model_query_history: Optional[bool] = 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()
{
ProjectId = 0,
Type = "string",
ConnectionId = 0,
CredentialId = 0,
CustomBranch = "string",
DbtVersion = "string",
DeploymentType = "string",
EnableModelQueryHistory = false,
ExtendedAttributesId = 0,
IsActive = false,
Name = "string",
UseCustomBranch = false,
});
example, err := dbtcloud.NewEnvironment(ctx, "environmentResource", &dbtcloud.EnvironmentArgs{
ProjectId: pulumi.Int(0),
Type: pulumi.String("string"),
ConnectionId: pulumi.Int(0),
CredentialId: pulumi.Int(0),
CustomBranch: pulumi.String("string"),
DbtVersion: pulumi.String("string"),
DeploymentType: pulumi.String("string"),
EnableModelQueryHistory: pulumi.Bool(false),
ExtendedAttributesId: pulumi.Int(0),
IsActive: pulumi.Bool(false),
Name: pulumi.String("string"),
UseCustomBranch: pulumi.Bool(false),
})
var environmentResource = new Environment("environmentResource", EnvironmentArgs.builder()
.projectId(0)
.type("string")
.connectionId(0)
.credentialId(0)
.customBranch("string")
.dbtVersion("string")
.deploymentType("string")
.enableModelQueryHistory(false)
.extendedAttributesId(0)
.isActive(false)
.name("string")
.useCustomBranch(false)
.build());
environment_resource = dbtcloud.Environment("environmentResource",
project_id=0,
type="string",
connection_id=0,
credential_id=0,
custom_branch="string",
dbt_version="string",
deployment_type="string",
enable_model_query_history=False,
extended_attributes_id=0,
is_active=False,
name="string",
use_custom_branch=False)
const environmentResource = new dbtcloud.Environment("environmentResource", {
projectId: 0,
type: "string",
connectionId: 0,
credentialId: 0,
customBranch: "string",
dbtVersion: "string",
deploymentType: "string",
enableModelQueryHistory: false,
extendedAttributesId: 0,
isActive: false,
name: "string",
useCustomBranch: false,
});
type: dbtcloud:Environment
properties:
connectionId: 0
credentialId: 0
customBranch: string
dbtVersion: string
deploymentType: string
enableModelQueryHistory: false
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Environment resource accepts the following input properties:
- Project
Id int - Project ID to create the environment in
- Type string
- 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 string - Which custom branch to use in this environment
- Dbt
Version 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
orversionless
. Defaults toversionless
if no version is provided - Deployment
Type 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
- Enable
Model boolQuery History - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- Extended
Attributes intId - ID of the extended attributes for the environment
- Is
Active bool - Whether the environment is active
- Name string
- Environment name
- Use
Custom boolBranch - Whether to use a custom git branch in this environment
- Project
Id int - Project ID to create the environment in
- Type string
- 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 string - Which custom branch to use in this environment
- Dbt
Version 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
orversionless
. Defaults toversionless
if no version is provided - Deployment
Type 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
- Enable
Model boolQuery History - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- Extended
Attributes intId - ID of the extended attributes for the environment
- Is
Active bool - Whether the environment is active
- Name string
- Environment name
- Use
Custom boolBranch - Whether to use a custom git branch in this environment
- project
Id Integer - Project ID to create the environment in
- type String
- The type of environment (must be either development or deployment)
- connection
Id Integer - credential
Id Integer - Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
- custom
Branch String - Which custom branch to use in this environment
- dbt
Version 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
orversionless
. Defaults toversionless
if no version is provided - deployment
Type 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
- enable
Model BooleanQuery History - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- extended
Attributes IntegerId - ID of the extended attributes for the environment
- is
Active Boolean - Whether the environment is active
- name String
- Environment name
- use
Custom BooleanBranch - Whether to use a custom git branch in this environment
- project
Id number - Project ID to create the environment in
- type string
- The type of environment (must be either development or deployment)
- connection
Id number - credential
Id number - Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
- custom
Branch string - Which custom branch to use in this environment
- dbt
Version 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
orversionless
. Defaults toversionless
if no version is provided - deployment
Type 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
- enable
Model booleanQuery History - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- extended
Attributes numberId - ID of the extended attributes for the environment
- is
Active boolean - Whether the environment is active
- name string
- Environment name
- use
Custom booleanBranch - Whether to use a custom git branch in this environment
- 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
- 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
orversionless
. Defaults toversionless
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
- enable_
model_ boolquery_ history - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- extended_
attributes_ intid - ID of the extended attributes for the environment
- is_
active bool - Whether the environment is active
- name str
- Environment name
- use_
custom_ boolbranch - Whether to use a custom git branch in this environment
- project
Id Number - Project ID to create the environment in
- type String
- The type of environment (must be either development or deployment)
- connection
Id Number - credential
Id Number - Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
- custom
Branch String - Which custom branch to use in this environment
- dbt
Version 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
orversionless
. Defaults toversionless
if no version is provided - deployment
Type 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
- enable
Model BooleanQuery History - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- extended
Attributes NumberId - ID of the extended attributes for the environment
- is
Active Boolean - Whether the environment is active
- name String
- Environment name
- use
Custom BooleanBranch - 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:
- Environment
Id int - 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 string
- The provider-assigned unique ID for this managed resource.
- environment
Id Integer - Environment ID within the project
- id String
- The provider-assigned unique ID for this managed resource.
- environment
Id 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.
- environment
Id 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,
enable_model_query_history: Optional[bool] = 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.
- 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 string - Which custom branch to use in this environment
- Dbt
Version 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
orversionless
. Defaults toversionless
if no version is provided - Deployment
Type 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
- Enable
Model boolQuery History - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- Environment
Id int - Environment ID within the project
- Extended
Attributes intId - ID of the extended attributes for the environment
- Is
Active bool - Whether the environment is active
- Name string
- Environment name
- Project
Id int - Project ID to create the environment in
- Type string
- The type of environment (must be either development or deployment)
- Use
Custom boolBranch - 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 string - Which custom branch to use in this environment
- Dbt
Version 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
orversionless
. Defaults toversionless
if no version is provided - Deployment
Type 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
- Enable
Model boolQuery History - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- Environment
Id int - Environment ID within the project
- Extended
Attributes intId - ID of the extended attributes for the environment
- Is
Active bool - Whether the environment is active
- Name string
- Environment name
- Project
Id int - Project ID to create the environment in
- Type string
- The type of environment (must be either development or deployment)
- Use
Custom boolBranch - Whether to use a custom git branch in this environment
- connection
Id Integer - credential
Id Integer - Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
- custom
Branch String - Which custom branch to use in this environment
- dbt
Version 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
orversionless
. Defaults toversionless
if no version is provided - deployment
Type 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
- enable
Model BooleanQuery History - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- environment
Id Integer - Environment ID within the project
- extended
Attributes IntegerId - ID of the extended attributes for the environment
- is
Active Boolean - Whether the environment is active
- name String
- Environment name
- project
Id Integer - Project ID to create the environment in
- type String
- The type of environment (must be either development or deployment)
- use
Custom BooleanBranch - Whether to use a custom git branch in this environment
- connection
Id number - credential
Id number - Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
- custom
Branch string - Which custom branch to use in this environment
- dbt
Version 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
orversionless
. Defaults toversionless
if no version is provided - deployment
Type 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
- enable
Model booleanQuery History - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- environment
Id number - Environment ID within the project
- extended
Attributes numberId - ID of the extended attributes for the environment
- is
Active boolean - Whether the environment is active
- name string
- Environment name
- project
Id number - Project ID to create the environment in
- type string
- The type of environment (must be either development or deployment)
- use
Custom booleanBranch - 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
orversionless
. Defaults toversionless
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
- enable_
model_ boolquery_ history - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- environment_
id int - Environment ID within the project
- extended_
attributes_ intid - 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_ boolbranch - Whether to use a custom git branch in this environment
- connection
Id Number - credential
Id Number - Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments
- custom
Branch String - Which custom branch to use in this environment
- dbt
Version 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
orversionless
. Defaults toversionless
if no version is provided - deployment
Type 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
- enable
Model BooleanQuery History - Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery.
- environment
Id Number - Environment ID within the project
- extended
Attributes NumberId - ID of the extended attributes for the environment
- is
Active Boolean - Whether the environment is active
- name String
- Environment name
- project
Id Number - Project ID to create the environment in
- type String
- The type of environment (must be either development or deployment)
- use
Custom BooleanBranch - 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.