Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In TF 0.13+ all list elements must have the same type #123

Closed
apeabody opened this issue Aug 5, 2022 · 3 comments
Closed

In TF 0.13+ all list elements must have the same type #123

apeabody opened this issue Aug 5, 2022 · 3 comments
Labels
bug Something isn't working Stale

Comments

@apeabody
Copy link
Contributor

apeabody commented Aug 5, 2022

TL;DR

Historically list(any) was used for

variable "module_depends_on" {
However subsequent to hashicorp/terraform#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

@bharathkkb
Copy link
Member

@apeabody updating docs to clarify this sgtm. IIUC end users can also workaround this by type coercion if needed.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2022

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

@maidmaid
Copy link

maidmaid commented Feb 21, 2023

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]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

3 participants