Loading...
Loading...
### Terraform Version ```shell Terraform v1.11.2 on darwin_arm64 ``` ### Terraform Configuration Files main.tf ```terraform module "count_1" { count = 1 source = "./module" } module "count_0" { count = 0 source = "./module" } ``` ./module/main.tf ```terraform ephemeral "random_password" "this" { length = 10 } ``` ### Debug Output [trace output](https://gist.github.com/pmac72/474fbdc0ca51a5fe090787c6a82bbb46) ### Expected Behavior No error reported when the module count is 0. ### Actual Behavior ``` │ Error: Graph node has invalid dynamic subgraph │ │ The internal logic for "module.count_0.ephemeral.random_password.this (expand)" generated an invalid dynamic subgraph: no roots found. │ │ This is a bug in Terraform. Please report it! ``` ### Steps to Reproduce 1. `terraform init` 1. `terraform apply` ### Additional Context This is a simplified example to show the issue, the actual module where I came across this has variables that can cause the count to be >=0. Also tested this with an ephemeral `aws_ssm_parameter` from the AWS Provider with the same result. ### References _No response_ ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.