Skip to content
Snippets Groups Projects
Unverified Commit e317401e authored by Timo Furrer's avatar Timo Furrer
Browse files

Document best practice for lockfile handling

This change set documents a best practice for how to configure the
component when a lockfile is being used.

Closes https://gitlab.com/components/opentofu/-/issues/38

Changelog: added
parent 7c2a5be5
No related branches found
No related tags found
No related merge requests found
......@@ -205,6 +205,21 @@ plan:
- apk add jq
```
### Best Practices
This section is a collection of *some* best practices.
Feel free to contribute more that generally apply.
If a best practice really becomes the de-facto standard
we may make it the default behavior if possible.
#### Lockfile Handling
If you commit the Lockfile (`.terraform.lock.hcl`) to your repository
we recommend setting either the `TF_INIT_FLAGS` (handled by this component)
or `TF_CLI_ARGS_init` (handled by OpenTofu directly) to `-lockfile=readonly`
to prevent any changes to the lockfile during the pipeline job and with
that ensuring that OpenTofu really uses the locked dependencies.
## Releases & Versioning
This project currently releases tagged commits.
......
......@@ -230,6 +230,21 @@ plan:
- apk add jq
```
### Best Practices
This section is a collection of *some* best practices.
Feel free to contribute more that generally apply.
If a best practice really becomes the de-facto standard
we may make it the default behavior if possible.
#### Lockfile Handling
If you commit the Lockfile (`.terraform.lock.hcl`) to your repository
we recommend setting either the `TF_INIT_FLAGS` (handled by this component)
or `TF_CLI_ARGS_init` (handled by OpenTofu directly) to `-lockfile=readonly`
to prevent any changes to the lockfile during the pipeline job and with
that ensuring that OpenTofu really uses the locked dependencies.
## Releases & Versioning
This project currently releases tagged commits.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment