Upload terraform state even if apply fails (#923)

## Changes
Upload terraform state even if apply fails

Fixes #893 

## Tests
Manually running `databricks bundle deploy` with incorrect permissions
in bundle config and observe that it gets uploaded correctly
This commit is contained in:
Andrew Nester 2023-10-26 16:38:01 +02:00 committed by GitHub
parent 9b16e9bd45
commit 19e00d2d47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -29,8 +29,10 @@ func Deploy() bundle.Mutator {
terraform.Interpolate(),
terraform.Write(),
terraform.StatePull(),
terraform.Apply(),
terraform.StatePush(),
bundle.Defer(
terraform.Apply(),
terraform.StatePush(),
),
),
lock.Release(lock.GoalDeploy),
),