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

var.subnets count inconsistent with data.google_compute_subnetwork.created_subnets #100

Closed
Jeanno opened this issue Nov 4, 2019 · 1 comment · Fixed by #86
Closed

var.subnets count inconsistent with data.google_compute_subnetwork.created_subnets #100

Jeanno opened this issue Nov 4, 2019 · 1 comment · Fixed by #86
Assignees
Labels
bug Something isn't working P2 high priority issues triaged Scoped and ready for work

Comments

@Jeanno
Copy link
Contributor

Jeanno commented Nov 4, 2019

Steps to reproduce

  1. terraform apply
  2. terraform destroy or change the number of items in var.subnets
  3. terraform apply again. This time it will fail

Error

Error will be something like this:

Error: Error in function call

  on .terraform/modules/vpc/terraform-google-modules-terraform-google-network-7810346/main.tf line 57, in data "google_compute_subnetwork" "created_subnets":
  57:   region     = element(google_compute_subnetwork.subnetwork.*.region, count.index)
    |----------------
    | count.index is 0
    | google_compute_subnetwork.subnetwork is empty tuple

Call to function "element" failed: cannot use element function with an empty
list.

Related issues

#99 Cannot create VPC with only one subnet

@Jeanno Jeanno added the bug Something isn't working label Nov 4, 2019
@morgante morgante mentioned this issue Nov 7, 2019
@aaron-lane
Copy link
Contributor

Fixed by #86.

@aaron-lane aaron-lane added the P2 high priority issues label Dec 2, 2019
@morgante morgante mentioned this issue Dec 2, 2019
8 tasks
@aaron-lane aaron-lane added the triaged Scoped and ready for work label Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 high priority issues triaged Scoped and ready for work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants