Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@
}
],
"hidden": true
},
{
"key": "IC_SCHEMATICS_WORKSPACE_ID",
"hidden": true
}
],
"terraform_version": "1.10.5"
Expand Down
8 changes: 8 additions & 0 deletions solutions/fully-configurable/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@ module "logs_agent" {
log_filters = var.log_filters
max_unavailable = var.max_unavailable
}

# Attach user tags to the cluster with details of the cloud logs and workspace
resource "ibm_resource_tag" "user_tags" {
count = var.IC_SCHEMATICS_WORKSPACE_ID != "" ? 1 : 0
resource_id = local.is_vpc_cluster ? data.ibm_container_vpc_cluster.cluster[0].crn : data.ibm_container_cluster.cluster[0].crn
tags = ["logging-instance:${coalescelist(split(".", var.cloud_logs_ingress_endpoint))[0]}", "logging-workspace:${var.IC_SCHEMATICS_WORKSPACE_ID}"]
tag_type = "user"
}
11 changes: 11 additions & 0 deletions solutions/fully-configurable/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,14 @@ variable "provider_visibility" {
error_message = "Invalid visibility option. Allowed values are 'public', 'private', or 'public-and-private'."
}
}

##############################################################################
# Schematics
##############################################################################

# tflint-ignore: terraform_naming_convention
variable "IC_SCHEMATICS_WORKSPACE_ID" {
default = ""
type = string
description = "leave blank if running locally. This variable will be automatically populated if running from an IBM Cloud Schematics workspace."
}