Fixed the formatting.

This commit is contained in:
Andrea Dell'Amico 2023-12-13 17:17:42 +01:00
parent b300ee7bf0
commit fe5fcfeb37
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
3 changed files with 15 additions and 15 deletions

View File

@ -1,6 +1,6 @@
# Define required providers
terraform {
required_version = ">= 0.14.0"
required_version = ">= 0.14.0"
required_providers {
openstack = {
source = "terraform-provider-openstack/openstack"

View File

@ -55,9 +55,9 @@ resource "openstack_compute_servergroup_v2" "timescaledb_cluster" {
# Instances with an additional block device
resource "openstack_compute_instance_v2" "timescaledb_server" {
count = var.timescaledb_nodes_count
name = format("%s-%02d", var.timescaledb_server_data.node_name, count.index+1)
name = format("%s-%02d", var.timescaledb_server_data.node_name, count.index + 1)
availability_zone_hints = module.common_variables.availability_zones_names.availability_zone_no_gpu
image_name = module.common_variables.ubuntu_2204.name
image_name = module.common_variables.ubuntu_2204.name
flavor_name = var.timescaledb_node_flavor
key_pair = module.ssh_settings.ssh_key_name
security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, openstack_networking_secgroup_v2.timescaledb_access.name]

View File

@ -1,8 +1,8 @@
variable "timescaledb_server_data" {
type = map(string)
default = {
node_name = "timescaledb"
node_data_disk_size = 20
node_name = "timescaledb"
node_data_disk_size = 20
node_data_disk_device = "/dev/vdb"
}
}
@ -20,22 +20,22 @@ variable "timescaledb_nodes_count" {
}
variable "timescaledb_ip" {
type = list(string)
type = list(string)
default = []
}
}
variable "timescaledb_cidr" {
type = list(string)
default = [ ]
type = list(string)
default = []
}
variable "timescaledb_net" {
type = map(string)
default = {
network_name = "timescaledb-net"
network_description = "Network used by the Timescaledb cluster and to access the service"
network_cidr = "192.168.11.0/24"
allocation_pool_start = "192.168.11.20"
allocation_pool_end = "192.168.11.254"
}
network_name = "timescaledb-net"
network_description = "Network used by the Timescaledb cluster and to access the service"
network_cidr = "192.168.11.0/24"
allocation_pool_start = "192.168.11.20"
allocation_pool_end = "192.168.11.254"
}
}