mach-composer / mach-composer-cli

MACH composer is an orchestration tool for modern MACH ecosystems, powered by Terraform infrastructure-as-code underneath.
https://docs.machcomposer.io
MIT License
48 stars 10 forks source link

Provide a way to force init #299

Closed tleguijt closed 6 months ago

tleguijt commented 1 year ago

There is logic in the cli that prevents unnecessary terraform init calls. This function checks the MACH composer CLI lock-file to see if there are any changes. If not; it will skip init.

In some cases this might cause issues, resulting in Terraform returning there is no package for registry.terraform.io/labd/commercetools 1.4.3 cached in .terraform/providers errors.

To work around this we could force an init, but mach-composer terraform init goes through the same method. For this it would be good to either explicitly force an init (mach-composer terraform init --force) or let the command itself be explicit in itself and skip the lock-file check.

demeyerthom commented 6 months ago

Fixed in https://github.com/mach-composer/mach-composer-cli/blob/main/CHANGELOG.md#v2164-2024-03-12