Skip to content
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Migration:
to = module.logs_agent[0].helm_release.logs_agent
}
```
- However since the helm chart being used in the new [terraform-ibm-monitoring-agent](https://github.com/terraform-ibm-modules/terraform-ibm-monitoring-agent) module is completly different to the helm chart used in this module, there is no way to do an update-in-place. Upgrading to this version will destroy the old helm release and create a new one so please plan accordingly before upgrading.
- However since the helm chart being used in the new [terraform-ibm-monitoring-agent](https://github.com/terraform-ibm-modules/terraform-ibm-monitoring-agent) module is completely different to the helm chart used in this module, there is no way to do an update-in-place. Upgrading to this version will destroy the old helm release and create a new one so please plan accordingly before upgrading.
---

[![Graduated (Supported)](https://img.shields.io/badge/Status-Graduated%20(Supported)-brightgreen)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
Expand Down
12 changes: 7 additions & 5 deletions examples/obs-agent-ocp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,21 @@ locals {

module "trusted_profile" {
source = "terraform-ibm-modules/trusted-profile/ibm"
version = "2.3.1"
version = "3.1.1"
trusted_profile_name = "${var.prefix}-profile"
trusted_profile_description = "Logs agent Trusted Profile"
# As a `Sender`, you can send logs to your IBM Cloud Logs service instance - but not query or tail logs. This role is meant to be used by agents and routers sending logs.
trusted_profile_policies = [{
roles = ["Sender"]
roles = ["Sender"]
unique_identifier = "${var.prefix}-profile-0"
resources = [{
service = "logs"
}]
}]
# Set up fine-grained authorization for `logs-agent` running in ROKS cluster in `ibm-observe` namespace.
trusted_profile_links = [{
cr_type = "ROKS_SA"
cr_type = "ROKS_SA"
unique_identifier = "${var.prefix}-profile-0"
links = [{
crn = module.ocp_base.cluster_crn
namespace = local.logs_agent_namespace
Expand Down Expand Up @@ -104,7 +106,7 @@ locals {

module "ocp_base" {
source = "terraform-ibm-modules/base-ocp-vpc/ibm"
version = "3.54.5"
version = "3.56.1"
resource_group_id = module.resource_group.resource_group_id
region = var.region
tags = var.resource_tags
Expand Down Expand Up @@ -147,7 +149,7 @@ data "ibm_is_security_groups" "vpc_security_groups" {
# The below code creates a VPE for Cloud logs in the provisioned VPC which allows the agents to access the private Cloud Logs Ingress endpoint.
module "vpe" {
source = "terraform-ibm-modules/vpe-gateway/ibm"
version = "4.7.1"
version = "4.7.7"
region = var.region
prefix = var.prefix
vpc_id = ibm_is_vpc.vpc.id
Expand Down
2 changes: 1 addition & 1 deletion examples/obs-agent-ocp/version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_version = ">= 1.9.0"

# Ensure that there is always 1 example locked into the lowest provider version of the range defined in the main
# module's version.tf (obs-agent-iks), and 1 example that will always use the latest provider version (this exammple).
# module's version.tf (obs-agent-iks), and 1 example that will always use the latest provider version (this example).
required_providers {
ibm = {
source = "ibm-cloud/ibm"
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ data "ibm_container_cluster_config" "cluster_config" {

locals {
# LOCALS
cluster_name = var.is_vpc_cluster ? data.ibm_container_vpc_cluster.cluster[0].resource_name : data.ibm_container_cluster.cluster[0].resource_name # Not publically documented in provider. See https://github.com/IBM-Cloud/terraform-provider-ibm/issues/4485
cluster_name = var.is_vpc_cluster ? data.ibm_container_vpc_cluster.cluster[0].resource_name : data.ibm_container_cluster.cluster[0].resource_name # Not publicly documented in provider. See https://github.com/IBM-Cloud/terraform-provider-ibm/issues/4485
cloud_monitoring_chart_location = "${path.module}/chart/sysdig-agent"
cloud_monitoring_image_tag_digest = "14.1.1@sha256:60287a9413c79a424aa033ab943957f4f0031eddf7b66d26e764253026bd3c78" # datasource: icr.io/ext/sysdig/agent
cloud_monitoring_image_tag_digest = "14.2.0@sha256:f590c8a7f3e04dc0f798266dd07b8ba25e1f0a120f4bbd3a30b4a77094520dfb" # datasource: icr.io/ext/sysdig/agent
cloud_monitoring_agent_registry = "icr.io/ext/sysdig/agent"
cloud_monitoring_agent_tags = var.cloud_monitoring_add_cluster_name ? concat(["ibm.containers-kubernetes.cluster.name:${local.cluster_name}"], var.cloud_monitoring_agent_tags) : var.cloud_monitoring_agent_tags
cloud_monitoring_host = var.cloud_monitoring_enabled ? var.cloud_monitoring_endpoint_type == "private" ? "ingest.private.${var.cloud_monitoring_instance_region}.monitoring.cloud.ibm.com" : "logs.${var.cloud_monitoring_instance_region}.monitoring.cloud.ibm.com" : null
Expand Down
4 changes: 2 additions & 2 deletions modules/logs-agent/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ data "ibm_container_cluster_config" "cluster_config" {

locals {
logs_agent_chart_location = "oci://icr.io/ibm/observe/logs-agent-helm"
logs_agent_version = "1.6.1" # datasource: icr.io/ibm/observe/logs-agent-helm
logs_agent_version = "1.6.2" # datasource: icr.io/ibm/observe/logs-agent-helm
logs_agent_selected_log_source_paths = distinct(concat([for namespace in var.logs_agent_log_source_namespaces : "/var/log/containers/*_${namespace}_*.log"], var.logs_agent_selected_log_source_paths))
logs_agent_iam_api_key = var.logs_agent_iam_api_key != null ? var.logs_agent_iam_api_key : ""
logs_agent_trusted_profile = var.logs_agent_trusted_profile != null ? var.logs_agent_trusted_profile : ""
Expand All @@ -34,7 +34,7 @@ locals {
for metadata in var.logs_agent_additional_metadata : {
(metadata.key) = metadata.value
}]...) : {} # DO NOT REMOVE "...", it is used to convert list of objects into a single object
cluster_name = var.is_vpc_cluster ? data.ibm_container_vpc_cluster.cluster[0].resource_name : data.ibm_container_cluster.cluster[0].resource_name # Not publically documented in provider. See https://github.com/IBM-Cloud/terraform-provider-ibm/issues/4485
cluster_name = var.is_vpc_cluster ? data.ibm_container_vpc_cluster.cluster[0].resource_name : data.ibm_container_cluster.cluster[0].resource_name # Not publicly documented in provider. See https://github.com/IBM-Cloud/terraform-provider-ibm/issues/4485
}

resource "helm_release" "logs_agent" {
Expand Down
28 changes: 14 additions & 14 deletions tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ module github.com/terraform-ibm-modules/terraform-ibm-observability-agents

go 1.24.0

toolchain go1.24.5
toolchain go1.25.1

require (
github.com/stretchr/testify v1.10.0
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.58.7
github.com/stretchr/testify v1.11.1
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.6
)

require (
Expand All @@ -15,7 +15,7 @@ require (
github.com/IBM-Cloud/power-go-client v1.12.0 // indirect
github.com/IBM/cloud-databases-go-sdk v0.8.0 // indirect
github.com/IBM/go-sdk-core/v5 v5.21.0 // indirect
github.com/IBM/platform-services-go-sdk v0.85.1 // indirect
github.com/IBM/platform-services-go-sdk v0.86.1 // indirect
github.com/IBM/project-go-sdk v0.3.6 // indirect
github.com/IBM/schematics-go-sdk v0.4.0 // indirect
github.com/IBM/vpc-go-sdk v1.0.2 // indirect
Expand All @@ -37,7 +37,7 @@ require (
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.23.0 // indirect
github.com/go-openapi/errors v0.22.1 // indirect
github.com/go-openapi/errors v0.22.2 // indirect
github.com/go-openapi/jsonpointer v0.21.1 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/loads v0.22.0 // indirect
Expand All @@ -61,7 +61,7 @@ require (
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hcl/v2 v2.22.0 // indirect
github.com/hashicorp/terraform-json v0.25.0 // indirect
github.com/hashicorp/terraform-json v0.26.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jinzhu/copier v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand All @@ -84,19 +84,19 @@ require (
github.com/tmccombs/hcl2json v0.6.4 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/zclconf/go-cty v1.16.2 // indirect
github.com/zclconf/go-cty v1.16.3 // indirect
go.mongodb.org/mongo-driver v1.17.3 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
go.opentelemetry.io/otel/metric v1.35.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
golang.org/x/crypto v0.40.0 // indirect
golang.org/x/mod v0.25.0 // indirect
golang.org/x/net v0.41.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/text v0.27.0 // indirect
golang.org/x/tools v0.34.0 // indirect
golang.org/x/crypto v0.41.0 // indirect
golang.org/x/mod v0.26.0 // indirect
golang.org/x/net v0.42.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/text v0.28.0 // indirect
golang.org/x/tools v0.35.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading