Describe the Bug
When crating a fresh backend layer, the s3 key must be commented out and init must be done with leverage tofu init --skip-validation.
The process fails as follows:
❯ leverage tofu init --skip-validation
[18:28:59.333] ERROR Malformed config.tf file. Unable to parse.
Expected Behavior
The backend layer should be correctly initialized, so it can be applied and then, with command leverage tofu init the backend should be migrated to the newly created bucket.
Steps to Reproduce
Steps to reproduce the behavior:
- Create a new backend layer
- Go to to the new layer
- Ensure
s3 key is commented out in the config.tf file
- Run
leverage tofu init --skip-validation
- See error as described above
Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
❯ leverage --version
leverage, version 3.0.0
❯ uname -s -r -v -m -o
Linux 7.1.5-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Sun, 26 Jul 2026 00:48:55 +0000 x86_64 GNU/Linux
❯ python --version
Python 3.14.6
❯ tofu --version
OpenTofu v1.10.8
Additional Context
Additional analysis and possible fix added as comment.
Describe the Bug
When crating a fresh backend layer, the
s3key must be commented out and init must be done withleverage tofu init --skip-validation.The process fails as follows:
Expected Behavior
The backend layer should be correctly initialized, so it can be applied and then, with command
leverage tofu initthe backend should be migrated to the newly created bucket.Steps to Reproduce
Steps to reproduce the behavior:
s3key is commented out in theconfig.tffileleverage tofu init --skip-validationEnvironment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
Additional Context
Additional analysis and possible fix added as comment.