From 0d0ae6ab0419b2de4539cba5eed2d3c6c77cf1b9 Mon Sep 17 00:00:00 2001 From: Scott Winkler Date: Thu, 4 Feb 2021 02:37:54 -0800 Subject: [PATCH] update --- main.tf | 2 +- modules/cluster/main.tf | 14 +++++++------- modules/cluster/variables.tf | 6 +++--- modules/loadbalancing/variables.tf | 4 ++-- modules/networking/main.tf | 2 +- modules/resourcegroup/outputs.tf | 4 ++-- modules/resourcegroup/variables.tf | 4 ++-- outputs.tf | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/main.tf b/main.tf index 9171d5d..f743040 100644 --- a/main.tf +++ b/main.tf @@ -24,7 +24,7 @@ module "loadbalancing" { module "consul_servers" { source = "./modules/cluster" - location = var.location + location = var.location instance_count = var.consul.servers_count instance_size = var.consul.server_instance_size datacenter = var.datacenter diff --git a/modules/cluster/main.tf b/modules/cluster/main.tf index 717d725..883a581 100644 --- a/modules/cluster/main.tf +++ b/modules/cluster/main.tf @@ -2,18 +2,18 @@ data "azurerm_client_config" "current" {} locals { consul_config = var.consul.mode != "disabled" ? templatefile("${path.module}/templates/consul_${var.consul.mode}.json", { - instance_count = var.instance_count, - namespace = var.namespace, - datacenter = var.datacenter, - join_wan = join(",",[for s in var.join_wan: join("",["\"",s,"\""])]), - resource_group = var.resource_group_name, + instance_count = var.instance_count, + namespace = var.namespace, + datacenter = var.datacenter, + join_wan = join(",", [for s in var.join_wan : join("", ["\"", s, "\""])]), + resource_group = var.resource_group_name, subscription_id = data.azurerm_subscription.primary.subscription_id vm_scale_sets = { consul_servers = "${var.namespace}-Ndisabled-Cserver" } advertise_addr = var.associate_public_ips ? "$PUBLIC_IP" : "$PRIVATE_IP" - tag_name = "name" - tag_value = "${var.namespace}-Ndisabled-Cserver" + tag_name = "name" + tag_value = "${var.namespace}-Ndisabled-Cserver" }) : "" nomad_config = var.nomad.mode != "disabled" ? templatefile("${path.module}/templates/nomad_${var.nomad.mode}.hcl", { instance_count = var.instance_count diff --git a/modules/cluster/variables.tf b/modules/cluster/variables.tf index 2cedc66..d4d0e71 100644 --- a/modules/cluster/variables.tf +++ b/modules/cluster/variables.tf @@ -16,13 +16,13 @@ variable "datacenter" { variable "join_wan" { default = [] - type = list(string) + type = list(string) } variable "admin" { type = object({ - username = string - password = string + username = string + password = string disable_password_authentication = bool }) } diff --git a/modules/loadbalancing/variables.tf b/modules/loadbalancing/variables.tf index a86e590..a32b550 100644 --- a/modules/loadbalancing/variables.tf +++ b/modules/loadbalancing/variables.tf @@ -3,9 +3,9 @@ variable "namespace" { } variable "resource_group_name" { - type = string + type = string } variable "location" { - type = string + type = string } \ No newline at end of file diff --git a/modules/networking/main.tf b/modules/networking/main.tf index b5fbb3d..156479e 100644 --- a/modules/networking/main.tf +++ b/modules/networking/main.tf @@ -13,7 +13,7 @@ resource "azurerm_subnet" "vm_subnet" { name = "${var.namespace}-public0" resource_group_name = var.resource_group_name virtual_network_name = azurerm_virtual_network.virtual_network.name - address_prefixes = ["172.16.0.0/24"] + address_prefixes = ["172.16.0.0/24"] provisioner "local-exec" { when = destroy command = "sleep 30" diff --git a/modules/resourcegroup/outputs.tf b/modules/resourcegroup/outputs.tf index 8514fd6..c8f9193 100644 --- a/modules/resourcegroup/outputs.tf +++ b/modules/resourcegroup/outputs.tf @@ -1,7 +1,7 @@ output "resource_group_name" { - value = azurerm_resource_group.resource_group.name + value = azurerm_resource_group.resource_group.name } output "namespace" { - value = local.namespace + value = local.namespace } \ No newline at end of file diff --git a/modules/resourcegroup/variables.tf b/modules/resourcegroup/variables.tf index 4393563..7c7a0fe 100644 --- a/modules/resourcegroup/variables.tf +++ b/modules/resourcegroup/variables.tf @@ -1,7 +1,7 @@ variable "namespace" { - type = string + type = string } variable "location" { - type = string + type = string } \ No newline at end of file diff --git a/outputs.tf b/outputs.tf index bf307c2..3d1a6b7 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,3 +1,3 @@ output "addresses" { - value = module.loadbalancing.addresses + value = module.loadbalancing.addresses }