Loading...
Loading...
### Terraform Version ```shell tested with: Terraform v1.6.2 on darwin_amd64 Terraform v1.7.0 on linux_amd64 ``` ### Terraform Configuration Files ```terraform locals { test1 = local.test2 test2 = local.test1 } ``` ### Debug Output ``` terraform graph -draw-cycles -type=apply 2024-02-08T09:07:49.575-0500 [INFO] Terraform version: 1.6.2 2024-02-08T09:07:49.575-0500 [DEBUG] using github.com/hashicorp/go-tfe v1.36.0 2024-02-08T09:07:49.575-0500 [DEBUG] using github.com/hashicorp/hcl/v2 v2.19.1 2024-02-08T09:07:49.575-0500 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1 2024-02-08T09:07:49.575-0500 [DEBUG] using github.com/zclconf/go-cty v1.14.1 2024-02-08T09:07:49.575-0500 [INFO] Go runtime version: go1.21.1 2024-02-08T09:07:49.575-0500 [INFO] CLI args: []string{"terraform", "graph", "-draw-cycles", "-type=apply"} 2024-02-08T09:07:49.575-0500 [DEBUG] Attempting to open CLI config file: /Users/hsepulv/.terraformrc 2024-02-08T09:07:49.575-0500 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. 2024-02-08T09:07:49.576-0500 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins 2024-02-08T09:07:49.576-0500 [DEBUG] ignoring non-existing provider search directory /Users/hsepulv/.terraform.d/plugins 2024-02-08T09:07:49.576-0500 [DEBUG] ignoring non-existing provider search directory /Users/hsepulv/Library/Application Support/io.terraform/plugins 2024-02-08T09:07:49.576-0500 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins 2024-02-08T09:07:49.577-0500 [INFO] CLI command args: []string{"graph", "-draw-cycles", "-type=apply"} 2024-02-08T09:07:49.580-0500 [DEBUG] New state was assigned lineage "6022a998-fafe-28ff-48cf-139144ad0456" 2024-02-08T09:07:51.091-0500 [DEBUG] checking for provisioner in "." 2024-02-08T09:07:51.091-0500 [DEBUG] checking for provisioner in "/Users/hsepulv/bin" 2024-02-08T09:07:51.092-0500 [DEBUG] Not attaching any node states: overall state is nil 2024-02-08T09:07:51.092-0500 [DEBUG] No state, no orphan outputs 2024-02-08T09:07:51.093-0500 [DEBUG] ReferenceTransformer: "local.test2 (expand)" references: [local.test1 (expand)] 2024-02-08T09:07:51.093-0500 [DEBUG] ReferenceTransformer: "local.test1 (expand)" references: [local.test2 (expand)] 2024-02-08T09:07:51.093-0500 [ERROR] Graph validation failed. Graph: local.test1 (expand) local.test2 (expand) local.test2 (expand) local.test1 (expand) root ╷ │ Error: Cycle: local.test1 (expand), local.test2 (expand) │ │ ╵ ``` ### Expected Behavior We should get a dot output that we can later use to generate an image ### Actual Behavior Console outout Error: Cycle ### Steps to Reproduce terraform graph -draw-cycles -type=apply ### Additional Context https://developer.hashicorp.com/terraform/cli/commands/graph#draw-cycles > `-draw-cycles` - Highlight any cycles in the graph with colored edges. This helps when diagnosing cycle errors. This option is supported only when selecting one of the real graph operaton types using the -type=... option. What good is that option if it errors on a cycle ### References https://stackoverflow.com/questions/77960427/cannot-draw-terrform-cycle-with-colors-using-terraform-graph-with-plan-output
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.