[GH-ISSUE #110] Unable to generate diagram on Windows machine #56

Closed
opened 2026-05-06 12:36:48 +02:00 by BreizhHardware · 1 comment

Originally created by @rajivverma on GitHub (Mar 11, 2024).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/110

Hello,
I wanted to try out the tool. I have got everything setup and all dependencies installed using vscode on a windows machine.
I am using following command to generate the diagram.
python terravision draw --source <path-to-my-terraform-code-folder>

I am getting the following error.

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: Invalid provider configuration
│
│ Provider "registry.terraform.io/hashicorp/aws" requires explicit configuration. Add a provider block to the root module and configure the provider's required arguments as described in   
│ the provider documentation.
│
╵
╷
│ Error: No valid credential sources found
│
│   with provider["registry.terraform.io/hashicorp/aws"],
│   on <empty> line 0:
│   (source code not available)
│
│ Please see https://registry.terraform.io/providers/hashicorp/aws
│ for more information about providing credentials.
│
│ Error: failed to refresh cached credentials, process provider error: error in credential_process: exit status 1
│
╵
╷
│ Error: Invalid index
│
│   on data.tf line 9, in data "template_file" "app_ec2_hostname":
│    9:       var.env_hostname_letters[var.global_environment],
│     ├────────────────
│     │ var.env_hostname_letters is map of string with 6 elements
│     │ var.global_environment is "xxx-PoC"
│
│ The given key does not identify an element in this collection value.
╵
╷
│ Error: Invalid index
│
│   on data.tf line 21, in data "template_file" "app_ec2_hostname_win22":
│   21:       var.env_hostname_letters[var.global_environment],
│     ├────────────────
│     │ var.env_hostname_letters is map of string with 6 elements
│     │ var.global_environment is "xxx-PoC"
│
│ The given key does not identify an element in this collection value.
╵
╷
│ Error: Incorrect value type
│
│   on data.tf line 28, in data "template_file" "database_ec2_hostname_win22":
│   28:   count = var.ec2_database_count_win22
│     ├────────────────
│     │ var.ec2_database_count_win22 is ""
│
│ Invalid expression value: a number is required.
╵
╷
│ Error: Incorrect value type
│
│   on data.tf line 40, in data "template_file" "database_ec2_hostname_win22_dedicated_host":
│   40:   count = var.ec2_database_count_win22_dedicated_host
│     ├────────────────
│     │ var.ec2_database_count_win22_dedicated_host is ""
│
│ Invalid expression value: a number is required.
╵

Analysing plan..


ERROR: Invalid output from 'terraform plan' command. Try using the terraform CLI first to check source files have no errors.
Originally created by @rajivverma on GitHub (Mar 11, 2024). Original GitHub issue: https://github.com/patrickchugh/terravision/issues/110 Hello, I wanted to try out the tool. I have got everything setup and all dependencies installed using vscode on a windows machine. I am using following command to generate the diagram. `python terravision draw --source <path-to-my-terraform-code-folder>` I am getting the following error. ``` Planning failed. Terraform encountered an error while generating this plan. ╷ │ Error: Invalid provider configuration │ │ Provider "registry.terraform.io/hashicorp/aws" requires explicit configuration. Add a provider block to the root module and configure the provider's required arguments as described in │ the provider documentation. │ ╵ ╷ │ Error: No valid credential sources found │ │ with provider["registry.terraform.io/hashicorp/aws"], │ on <empty> line 0: │ (source code not available) │ │ Please see https://registry.terraform.io/providers/hashicorp/aws │ for more information about providing credentials. │ │ Error: failed to refresh cached credentials, process provider error: error in credential_process: exit status 1 │ ╵ ╷ │ Error: Invalid index │ │ on data.tf line 9, in data "template_file" "app_ec2_hostname": │ 9: var.env_hostname_letters[var.global_environment], │ ├──────────────── │ │ var.env_hostname_letters is map of string with 6 elements │ │ var.global_environment is "xxx-PoC" │ │ The given key does not identify an element in this collection value. ╵ ╷ │ Error: Invalid index │ │ on data.tf line 21, in data "template_file" "app_ec2_hostname_win22": │ 21: var.env_hostname_letters[var.global_environment], │ ├──────────────── │ │ var.env_hostname_letters is map of string with 6 elements │ │ var.global_environment is "xxx-PoC" │ │ The given key does not identify an element in this collection value. ╵ ╷ │ Error: Incorrect value type │ │ on data.tf line 28, in data "template_file" "database_ec2_hostname_win22": │ 28: count = var.ec2_database_count_win22 │ ├──────────────── │ │ var.ec2_database_count_win22 is "" │ │ Invalid expression value: a number is required. ╵ ╷ │ Error: Incorrect value type │ │ on data.tf line 40, in data "template_file" "database_ec2_hostname_win22_dedicated_host": │ 40: count = var.ec2_database_count_win22_dedicated_host │ ├──────────────── │ │ var.ec2_database_count_win22_dedicated_host is "" │ │ Invalid expression value: a number is required. ╵ Analysing plan.. ERROR: Invalid output from 'terraform plan' command. Try using the terraform CLI first to check source files have no errors. ```
Author
Owner

@patrickchugh commented on GitHub (Jan 3, 2026):

Windows support has been tested as working. @rajivverma

<!-- gh-comment-id:3706541396 --> @patrickchugh commented on GitHub (Jan 3, 2026): Windows support has been tested as working. @rajivverma
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/terravision#56
No description provided.