From b300ee7bf0c5cded05d34388f6c8d23883c04efb Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 13 Dec 2023 16:55:40 +0100 Subject: [PATCH] timescaledb: the affinity policy is now a variable. --- openstack-tf/modules/timescaledb/timescaledb.tf | 2 +- openstack-tf/modules/timescaledb/variables-timescaledb.tf | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/openstack-tf/modules/timescaledb/timescaledb.tf b/openstack-tf/modules/timescaledb/timescaledb.tf index bf10dc0..9a7b0bd 100644 --- a/openstack-tf/modules/timescaledb/timescaledb.tf +++ b/openstack-tf/modules/timescaledb/timescaledb.tf @@ -49,7 +49,7 @@ resource "openstack_networking_secgroup_rule_v2" "timescaledb_access_from_dedica resource "openstack_compute_servergroup_v2" "timescaledb_cluster" { name = "timescaledb_cluster" - policies = ["soft-anti-affinity"] + policies = [var.timescaledb_affinity_policy] } # Instances with an additional block device diff --git a/openstack-tf/modules/timescaledb/variables-timescaledb.tf b/openstack-tf/modules/timescaledb/variables-timescaledb.tf index 9037c82..396070c 100644 --- a/openstack-tf/modules/timescaledb/variables-timescaledb.tf +++ b/openstack-tf/modules/timescaledb/variables-timescaledb.tf @@ -7,6 +7,10 @@ variable "timescaledb_server_data" { } } +variable "timescaledb_affinity_policy" { + default = "soft-anti-affinity" +} + variable "timescaledb_node_flavor" { default = "" }