Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Winkler authored and Scott Winkler committed Feb 4, 2021
1 parent dfe76d5 commit 0d0ae6a
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions modules/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions modules/cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}
Expand Down
4 changes: 2 additions & 2 deletions modules/loadbalancing/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ variable "namespace" {
}

variable "resource_group_name" {
type = string
type = string
}

variable "location" {
type = string
type = string
}
2 changes: 1 addition & 1 deletion modules/networking/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions modules/resourcegroup/outputs.tf
Original file line number Diff line number Diff line change
@@ -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
}
4 changes: 2 additions & 2 deletions modules/resourcegroup/variables.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
variable "namespace" {
type = string
type = string
}

variable "location" {
type = string
type = string
}
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
output "addresses" {
value = module.loadbalancing.addresses
value = module.loadbalancing.addresses
}

0 comments on commit 0d0ae6a

Please sign in to comment.