Module API
Requirements¶
| Name | Version |
|---|---|
| terraform | >= 1.14 |
| dbtcloud | ~> 1.9 |
| http | ~> 3.0 |
Providers¶
| Name | Version |
|---|---|
| terraform | n/a |
Modules¶
| Name | Source | Version |
|---|---|---|
| account_features | ./modules/account_features | n/a |
| credentials | ./modules/credentials | n/a |
| data_lookups | ./modules/data_lookups | n/a |
| environment_variable_job_overrides | ./modules/environment_variable_job_overrides | n/a |
| environment_variables | ./modules/environment_variables | n/a |
| environments | ./modules/environments | n/a |
| extended_attributes | ./modules/extended_attributes | n/a |
| global_connections | ./modules/global_connections | n/a |
| groups | ./modules/groups | n/a |
| ip_restrictions | ./modules/ip_restrictions | n/a |
| jobs | ./modules/jobs | n/a |
| lineage_integrations | ./modules/lineage_integrations | n/a |
| notifications | ./modules/notifications | n/a |
| oauth_configurations | ./modules/oauth_configurations | n/a |
| profiles | ./modules/profiles | n/a |
| project | ./modules/project | n/a |
| project_artefacts | ./modules/project_artefacts | n/a |
| project_repository | ./modules/project_repository | n/a |
| repository | ./modules/repository | n/a |
| semantic_layer | ./modules/semantic_layer | n/a |
| service_tokens | ./modules/service_tokens | n/a |
| user_groups | ./modules/user_groups | n/a |
Resources¶
| Name | Type |
|---|---|
| terraform_data.validate_yaml_config | resource |
Inputs¶
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| yaml_file | Path to the YAML file defining dbt Cloud resources. Must set version: 1 with account, globals.* (connections, optional groups, service_tokens, notifications, privatelink_endpoints), and projects[] — see schemas/v1.json. Root locals hoist globals into top-level keys modules consume and normalize environment_variables[].environment_values from maps to lists. | string |
n/a | yes |
| connection_credentials | Map of global connection keys to their OAuth/auth credential objects (client_id, client_secret, private_key, etc.) | map(any) |
{} |
no |
| dbt_account_id | dbt Cloud account ID | number |
null |
no |
| dbt_host_url | dbt Cloud host URL (e.g., https://cloud.getdbt.com or custom domain). Required by the Terraform dbtcloud provider; version: 1 YAML account.host_url is used only for HTTP lookups (module data_lookups) when this variable is null — mirror account.host_url here for real applies. | string |
null |
no |
| dbt_pat | dbt Cloud personal access token for GitHub App integration discovery (service tokens cannot access the integrations API) | string |
null |
no |
| dbt_token | dbt Cloud API token for authentication | string |
null |
no |
| enable_gitlab_deploy_token | Preserve native GitLab deploy_token strategy. Defaults to false due to a known API limitation (GitlabGetError on some accounts). Set to true only when GitLab OAuth access is confirmed. | bool |
false |
no |
| environment_credentials | Map of credential keys to warehouse credential objects. Key format: project_key_env_key for environments, or project_key_profile_key for standalone profile-owned credentials. Supports 14 warehouse types via credential_type field. | map(any) |
{} |
no |
| lineage_tokens | Map of lineage integration keys to their authentication tokens (Tableau, Looker, etc.) | map(string) |
{} |
no |
| oauth_client_secrets | Map of OAuth configuration keys to their client secrets | map(string) |
{} |
no |
| skip_global_project_permissions | When true, account-level group permissions from YAML are applied as all_projects-only blocks so Terraform does not add edges to project resources (scoped adoption of globals). | bool |
false |
no |
| target_name | Default target name for the dbt project (e.g., 'dev', 'prod') | string |
"" |
no |
| token_map | Map of token names to secret values. Used for legacy Databricks credential.token_name in YAML and for jobs[].environment_variable_overrides values prefixed with secret_ (lookup key is the string after the prefix). | map(string) |
{} |
no |
Outputs¶
| Name | Description |
|---|---|
| connection_ids | Map of global connection key (and LOOKUP:… placeholders) to dbt Cloud connection ID — merged managed global_connections + data_lookups |
| credential_ids | Map of composite key (project_key_env_key or project_key_profile_key) to credential ID |
| environment_ids | Map of composite key (project_key_env_key) to dbt Cloud environment ID |
| extended_attribute_ids | Map of composite key (project_key_ea_key) to dbt Cloud extended_attributes_id (numeric API id) |
| github_installation_by_owner | GitHub App installation id by org/user login (from dbt integrations API when dbt_pat is set) |
| github_installation_fallback_id | First GitHub installation id when owner-based match is not used |
| group_ids | Map of group key to dbt Cloud group ID |
| ip_rule_ids | Map of IP rule key to dbt Cloud IP restriction rule ID |
| job_ids | Map of composite key (project_key_job_key) to dbt Cloud job ID |
| lineage_integration_ids | Map of composite key (project_key_integration_key) to lineage integration ID |
| lookup_connection_ids | Subset of connection_ids from LOOKUP:… resolution only (empty if module.data_lookups not used) |
| notification_ids | Map of notification key to dbt Cloud notification ID |
| oauth_configuration_ids | Map of OAuth configuration key to dbt Cloud OAuth configuration ID |
| profile_ids | Map of composite key (project_key_profile_key) to dbt Cloud profile_id (numeric API id) |
| project_artefact_ids | Map of project key to dbt Cloud project_artefacts resource ID |
| project_ids | Map of project key to dbt Cloud project ID |
| repository_ids | Map of project key to repository ID |
| semantic_layer_ids | Map of project key to dbt Cloud semantic layer configuration ID |
| service_token_ids | Map of service token key to dbt Cloud service token ID |
| yaml_account | The YAML account block (name, host_url, id) |
| yaml_schema_version | YAML version key from the config file (must be 1; see schemas/v1.json) |