Skip to content

Commit b5fee87

Browse files
test: set members for pitr test (#201)
1 parent 5aa411b commit b5fee87

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

examples/pitr/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module "postgresql_db_pitr" {
2424
member_memory_mb = 3072
2525
member_disk_mb = 15360
2626
member_cpu_count = 9
27+
members = var.members
2728
pg_version = var.pg_version
2829
pitr_id = var.pitr_id
2930
pitr_time = data.ibm_database_point_in_time_recovery.database_pitr.earliest_point_in_time_recovery_time

examples/pitr/variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,10 @@ variable "pitr_id" {
4444
type = string
4545
description = "The ID of the source deployment PostgreSQL instance that you want to recover back to. The PostgreSQL instance is expected to be in an up and in running state."
4646
}
47+
48+
variable "members" {
49+
type = number
50+
description = "Allocated number of members. Members must be same or higher than the source deployment PostgreSQL instance."
51+
default = 2
52+
# Validation is done in the Terraform plan phase by the IBM provider, so no need to add extra validation here.
53+
}

tests/other_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ func TestRunPointInTimeRecoveryDBExample(t *testing.T) {
3939
TerraformVars: map[string]interface{}{
4040
"pitr_id": permanentResources["postgresqlPITRCrn"],
4141
"pg_version": permanentResources["postgresqlPITRVersion"],
42+
"members": "3", // Lock members to 3 as the permanent postgres instances has 3 members
4243
},
4344
})
4445

0 commit comments

Comments
 (0)