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

Added 3 default subnet_prefixes to the subnet list in variables.tf m… #57

Closed
wants to merge 1 commit into from

Conversation

diogomaul
Copy link

Fixes #1

Changes proposed in the pull request:

I've added 3 default subnet_prefixes to the list in variables.tf so that it matches the 3 default subnet_names. This will help people to run/test the code without adding any optional variables, especially people that are just starting to learn Terraform modules.

Without this fix, Terraform Plan throws the following error when you run it without adding subnet_prefixes (or names):
Error: Invalid index

│ on .terraform/modules/vnet/main.tf line 20, in resource "azurerm_subnet" "subnet":
│ 20: address_prefixes = [var.subnet_prefixes[count.index]]
│ ├────────────────
│ │ count.index is 1
│ │ var.subnet_prefixes is list of string with 1 element

│ The given key does not identify an element in this collection value: the
│ given index is greater than or equal to the length of the collection.


│ Error: Invalid index

│ on .terraform/modules/vnet/main.tf line 20, in resource "azurerm_subnet" "subnet":
│ 20: address_prefixes = [var.subnet_prefixes[count.index]]
│ ├────────────────
│ │ count.index is 2
│ │ var.subnet_prefixes is list of string with 1 element

│ The given key does not identify an element in this collection value.

@github-actions
Copy link
Contributor

MAIN BRANCH PUSH DETECTED DUE TO #71, THIS PR NEED TO BE UPDATED TO TRIGGER CI.

@github-actions
Copy link
Contributor

MAIN BRANCH PUSH DETECTED DUE TO #72, THIS PR NEED TO BE UPDATED TO TRIGGER CI.

@github-actions
Copy link
Contributor

MAIN BRANCH PUSH DETECTED DUE TO #, THIS PR NEED TO BE UPDATED TO TRIGGER CI.

@lonegunmanb
Copy link
Member

Thanks @diogomaul for opening this pr and apology for this late reply. We've changed a lot of files to add a CI pipeline to this module so I just re-write this pr as #73. Again, thanks for your contribution and understanding, I'm closing this pr now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants