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

examples/complete #50

Open
mohnishbasha opened this issue Jun 22, 2023 · 2 comments
Open

examples/complete #50

mohnishbasha opened this issue Jun 22, 2023 · 2 comments
Labels
bug 🐛 An issue with the system

Comments

@mohnishbasha
Copy link

Describe the Bug

The example/complete fails to create resources and runs into failure.

Expected Behavior

example/complete as a unittest case needs to pass and the resources provisioned.

Steps to Reproduce

Steps to reproduce:

  • cd example/complete
  • terraform init
  • terraform plan -var-file=fixtures.us-east-2.tfvars <--- fails
  • terraform apply -var-file=fixtures.us-east-2.tfvars <--- fails

Screenshots


│ Error: Invalid count argument

│ on ../../main.tf line 62, in resource "aws_route" "requestor":
│ 62: count = module.this.enabled ? length(distinct(sort(data.aws_route_tables.requestor[0].ids))) * length(local.acceptor_cidr_blocks) : 0

│ The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances
│ will be created. To work around this, use the -target argument to first apply only the resources that the count depends on.


│ Error: Invalid count argument

│ on ../../main.tf line 71, in resource "aws_route" "acceptor":
│ 71: count = module.this.enabled ? length(distinct(sort(data.aws_route_tables.acceptor[0].ids))) * length(local.requestor_cidr_blocks) : 0

│ The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances
│ will be created. To work around this, use the -target argument to first apply only the resources that the count depends on.

Environment

  • OS: osx
  • version: 11.4
  • module version - latest/ main branch
  • terraform version: 1.5.0

Additional Context

No response

@mohnishbasha mohnishbasha added the bug 🐛 An issue with the system label Jun 22, 2023
@mohnishbasha
Copy link
Author

apparently, module.vpc_peering expects the vpc to be created prior to running itself, due to the data resources it is using.

@mohnishbasha
Copy link
Author

mohnishbasha commented Jun 22, 2023

Added a pr to include a README, if this helps:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant