Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add workaround for groups #464

Merged
merged 4 commits into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ resource "ibm_database" "redis_database" {
## This is used to conditionally add one, OR, the other group block depending on var.local.host_flavor_set
## This block is for if host_flavor IS set to specific pre-defined host sizes and not set to "multitenant"
dynamic "group" {
for_each = local.host_flavor_set && var.member_host_flavor != "multitenant" ? [1] : []
for_each = local.host_flavor_set && var.member_host_flavor != "multitenant" && var.backup_crn == null ? [1] : []
content {
group_id = "member" # Only member type is allowed for IBM Cloud Databases
host_flavor {
Expand All @@ -109,7 +109,7 @@ resource "ibm_database" "redis_database" {

## This block is for if host_flavor IS set to "multitenant"
dynamic "group" {
for_each = local.host_flavor_set && var.member_host_flavor == "multitenant" ? [1] : []
for_each = local.host_flavor_set && var.member_host_flavor == "multitenant" && var.backup_crn == null ? [1] : []
content {
group_id = "member" # Only member type is allowed for IBM Cloud Databases
host_flavor {
Expand All @@ -132,7 +132,7 @@ resource "ibm_database" "redis_database" {

## This block is for if host_flavor IS NOT set
dynamic "group" {
for_each = local.host_flavor_set ? [] : [1]
for_each = !local.host_flavor_set && var.backup_crn == null ? [1] : []
content {
group_id = "member" # Only member type is allowed for IBM Cloud Databases
memory {
Expand Down Expand Up @@ -189,6 +189,8 @@ resource "ibm_database" "redis_database" {

timeouts {
create = "120m" # Extending provisioning time to 120 minutes
update = "120m"
delete = "15m"
}
}

Expand Down