databricks-cli/bundle/deploy/terraform
Andrew Nester 1b0ac61093
Added deployment state for bundles (#1267)
## Changes
This PR introduces new structure (and a file) being used locally and
synced remotely to Databricks workspace to track bundle deployment
related metadata.

The state is pulled from remote, updated and pushed back remotely as
part of `bundle deploy` command.

This state can be used for deployment sequencing as it's `Version` field
is monotonically increasing on each deployment.

Currently, it only tracks files being synced as part of the deployment.

This helps fix the issue with files not being removed during deployments
on CI/CD as sync snapshot was never present there.

Fixes #943 

## Tests
Added E2E (regression) test for files removal on CI/CD

---------

Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com>
2024-03-18 14:41:58 +00:00
..
tfdyn Include `dyn.Path` as argument to the visit callback function (#1260) 2024-03-07 13:56:50 +00:00
apply.go Tune output of bundle deploy command (#1047) 2023-12-21 08:00:37 +00:00
convert.go Use `dyn.Value` as input to generating Terraform JSON (#1218) 2024-02-16 20:54:38 +00:00
convert_test.go Use `dyn.Value` as input to generating Terraform JSON (#1218) 2024-02-16 20:54:38 +00:00
destroy.go Use custom prompter for bundle template inputs (#663) 2023-08-15 14:50:20 +00:00
dir.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
import.go Added `bundle deployment bind` and `unbind` command (#1131) 2024-02-14 18:04:45 +00:00
init.go Pass `USERPROFILE` environment variable to Terraform (#1001) 2023-11-22 09:16:28 +00:00
init_test.go Pass `USERPROFILE` environment variable to Terraform (#1001) 2023-11-22 09:16:28 +00:00
interpolate.go Use dynamic configuration model in bundles (#1098) 2024-02-16 19:41:58 +00:00
interpolate_test.go Use dynamic configuration model in bundles (#1098) 2024-02-16 19:41:58 +00:00
load.go Fix metadata computation for empty bundle (#939) 2023-11-02 11:00:30 +00:00
load_test.go Fix metadata computation for empty bundle (#939) 2023-11-02 11:00:30 +00:00
pkg.go Fix summary command when internal terraform config doesn't exist (#1242) 2024-03-01 08:25:12 +00:00
plan.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
state_pull.go Added deployment state for bundles (#1267) 2024-03-18 14:41:58 +00:00
state_pull_test.go Use mockery to generate mocks compatible with testify/mock (#1190) 2024-02-08 15:18:53 +00:00
state_push.go Added deployment state for bundles (#1267) 2024-03-18 14:41:58 +00:00
state_push_test.go Use mockery to generate mocks compatible with testify/mock (#1190) 2024-02-08 15:18:53 +00:00
state_test.go Added deployment state for bundles (#1267) 2024-03-18 14:41:58 +00:00
unbind.go Added `bundle deployment bind` and `unbind` command (#1131) 2024-02-14 18:04:45 +00:00
util.go Do not truncate local state file when pulling remote changes (#382) 2023-05-16 17:02:33 +02:00
util_test.go Correctly overwrite local state if remote state is newer (#1008) 2023-11-24 11:15:46 +00:00
write.go Fix summary command when internal terraform config doesn't exist (#1242) 2024-03-01 08:25:12 +00:00