You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a scenario as described below, upgrading from one module version to next results in error.
module "foo" {
source = "terraform-google-modules/gcloud/google"
+ version = "1.4.1"- version = "1.4.0"
....
}
Error:
Error running command '.terraform/modules/bar.foo/terraform-google-gcloud-1.4.0/scripts/check_components.sh gcloud foo bar': exit status 127. Output: /bin/sh: .terraform/modules/bar.foo/terraform-google-gcloud-1.4.0/scripts/check_components.sh: not found
The reason seems to be that initially the directory structure is
hence the file .terraform/modules/bar.foo/terraform-google-gcloud-1.4.0/scripts/check_components.sh no longer exists and has been replaced by .terraform/modules/bar.foo/terraform-google-gcloud-1.4.1/scripts/check_components.sh
Workaround
Possible workaround seems to be to taint the resource but is not ideal.
I believe this should longer be an issue as with hashicorp/terraform#26143 the folder dir will no longer have the version appended. This should resolve the issue for most use cases, the only other case would be if we change the dir locations within the module. At that point, we should consider a breaking release or add some instructions to taint as defined here.
Error
In a scenario as described below, upgrading from one module version to next results in error.
Error:
The reason seems to be that initially the directory structure is
but after a
tf init
with the new version of the module, it becomeshence the file
.terraform/modules/bar.foo/terraform-google-gcloud-1.4.0/scripts/check_components.sh
no longer exists and has been replaced by.terraform/modules/bar.foo/terraform-google-gcloud-1.4.1/scripts/check_components.sh
Workaround
Possible workaround seems to be to taint the resource but is not ideal.
The text was updated successfully, but these errors were encountered: