Skip to content

Support OpenTofu state encryption

Proposal

OpenTofu is adding support for state encryption in 1.7.0, with a initial preview available in 1.7.0-alpha1. It has been reported by users that Gitlab's http state backend returns a 500 error when attempting to upload encrypted state.

It appears that Gitlab is trying to infer version information about the uploaded state and fails due to the encrypted data format. A way to detect if the payload is encrypted is to look for the "encryption_version" string field in the uploaded json payload. If it is encrypted, Gitlab should not try to pull any information out of the payload and simply store it as is.

Cross linking to the issue in the main OpenTofu repository: https://github.com/opentofu/opentofu/issues/1407