Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changes/unreleased/Behind the scenes-20260406-101738.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Behind the scenes
body: Added migration scripts for the changed resources
time: 2026-04-06T10:17:38.840631+03:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Changes-20260406-090042.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Changes
body: Remove deprecated resource dbtcloud_project_artefacts
time: 2026-04-06T09:00:42.01464+03:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Changes-20260406-090711.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Changes
body: Remove webhook_id and use id instead
time: 2026-04-06T09:07:11.439697+03:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Changes-20260406-091246.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Changes
body: Remove fetch_deploy_key
time: 2026-04-06T09:12:46.094171+03:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Changes-20260406-092408.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Changes
body: Remove target_name from databricks and spark creds
time: 2026-04-06T09:24:08.380134+03:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Changes-20260406-093202.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Changes
body: Remove adapter_type from databricks_credential
time: 2026-04-06T09:32:02.363664+03:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Changes-20260406-094611.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Changes
body: Remove timeout_seconds and job_deferral_id
time: 2026-04-06T09:46:11.01799+03:00
1 change: 0 additions & 1 deletion docs/data-sources/databricks_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ Databricks credential data source
- `id` (String) The ID of this resource. Contains the project ID and the credential ID.
- `num_threads` (Number) The number of threads to use
- `schema` (String) The schema where to create models
- `target_name` (String) Target name
4 changes: 1 addition & 3 deletions docs/data-sources/job.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Get detailed information for a specific dbt Cloud job.

