Skip to content

Commit

Permalink
Fixed network type var
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Fontana-Indico committed Mar 29, 2024
1 parent 3edf5d9 commit 272583c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ locals {
}

data "azurerm_resource_group" "loaded-group" {
count = var.create_resource_group ? 0 : 1
count = var.network_type == "create" ? 0 : 1
name = var.resource_group_name
}

resource "azurerm_resource_group" "cod-network" {
count = var.create_resource_group ? 1 : 0
count = var.network_type == "load" ? 0 : 1
name = var.resource_group_name
location = var.region
}
Expand Down
1 change: 0 additions & 1 deletion user_vars.auto.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# external_ip = "xxx.yyy.zzz.qqq"

resource_group_name = "bread-pre-existing"
create_resource_group = false

label = "breadnetwork"
region = "eastus"
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,4 @@ variable "virtual_subnet_name" {
type = string
}

variable "create_resource_group" {
type = bool
default = true
}



0 comments on commit 272583c

Please sign in to comment.