This repository was archived by the owner on Jun 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -77,11 +77,14 @@ resource "ibm_database" "etcd_db" {
7777 }
7878 }
7979
80+ # Workaround for https://github.ibm.com/GoldenEye/issues/issues/11359
81+ # means that no `group` block is added when restoring from backup
82+
8083 # # This for_each block is NOT a loop to attach to multiple group blocks.
8184 # # This is used to conditionally add one, OR, the other group block depending on var.local.host_flavor_set
8285 # # This block is for if host_flavor IS set to specific pre-defined host sizes and not set to "multitenant"
8386 dynamic "group" {
84- for_each = local. host_flavor_set && var. member_host_flavor != " multitenant" ? [1 ] : []
87+ for_each = local. host_flavor_set && var. member_host_flavor != " multitenant" && var . backup_crn == null ? [1 ] : []
8588 content {
8689 group_id = " member" # Only member type is allowed for IBM Cloud Databases
8790 host_flavor {
@@ -98,7 +101,7 @@ resource "ibm_database" "etcd_db" {
98101
99102 # # This block is for if host_flavor IS set to "multitenant"
100103 dynamic "group" {
101- for_each = local. host_flavor_set && var. member_host_flavor == " multitenant" ? [1 ] : []
104+ for_each = local. host_flavor_set && var. member_host_flavor == " multitenant" && var . backup_crn == null ? [1 ] : []
102105 content {
103106 group_id = " member" # Only member type is allowed for IBM Cloud Databases
104107 host_flavor {
@@ -121,7 +124,7 @@ resource "ibm_database" "etcd_db" {
121124
122125 # # This block is for if host_flavor IS NOT set
123126 dynamic "group" {
124- for_each = local. host_flavor_set ? [] : [1 ]
127+ for_each = ! local. host_flavor_set && var . backup_crn == null ? [1 ] : []
125128 content {
126129 group_id = " member" # Only member type is allowed for IBM Cloud Databases
127130 memory {
You can’t perform that action at this time.
0 commit comments