diff --git a/main.tf b/main.tf index f8cce74..aced442 100644 --- a/main.tf +++ b/main.tf @@ -104,6 +104,7 @@ module "load_balancer" { resource_name_prefix = var.resource_name_prefix resource_group_name = azurerm_resource_group.graphdb.name + zones = var.zones tags = local.tags @@ -125,6 +126,7 @@ module "vm" { resource_name_prefix = var.resource_name_prefix resource_group_name = azurerm_resource_group.graphdb.name network_interface_name = azurerm_virtual_network.graphdb.name + zones = var.zones graphdb_subnet_name = azurerm_subnet.graphdb-vmss.name load_balancer_backend_address_pool_id = module.load_balancer.load_balancer_backend_address_pool_id diff --git a/modules/configuration/variables.tf b/modules/configuration/variables.tf index 064d6f2..a3de37d 100644 --- a/modules/configuration/variables.tf +++ b/modules/configuration/variables.tf @@ -1,3 +1,5 @@ +# General configurations + variable "tags" { description = "Common resource tags." type = map(string) @@ -9,6 +11,8 @@ variable "resource_group_name" { type = string } +# Dependencies + variable "identity_name" { description = "Name of a user assigned identity for assigning permissions" type = string @@ -19,6 +23,8 @@ variable "key_vault_name" { type = string } +# GraphDB configurations + variable "graphdb_license_path" { description = "Local path to a file, containing a GraphDB Enterprise license." type = string diff --git a/modules/load_balancer/variables.tf b/modules/load_balancer/variables.tf index e7fd2eb..9f740dd 100644 --- a/modules/load_balancer/variables.tf +++ b/modules/load_balancer/variables.tf @@ -1,8 +1,16 @@ +# General configurations + variable "resource_name_prefix" { description = "Resource name prefix used for tagging and naming Azure resources" type = string } +variable "zones" { + description = "Availability zones" + type = list(number) + default = [1, 2, 3] +} + variable "tags" { description = "Common resource tags." type = map(string) @@ -14,11 +22,7 @@ variable "resource_group_name" { type = string } -variable "zones" { - description = "Availability zones" - type = list(number) - default = [1, 2, 3] -} +# Load balancer specific configurations variable "backend_port" { description = "Backend port for the load balancer rules" diff --git a/modules/vm/variables.tf b/modules/vm/variables.tf index ddabc54..623a2d5 100644 --- a/modules/vm/variables.tf +++ b/modules/vm/variables.tf @@ -5,6 +5,12 @@ variable "resource_name_prefix" { type = string } +variable "zones" { + description = "Availability zones" + type = list(number) + default = [1, 2, 3] +} + variable "tags" { description = "Common resource tags." type = map(string) @@ -16,7 +22,7 @@ variable "resource_group_name" { type = string } -# +# Networking variable "network_interface_name" { description = "Network interface where GraphDB will be deployed" @@ -28,6 +34,32 @@ variable "graphdb_subnet_name" { type = string } +# Security + +variable "identity_name" { + description = "Name of a user assigned identity with permissions" + type = string +} + +variable "key_vault_name" { + description = "Name of a Key Vault containing GraphDB configurations" + type = string +} + +# Load balancer + +variable "load_balancer_backend_address_pool_id" { + description = "Identifier of the load balancer backend pool for GraphDB nodes" + type = string +} + +variable "load_balancer_fqdn" { + description = "FQDN of the load balancer for GraphDB" + type = string +} + +# GraphDB VM + variable "node_count" { description = "Number of GraphDB nodes to deploy in ASG" type = number @@ -56,32 +88,6 @@ variable "source_ssh_blocks" { default = null } -variable "zones" { - description = "Availability zones" - type = list(number) - default = [1, 3] -} - -variable "load_balancer_backend_address_pool_id" { - description = "Identifier of the load balancer backend pool for GraphDB nodes" - type = string -} - -variable "load_balancer_fqdn" { - description = "FQDN of the load balancer for GraphDB" - type = string -} - -variable "identity_name" { - description = "Name of a user assigned identity with permissions" - type = string -} - -variable "key_vault_name" { - description = "Name of a Key Vault containing GraphDB configurations" - type = string -} - variable "custom_user_data" { description = "Custom user data script used during the cloud init phase in the GraphDB VMs. Should be in base64 encoding." type = string diff --git a/variables.tf b/variables.tf index 22f84c3..0cf6270 100644 --- a/variables.tf +++ b/variables.tf @@ -10,6 +10,12 @@ variable "location" { type = string } +variable "zones" { + description = "Availability zones to use for resource deployment and HA" + type = list(number) + default = [1, 2, 3] +} + variable "tags" { description = "Common resource tags." type = map(string)