Skip to content

Commit

Permalink
Fixed zone configurations in the VM module
Browse files Browse the repository at this point in the history
  • Loading branch information
mihailradkov committed Nov 9, 2023
1 parent 4c3c6dd commit 279f240
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 32 deletions.
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions modules/configuration/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# General configurations

variable "tags" {
description = "Common resource tags."
type = map(string)
Expand All @@ -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
Expand All @@ -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
Expand Down
14 changes: 9 additions & 5 deletions modules/load_balancer/variables.tf
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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"
Expand Down
60 changes: 33 additions & 27 deletions modules/vm/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -16,7 +22,7 @@ variable "resource_group_name" {
type = string
}

#
# Networking

variable "network_interface_name" {
description = "Network interface where GraphDB will be deployed"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 279f240

Please sign in to comment.