From 62a49e2257a5c696ab6e9328207db85645a37666 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 11 Jun 2025 16:49:18 -0700 Subject: [PATCH 1/4] Update Terraform dependency to 1.12.2 --- NOTICE | 2 +- acceptance/install_terraform.py | 2 +- acceptance/terraform/main.tf | 2 +- .../terraform/check_dashboards_modified_remotely_test.go | 2 +- bundle/deploy/terraform/pkg.go | 8 ++++---- bundle/internal/tf/codegen/schema/generate.go | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NOTICE b/NOTICE index 1e6e70e34f..763f6c8c71 100644 --- a/NOTICE +++ b/NOTICE @@ -38,7 +38,7 @@ License - https://github.com/hashicorp/terraform-json/blob/main/LICENSE hashicorp/terraform - https://github.com/hashicorp/terraform Copyright 2014 HashiCorp, Inc. -License - https://github.com/hashicorp/terraform/blob/v1.5.5/LICENSE +License - https://github.com/hashicorp/terraform/blob/v1.12.2/LICENSE --- diff --git a/acceptance/install_terraform.py b/acceptance/install_terraform.py index 4cf6a97290..71c4442f52 100755 --- a/acceptance/install_terraform.py +++ b/acceptance/install_terraform.py @@ -24,7 +24,7 @@ # terraform 1.5.5 only has builds for these two. arch = "amd64" -terraform_version = "1.5.5" +terraform_version = "1.12.2" terraform_file = f"terraform_{terraform_version}_{os_name}_{arch}.zip" terraform_url = f"https://releases.hashicorp.com/terraform/{terraform_version}/{terraform_file}" terraform_binary = "terraform.exe" if os_name == "windows" else "terraform" diff --git a/acceptance/terraform/main.tf b/acceptance/terraform/main.tf index 04e76c9193..44a9b615d1 100644 --- a/acceptance/terraform/main.tf +++ b/acceptance/terraform/main.tf @@ -6,7 +6,7 @@ terraform { } } - required_version = "= 1.5.5" + required_version = "= 1.12.2" } provider "databricks" { diff --git a/bundle/deploy/terraform/check_dashboards_modified_remotely_test.go b/bundle/deploy/terraform/check_dashboards_modified_remotely_test.go index 98d20a4739..505f1ffe76 100644 --- a/bundle/deploy/terraform/check_dashboards_modified_remotely_test.go +++ b/bundle/deploy/terraform/check_dashboards_modified_remotely_test.go @@ -142,7 +142,7 @@ func writeFakeDashboardState(t *testing.T, ctx context.Context, b *bundle.Bundle testutil.WriteFile(t, filepath.Join(tfDir, TerraformStateFileName), ` { "version": 4, - "terraform_version": "1.5.5", + "terraform_version": "1.12.2", "resources": [ { "mode": "managed", diff --git a/bundle/deploy/terraform/pkg.go b/bundle/deploy/terraform/pkg.go index bd636639fb..cf65685fd7 100644 --- a/bundle/deploy/terraform/pkg.go +++ b/bundle/deploy/terraform/pkg.go @@ -22,17 +22,17 @@ const ( // Terraform CLI version to use and the corresponding checksums for it. The // checksums are used to verify the integrity of the downloaded binary. Please // update the checksums when the Terraform version is updated. The checksums -// were obtained from https://releases.hashicorp.com/terraform/1.5.5. +// were obtained from https://releases.hashicorp.com/terraform/1.12.2. // // These hashes are not used inside the CLI. They are only co-located here to be // output in the "databricks bundle debug terraform" output. Downstream applications // like the CLI docker image use these checksums to verify the integrity of the // downloaded Terraform archive. -var TerraformVersion = version.Must(version.NewVersion("1.5.5")) +var TerraformVersion = version.Must(version.NewVersion("1.12.2")) const ( - checksumLinuxArm64 = "b055aefe343d0b710d8a7afd31aeb702b37bbf4493bb9385a709991e48dfbcd2" - checksumLinuxAmd64 = "ad0c696c870c8525357b5127680cd79c0bdf58179af9acd091d43b1d6482da4a" + checksumLinuxArm64 = "f8a0347dc5e68e6d60a9fa2db361762e7943ed084a773f28a981d988ceb6fdc9" + checksumLinuxAmd64 = "1eaed12ca41fcfe094da3d76a7e9aa0639ad3409c43be0103ee9f5a1ff4b7437" ) type Checksum struct { diff --git a/bundle/internal/tf/codegen/schema/generate.go b/bundle/internal/tf/codegen/schema/generate.go index 27dfbc023f..deda68105f 100644 --- a/bundle/internal/tf/codegen/schema/generate.go +++ b/bundle/internal/tf/codegen/schema/generate.go @@ -43,7 +43,7 @@ func (s *Schema) installTerraform(ctx context.Context) (path string, err error) installer := &releases.ExactVersion{ Product: product.Terraform, - Version: version.Must(version.NewVersion("1.5.5")), + Version: version.Must(version.NewVersion("1.12.2")), InstallDir: installDir, } From 96b47ef42de17138e2f8e623da67ba7756c79142 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 11 Jun 2025 17:31:29 -0700 Subject: [PATCH 2/4] Update acceptance test output --- acceptance/terraform/output.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/acceptance/terraform/output.txt b/acceptance/terraform/output.txt index 49ba506a5e..704824fd4e 100644 --- a/acceptance/terraform/output.txt +++ b/acceptance/terraform/output.txt @@ -1,13 +1,10 @@ >>> [TERRAFORM] init -no-color -get=false - Initializing the backend... - Initializing provider plugins... - Finding databricks/databricks versions matching "1.81.0"... - Installing databricks/databricks v1.81.0... - Installed databricks/databricks v1.81.0 (unauthenticated) - Terraform has created a lock file .terraform.lock.hcl to record the provider selections it made above. Include this file in your version control repository so that Terraform can guarantee to make the same selections by default when @@ -24,7 +21,6 @@ calculate lock file checksums locally for the following providers: To calculate additional checksums for another platform, run: terraform providers lock -platform=linux_amd64 (where linux_amd64 is the platform to generate) - Terraform has been successfully initialized! You may now begin working with Terraform. Try running "terraform plan" to see From 09c55092fcb79381bbb9c51eee014f27f5268a0d Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 11 Jun 2025 18:00:28 -0700 Subject: [PATCH 3/4] Update NUMBER pattern --- .../templates/default-python/integration_classic/test.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acceptance/bundle/templates/default-python/integration_classic/test.toml b/acceptance/bundle/templates/default-python/integration_classic/test.toml index 826f6ced08..6549d1c3e0 100644 --- a/acceptance/bundle/templates/default-python/integration_classic/test.toml +++ b/acceptance/bundle/templates/default-python/integration_classic/test.toml @@ -21,7 +21,7 @@ Response.Body = '{}' [[Repls]] # for some reason leading number is lost converting "%H%M%S" 061234 to 61234 -Old = '\d{5,}' +Old = '\d{4,}' New = '[NUMBER]' [[Repls]] From ff1cfb51acc79e88c198a1dcfe5b2720b2eea516 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 16 Jun 2025 12:13:55 +0200 Subject: [PATCH 4/4] Include entry in NEXT_CHANGELOG --- NEXT_CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 3ea6a080c5..ff948d7b1b 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -5,6 +5,7 @@ ### Notable Changes ### Dependency updates +* Upgrade Terraform dependency to v1.12.2 ([#3040](https://github.com/databricks/cli/pull/3040)) ### CLI