Files
opentf/website/docs/language/state/examples/encryption/fallback_to_unencrypted.tf
Janos 07d88c0786 Cleaning up encryption docs for 1.7.0-beta1 (#1495)
Signed-off-by: Janos <86970079+janosdebugs@users.noreply.github.com>
Signed-off-by: James Humphries <James@james-humphries.co.uk>
Co-authored-by: James Humphries <James@james-humphries.co.uk>
Co-authored-by: Siddhartha Sonker <34684647+siddharthasonker@users.noreply.github.com>
2024-04-18 09:19:17 +01:00

31 lines
848 B
HCL

terraform {
encryption {
## Step 1: Leave the original encryption method unchanged:
method "some_method" "old_method" {
## Parameters for the old method here.
}
# Step 2: Add the unencrypted method here:
method "unencrypted" "migrate" {}
state {
## Step 3: Disable or remove the "enforced" option:
enforced = false
## Step 4: Move the original encryption method into the "fallback" block:
fallback {
method = method.some_method.old_method
}
## Step 5: Reference the unencrypted method as your primary "encryption" method.
method = method.unencrypted.migrate
}
## Step 6: Run "tofu apply".
## Step 7: Remove the "state" block once the migration is complete.
## Step 8: Repeat steps 3-7 for plan{} if needed.
}
}