Skip to content

bundle: always error on references to Terraform-only fields - #6937

Merged
denik merged 2 commits into
mainfrom
denik/tf-cleanup-tf-only-refs
Oct 6, 2026
Merged

denik merged 2 commits into
mainfrom
denik/tf-cleanup-tf-only-refs

Conversation

@denik

@denik denik commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Changes

DATABRICKS_BUNDLE_ENGINE=terraform is now rejected before initialization, so the removal error is the first (and only) thing users see. Previously, a bundle referencing a Terraform-only field printed a warning first. With that, the warning branch of the Terraform-only reference check is unreachable; it now always reports an error.

Tests

New case in acceptance/bundle/resource_deps/tf_path_only_error for the env var.

This pull request and its description were written by Isaac.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 08c1ddf

Run: 37454901134

Env ✅​pass 🙈​skip Time
✅​ aws linux 276 17 5:16
✅​ aws windows 278 15 3:19
✅​ azure linux 275 17 5:57
✅​ azure windows 277 15 4:06
✅​ gcp linux 276 17 5:36
✅​ gcp windows 278 15 3:38
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:52 gcp linux TestAccept
3:52 azure linux TestAccept
3:42 azure windows TestAccept
3:12 aws windows TestAccept
3:08 gcp windows TestAccept
2:53 aws linux TestAccept

@denik
denik marked this pull request as ready for review October 6, 2026 07:35
@denik
denik requested review from a team as code owners October 6, 2026 07:35
@denik
denik requested review from anton-107 and rclarey October 6, 2026 07:35
The warning branch of validate.TFOnlyReferences was only reachable with
DATABRICKS_BUNDLE_ENGINE=terraform (or bundle.engine: terraform), and such
commands fail with the engine removal error anyway. Drop the engine
lookup and always report an error.

Reject an invalid or removed DATABRICKS_BUNDLE_ENGINE before
initialization so the removal error is the first thing users see.
bundle.engine: terraform is still reported by validate.ValidateEngine,
which runs before TFOnlyReferences.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik force-pushed the denik/tf-cleanup-engine-params branch from 7eb7fef to 9706a2d Compare October 6, 2026 10:15
@denik
denik force-pushed the denik/tf-cleanup-tf-only-refs branch from 4e9d99e to 8ab9370 Compare October 6, 2026 10:15
@denik
denik changed the base branch from denik/tf-cleanup-engine-params to main October 6, 2026 10:15
Error: the Terraform deployment engine has been removed in Databricks CLI v1.20.0

Remove the "bundle.engine" setting (or set it to "direct") to deploy with the direct engine; existing Terraform state is migrated automatically. To keep using Terraform, revert to Databricks CLI v1.19.x.
See https://docs.databricks.com/dev-tools/bundles/direct for details

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is awkward since the bundle doesn't contain bundle.engine but TF was forced via the environment variable. Out of scope of this PR but we should fix that anyway

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, noted as follow up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the DABs DABs related issues label Oct 6, 2026
@denik
denik added this pull request to the merge queue Oct 6, 2026
Merged via the queue into main with commit 7d50870 Oct 6, 2026
25 checks passed
@denik
denik deleted the denik/tf-cleanup-tf-only-refs branch October 6, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants