Skip to content

Commit bb8cafa

Browse files
authored
Merge pull request #8204 from Prajyot-Parab/main
IBMCLOUD: add tags to powervs workspaces
2 parents 409fe94 + 3977d20 commit bb8cafa

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

infra/ibmcloud/terraform/k8s-power-conformance/modules/pvs_workspace/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ variable "datacenter" {}
1818
variable "pi_workspace_name" {}
1919
variable "resource_group_id" {}
2020
variable "image_name" {}
21+
variable "tags" { default = [] }

infra/ibmcloud/terraform/k8s-power-conformance/modules/pvs_workspace/workspace.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ resource "ibm_pi_workspace" "powervs_service_instance" {
1818
pi_name = var.pi_workspace_name
1919
pi_datacenter = var.datacenter
2020
pi_resource_group_id = var.resource_group_id
21+
pi_user_tags = var.tags
2122
}
2223

2324
data "ibm_pi_catalog_images" "catalog_images" {
@@ -30,6 +31,11 @@ locals {
3031

3132
# Copy image from catalog if not in the project and present in catalog
3233
resource "ibm_pi_image" "image" {
34+
lifecycle {
35+
ignore_changes = [
36+
pi_image_id
37+
]
38+
}
3339
pi_image_id = local.catalog_image[0].image_id
3440
pi_cloud_instance_id = ibm_pi_workspace.powervs_service_instance.id
3541
}

0 commit comments

Comments
 (0)