Skip to content

Commit c61c295

Browse files
committed
Fix for bastion storage
Signed-off-by: Yussuf Shaikh <yussuf.shaikh1@ibm.com>
1 parent 024eff1 commit c61c295

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/1_prepare/prepare.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ locals {
4848
)
4949
)
5050
# Use project image pool; If it is a catalog image OR project image pool is "" then let use default (null)
51-
project_bastion_image_pool = !local.invalid_bastion_image && length(local.project_bastion_image) != 0 ? local.project_bastion_image[0].storage_pool : ""
52-
bastion_storage_pool = local.project_bastion_image_pool == "" ? null : local.project_bastion_image_pool
51+
bastion_storage_pool = !local.invalid_bastion_image && length(local.project_bastion_image) != 0 ? local.project_bastion_image[0].storage_pool : null
52+
bastion_storage_type = !local.invalid_bastion_image && length(local.project_bastion_image) != 0 ? local.project_bastion_image[0].storage_type : null
5353
}
5454

5555
# Copy image from catalog if not in the project and present in catalog
@@ -84,6 +84,7 @@ resource "ibm_pi_volume" "volume" {
8484
pi_volume_size = var.volume_size
8585
pi_volume_name = "${var.name_prefix}${var.storage_type}-volume"
8686
pi_volume_pool = local.bastion_storage_pool
87+
pi_volume_type = local.bastion_storage_type
8788
pi_volume_shareable = var.volume_shareable
8889
pi_cloud_instance_id = var.service_instance_id
8990
}
@@ -102,6 +103,7 @@ resource "ibm_pi_instance" "bastion" {
102103
pi_health_status = var.bastion_health_status
103104
pi_volume_ids = var.storage_type == "nfs" ? ibm_pi_volume.volume.*.volume_id : null
104105
pi_storage_pool = local.bastion_storage_pool
106+
pi_storage_type = local.bastion_storage_type
105107

106108
pi_network {
107109
network_id = ibm_pi_network.public_network.network_id

0 commit comments

Comments
 (0)