Skip to content

Commit a960839

Browse files
committed
Add variable for cloudscale.ch LBaaS flavor
1 parent 971b044 commit a960839

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

lb.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module "lb_api" {
2626

2727
role = "api"
2828
cluster_id = var.cluster_id
29+
lb_flavor = var.lbaas_flavor
2930
region = var.region
3031
protocol = "tcp"
3132
subnet_uuid = local.subnet_uuid
@@ -57,6 +58,7 @@ module "lb_api_int" {
5758

5859
role = "api-int"
5960
cluster_id = var.cluster_id
61+
lb_flavor = var.lbaas_flavor
6062
region = var.region
6163
protocol = "tcp"
6264
subnet_uuid = local.subnet_uuid
@@ -81,6 +83,7 @@ module "lb_ingress" {
8183

8284
role = "ingress"
8385
cluster_id = var.cluster_id
86+
lb_flavor = var.lbaas_flavor
8487
region = var.region
8588
protocol = var.lb_enable_proxy_protocol ? "proxyv2" : "tcp"
8689
subnet_uuid = local.subnet_uuid

modules/cloudscale-lb/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ locals {
88
}
99
resource "cloudscale_load_balancer" "lb" {
1010
name = "${var.cluster_id}_${var.role}"
11-
flavor_slug = "lb-standard"
11+
flavor_slug = var.lb_flavor
1212
zone_slug = "${var.region}1"
1313

1414
dynamic "vip_addresses" {

modules/cloudscale-lb/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ variable "cluster_id" {
22
type = string
33
}
44

5+
variable "lb_flavor" {
6+
type = string
7+
default = "lb-standard"
8+
}
9+
510
variable "role" {
611
type = string
712
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ variable "lb_flavor" {
6363
description = "Compute flavor to use for loadbalancers"
6464
}
6565

66+
variable "lbaas_flavor" {
67+
type = string
68+
default = "lb-standard"
69+
description = "Flavor to use for cloudscale.ch LBaaS instances"
70+
}
71+
6672
variable "master_count" {
6773
type = number
6874
default = 3

0 commit comments

Comments
 (0)