opentofu/internal/backend/remote-state
Sarah French d43ec0f30f
Add customer-managed encryption key (KMS) support to GCS backend (#31786)
* Add ability to use customer-managed KMS key to encrypt state, add acceptance tests

* Change test names for different encrpytion methods

* Commit files updated by `go mod tidy`

* Add guard against missing ENVs to `setupKmsKey` func

* Update KMS setup function to get credentials from ENVs

* Update tests to not include zero-values in config

This means that default values are supplied later by TF instead of supplied as config from the user

This also avoids issues related to making field conflicts explicit with `ConflictsWith`

* Make `encryption_key` & `kms_encryption_key` conflicting fields

Removing the Default from `encryption_key` does not appear to be a breaking change when tested manually

* Add ability to set `kms_encryption_key` via ENV

* Refactor `encryption_key` to use `DefaultFunc` to access ENV, if set

* Remove comments

* Update `gcs` backend docs & descriptions in schema

* Update `gcs` backend docs to include information on encryption methods

* Apply technical writing suggestions from code review

Co-authored-by: Matthew Garrell <69917312+mgarrell777@users.noreply.github.com>

* Update documentation to remove passive voice

* Change use of context in tests, add inline comment, update logs

* Remove use of `ReadPathOrContents` for new field

Co-authored-by: Matthew Garrell <69917312+mgarrell777@users.noreply.github.com>
2022-10-04 10:10:49 +01:00
..
azure update persist state 2022-08-25 14:57:40 -05:00
consul update persist state 2022-08-25 14:57:40 -05:00
cos update persist state 2022-08-25 14:57:40 -05:00
gcs Add customer-managed encryption key (KMS) support to GCS backend (#31786) 2022-10-04 10:10:49 +01:00
http http-backend: http backend lock error return LockError instead of generic error 2022-06-16 11:01:01 -04:00
inmem updating to use the latest version of cloud/state.go and just pass schemas along to PersistState in the remote state 2022-08-29 14:13:18 -05:00
kubernetes update persist state 2022-08-25 14:57:40 -05:00
oss update persist state 2022-08-25 14:57:40 -05:00
pg update persist state 2022-08-25 14:57:40 -05:00
s3 update persist state 2022-08-25 14:57:40 -05:00