File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ resource "cloudfoundry_service_instance" "postgres" {
11
11
space = var. cf_space_id
12
12
// noinspection HILUnresolvedReference
13
13
service_plan = data. cloudfoundry_service . rds . service_plans [var . plan ]
14
- replace_on_service_plan_change = true
14
+ replace_on_service_plan_change = var. replace_on_service_plan_change
15
+
16
+ json_params = jsonencode ({
17
+ " MaxAllocatedStorage" : var.max_allocated_storage
18
+ })
15
19
}
16
20
17
21
resource "cloudfoundry_service_key" "database_key" {
@@ -43,7 +47,7 @@ resource "cloudfoundry_app" "exporter" {
43
47
}
44
48
annotations = {
45
49
" prometheus.exporter.type" = " pg_exporter"
46
- " prometheus.exporter.port" = " 9187 "
50
+ " prometheus.exporter.port" = " 3100 "
47
51
" prometheus.exporter.path" = " /metrics"
48
52
}
49
53
}
Original file line number Diff line number Diff line change @@ -50,3 +50,15 @@ variable "exporter_environment" {
50
50
description = " Additional configuration for the exporter"
51
51
default = {}
52
52
}
53
+
54
+ variable "replace_on_service_plan_change" {
55
+ type = bool
56
+ description = " Replaces the instance in case of service plan change. Does not preserve data!"
57
+ default = false
58
+ }
59
+
60
+ variable "max_allocated_storage" {
61
+ type = number
62
+ description = " Sets the maximum storage size (in GB). Enables autoscaling"
63
+ default = 100
64
+ }
You can’t perform that action at this time.
0 commit comments