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.
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.