- `dbt_version` (String) The version of dbt used for the job. If not set, the environment version will be used.
- `deferring_environment_id` (Number) The ID of the environment this job defers to
- `deferring_job_id` (Number, Deprecated) [Deprectated - Deferral is now set at the environment level] The ID of the job definition this job defers to
- `description` (String) The description of the job
- `environment` (Attributes) Details of the environment the job is running in (see [below for nested schema](#nestedatt--environment))
- `environment_id` (Number) The ID of environment
Expand All @@ -42,9 +41,8 @@ Get detailed information for a specific dbt Cloud job.
- `run_compare_changes` (Boolean) Whether the job should compare data changes introduced by the code change in the PR
- `run_generate_sources` (Boolean) Whether the job test source freshness
- `schedule` (Attributes) (see [below for nested schema](#nestedatt--schedule))
- `self_deferring` (Boolean) Whether this job defers on a previous run of itself (overrides value in deferring_job_id)
- `self_deferring` (Boolean) Whether this job defers on a previous run of itself
- `settings` (Attributes) (see [below for nested schema](#nestedatt--settings))
- `timeout_seconds` (Number, Deprecated) [Deprectated - Moved to execution.timeout_seconds] Number of seconds before the job times out
- `triggers` (Attributes) (see [below for nested schema](#nestedatt--triggers))
- `triggers_on_draft_pr` (Boolean) Whether the CI job should be automatically triggered on draft PRs

Expand Down
2 changes: 0 additions & 2 deletions docs/data-sources/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ Read-Only:

- `dbt_version` (String) The version of dbt used for the job. If not set, the environment version will be used.
- `deferring_environment_id` (Number) The ID of the environment this job defers to
- `deferring_job_definition_id` (Number, Deprecated) [Deprectated - Deferral is now set at the environment level] The ID of the job definition this job defers to
- `description` (String) The description of the job
- `environment` (Attributes) Details of the environment the job is running in (see [below for nested schema](#nestedatt--jobs--environment))
- `environment_id` (Number) The ID of environment
Expand All @@ -70,7 +69,6 @@ Read-Only:
- `run_generate_sources` (Boolean) Whether the job test source freshness
- `schedule` (Attributes) (see [below for nested schema](#nestedatt--jobs--schedule))
- `settings` (Attributes) (see [below for nested schema](#nestedatt--jobs--settings))
- `timeout_seconds` (Number, Deprecated) [Deprectated - Moved to execution.timeout_seconds] Number of seconds before the job times out
- `triggers` (Attributes) (see [below for nested schema](#nestedatt--jobs--triggers))
- `triggers_on_draft_pr` (Boolean) Whether the CI job should be automatically triggered on draft PRs

Expand Down
4 changes: 0 additions & 4 deletions docs/data-sources/repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ Retrieve data for a single repository
- `project_id` (Number) Project ID to create the repository in
- `repository_id` (Number) ID for the repository

### Optional

- `fetch_deploy_key` (Boolean, Deprecated) Whether we should return the public deploy key

### Read-Only

- `azure_active_directory_project_id` (String) The Azure Dev Ops project ID
Expand Down
1 change: 0 additions & 1 deletion docs/data-sources/spark_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ data "dbtcloud_spark_credential" "my_spark_cred" {
- `id` (String) The ID of this resource. Contains the project ID and the credential ID.
- `num_threads` (Number) The number of threads to use
- `schema` (String) The schema where to create models
- `target_name` (String) Target name
3 changes: 1 addition & 2 deletions docs/data-sources/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Retrieve webhook details

### Required

- `webhook_id` (String, Deprecated) Webhook's ID
- `id` (String) Webhook's ID

### Read-Only

Expand All @@ -27,6 +27,5 @@ Retrieve webhook details
- `description` (String) Webhooks Description
- `event_types` (List of String) Webhooks Event Types
- `http_status_code` (String) Webhooks HTTP Status Code
- `id` (String) Webhook's ID
- `job_ids` (List of Number) List of job IDs to trigger the webhook
- `name` (String) Webhooks Name
3 changes: 0 additions & 3 deletions docs/resources/databricks_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ resource "dbtcloud_databricks_credential" "my_databricks_cred" {
project_id = dbtcloud_project.dbt_project.id
token = "abcdefgh"
schema = "my_schema"
adapter_type = "databricks"
}

// Using write-only attributes (not stored in state, requires Terraform >= 1.11)
Expand Down Expand Up @@ -48,11 +47,9 @@ resource "dbtcloud_databricks_credential" "my_databricks_cred_wo" {

### Optional

- `adapter_type` (String, Deprecated) The type of the adapter. 'spark' is deprecated, but still supported for backwards compatibility. For Spark, please use the spark_credential resource. Optional only when semantic_layer_credential is set to true; otherwise, this field is required.
- `catalog` (String) The catalog where to create models (only for the databricks adapter)
- `schema` (String) The schema where to create models. Optional only when semantic_layer_credential is set to true; otherwise, this field is required.
- `semantic_layer_credential` (Boolean) This field indicates that the credential is used as part of the Semantic Layer configuration. It is used to create a Databricks credential for the Semantic Layer.
- `target_name` (String, Deprecated) Target name
- `token` (String, Sensitive) Token for Databricks user. Consider using `token_wo` instead, which is not stored in state.
- `token_wo` (String) Write-only alternative to `token`. The value is not stored in state. Requires `token_wo_version` to trigger updates.
- `token_wo_version` (Number) Version number for `token_wo`. Increment this value to trigger an update of the token when using `token_wo`.
Expand Down
2 changes: 0 additions & 2 deletions docs/resources/databricks_semantic_layer_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,9 @@ Required:

Optional:

- `adapter_type` (String, Deprecated) The type of the adapter. 'spark' is deprecated, but still supported for backwards compatibility. For Spark, please use the spark_credential resource. Optional only when semantic_layer_credential is set to true; otherwise, this field is required.
- `catalog` (String) The catalog where to create models (only for the databricks adapter)
- `schema` (String) The schema where to create models. Optional only when semantic_layer_credential is set to true; otherwise, this field is required.
- `semantic_layer_credential` (Boolean) This field indicates that the credential is used as part of the Semantic Layer configuration. It is used to create a Databricks credential for the Semantic Layer.
- `target_name` (String, Deprecated) Target name
- `token` (String, Sensitive) Token for Databricks user. Consider using `token_wo` instead, which is not stored in state.
- `token_wo` (String) Write-only alternative to `token`. The value is not stored in state. Requires `token_wo_version` to trigger updates.
- `token_wo_version` (Number) Version number for `token_wo`. Increment this value to trigger an update of the token when using `token_wo`.
Expand Down
3 changes: 0 additions & 3 deletions docs/resources/job.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ resource "dbtcloud_job" "daily_job" {
schedule_type = "days_of_week"
schedule_hours = [0]

# set job timeout using the execution block (recommended)
execution = {
timeout_seconds = 1800
}
Expand Down Expand Up @@ -79,7 +78,6 @@ resource "dbtcloud_job" "ci_job" {
schedule_days = [0, 1, 2, 3, 4, 5, 6]
schedule_type = "days_of_week"

# set job timeout - use execution block (recommended) instead of the deprecated timeout_seconds
execution = {
timeout_seconds = 3600
}
Expand Down Expand Up @@ -240,7 +238,6 @@ An example can be found [in this GitHub issue](https://github.com/dbt-labs/terra
- `schedule_type` (String) Type of schedule to use, one of every_day/ days_of_week/ custom_cron/ interval_cron
- `self_deferring` (Boolean) Whether this job defers on a previous run of itself
- `target_name` (String) Target name for the dbt profile
- `timeout_seconds` (Number, Deprecated) Number of seconds to allow the job to run before timing out. Use execution.timeout_seconds instead.
- `triggers_on_draft_pr` (Boolean) Whether the CI job should be automatically triggered on draft PRs
- `validate_execute_steps` (Boolean) When set to `true`, the provider will validate the `execute_steps` during plan time to ensure they contain valid dbt commands. If a command is not recognized (e.g., a new dbt command not yet supported by the provider), the validation will fail. Defaults to `false` to allow flexibility with newer dbt commands.

Expand Down
58 changes: 0 additions & 58 deletions docs/resources/project_artefacts.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/resources/repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ resource "dbtcloud_repository" "ado_repo" {
- `azure_active_directory_project_id` (String) The Azure Dev Ops project ID. It can be retrieved via the Azure API or using the data source `dbtcloud_azure_dev_ops_project` and the project name - (required for ADO native integration only)
- `azure_active_directory_repository_id` (String) The Azure Dev Ops repository ID. It can be retrieved via the Azure API or using the data source `dbtcloud_azure_dev_ops_repository` along with the ADO Project ID and the repository name - (required for ADO native integration only)
- `azure_bypass_webhook_registration_failure` (Boolean) If set to False (the default), the connection will fail if the service user doesn't have access to set webhooks (required for auto-triggering CI jobs). If set to True, the connection will be successful but no automated CI job will be triggered - (for ADO native integration only)
- `fetch_deploy_key` (Boolean, Deprecated) Whether we should return the public deploy key - (for the `deploy_key` strategy)
- `git_clone_strategy` (String) Git clone strategy for the repository. Can be `deploy_key` (default) for cloning via SSH Deploy Key, `github_app` for GitHub native integration, `deploy_token` for the GitLab native integration and `azure_active_directory_app` for ADO native integration
- `github_installation_id` (Number) Identifier for the GitHub App - (for GitHub native integration only)
- `gitlab_project_id` (Number) Identifier for the Gitlab project - (for GitLab native integration only)
Expand Down
1 change: 0 additions & 1 deletion docs/resources/spark_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ resource "dbtcloud_spark_credential" "my_spark_cred_wo" {

### Optional

- `target_name` (String, Deprecated) Target name
- `token` (String, Sensitive) Token for Apache Spark user. Consider using `token_wo` instead, which is not stored in state.
- `token_wo` (String) Write-only alternative to `token`. The value is not stored in state. Requires `token_wo_version` to trigger updates.
- `token_wo_version` (Number) Version number for `token_wo`. Increment this value to trigger an update of the token when using `token_wo`.
Expand Down
1 change: 0 additions & 1 deletion docs/resources/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ resource "dbtcloud_webhook" "test_webhook" {
- `hmac_secret` (String, Sensitive) Secret key for the webhook. Can be used to validate the authenticity of the webhook.
- `http_status_code` (String) Latest HTTP status of the webhook
- `id` (String) Webhook's ID
- `webhook_id` (String, Deprecated) Webhook's ID

## Import

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ resource "dbtcloud_databricks_credential" "my_databricks_cred" {
project_id = dbtcloud_project.dbt_project.id
token = "abcdefgh"
schema = "my_schema"
adapter_type = "databricks"
}

// Using write-only attributes (not stored in state, requires Terraform >= 1.11)
Expand Down
2 changes: 0 additions & 2 deletions examples/resources/dbtcloud_job/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ resource "dbtcloud_job" "daily_job" {
schedule_type = "days_of_week"
schedule_hours = [0]

# set job timeout using the execution block (recommended)
execution = {
timeout_seconds = 1800
}
Expand Down Expand Up @@ -56,7 +55,6 @@ resource "dbtcloud_job" "ci_job" {
schedule_days = [0, 1, 2, 3, 4, 5, 6]
schedule_type = "days_of_week"

# set job timeout - use execution block (recommended) instead of the deprecated timeout_seconds
execution = {
timeout_seconds = 3600
}
Expand Down
14 changes: 0 additions & 14 deletions examples/resources/dbtcloud_project_artefacts/import.sh

This file was deleted.

5 changes: 0 additions & 5 deletions examples/resources/dbtcloud_project_artefacts/resource.tf

This file was deleted.

75 changes: 75 additions & 0 deletions migration_scripts_to_v2/databricks_credential/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Migration: dbtcloud_databricks_credential

## What changed

- **`resource "dbtcloud_databricks_credential"`**:
- `adapter_type` removed — the credential type is already implicit in the resource name.
- `target_name` removed — this field had no effect on the Databricks connection.
- **`data "dbtcloud_databricks_credential"`**:
- `target_name` removed.

## What the script does

- Removes `adapter_type = ...` lines from all `resource "dbtcloud_databricks_credential"` blocks.
- Removes `target_name = ...` lines from all `resource "dbtcloud_databricks_credential"` blocks.
- Removes `target_name = ...` lines from all `data "dbtcloud_databricks_credential"` blocks.

## Usage

```bash
# Preview changes without modifying files
python migrate_databricks_credential.py --dry-run ./path/to/terraform/

# Apply changes (creates .tf.bak backups)
python migrate_databricks_credential.py ./path/to/terraform/

# Multiple paths
python migrate_databricks_credential.py ./envs/prod/ ./envs/staging/ ./modules/
```

## Example

**Input** (`example_input.tf`):
```hcl
resource "dbtcloud_databricks_credential" "prod_credential" {
project_id = 1234
adapter_type = "databricks"
target_name = "prod"
token = var.databricks_token
schema = "my_schema"
catalog = "my_catalog"
}

resource "dbtcloud_databricks_credential" "dev_credential" {
project_id = 1234
adapter_type = "spark"
target_name = "dev"
token = var.databricks_token_dev
schema = "dev_schema"
}

data "dbtcloud_databricks_credential" "existing" {
project_id = 1234
credential_id = 5678
target_name = "prod"
}
```

**Output** (dry-run):
```
databricks_credential/example_input.tf
[REMOVE] 2 `adapter_type` attribute(s) from resource "dbtcloud_databricks_credential" block(s)
[REMOVE] 2 `target_name` attribute(s) from resource "dbtcloud_databricks_credential" block(s)
[REMOVE] 1 `target_name` attribute(s) from data "dbtcloud_databricks_credential" block(s)
(dry-run: no changes written)

Done. 1/1 file(s) had changes.
```

**Result:** `adapter_type` and `target_name` are removed from all resource blocks; `target_name` is removed from the data source block.

## Next steps

After running the script:

1. Run `terraform plan` — it should show no changes related to credential attributes.
22 changes: 22 additions & 0 deletions migration_scripts_to_v2/databricks_credential/example_input.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
resource "dbtcloud_databricks_credential" "prod_credential" {
project_id = 1234
adapter_type = "databricks"
target_name = "prod"
token = var.databricks_token
schema = "my_schema"
catalog = "my_catalog"
}

resource "dbtcloud_databricks_credential" "dev_credential" {
project_id = 1234
adapter_type = "spark"
target_name = "dev"
token = var.databricks_token_dev
schema = "dev_schema"
}

data "dbtcloud_databricks_credential" "existing" {
project_id = 1234
credential_id = 5678
target_name = "prod"
}
Loading
Loading