terraform-google-gcloud
terraform-google-gcloud copied to clipboard
In TF 0.13+ all list elements must have the same type
TL;DR
Historically list(any)
was used for https://github.com/terraform-google-modules/terraform-google-gcloud/blob/6789fa726f443e36a3159f452eec0fc5f9a9ff4b/variables.tf#L35 However subsequent to https://github.com/hashicorp/terraform/issues/26265, all list elements must have the same type. So for example this fails: module_depends_on = [time_sleep.wait_300_seconds, null_resource.test]
The given value is not suitable as all list elements must have the same type.
@bharathkkb - When you have time, could you confirm/feedback as if so this might apply to several modules? The vast majority of module_depends_on
only have a single argument, are therefore work as expected. However we might want to switch to a string or update the documentation to clarify the situation.
Expected behavior
No response
Observed behavior
No response
Terraform Configuration
N/A
Terraform Version
Terraform v1.2.2
Additional information
No response
@apeabody updating docs to clarify this sgtm. IIUC end users can also workaround this by type coercion if needed.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
A workaround could be to use an intermediate null_resource depending on the real resources:
resource "null_resource" "depends_on_sleep_and_test" {
triggers = { always_run = timestamp() }
depends_on = [time_sleep.wait_300_seconds, null_resource.test]
}
module "execute_create_admin" {
source = "terraform-google-modules/gcloud/google"
module_depends_on = [null_resource.depends_on_sleep_and_test]
}