Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -92,7 +92,7 @@ You need the following permissions to run this module.
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.15.0, <3.0.0 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 3.0.0, <4.0.0 |
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.76.1, <2.0.0 |

### Modules
Expand Down
6 changes: 3 additions & 3 deletions examples/logs-agent-iks/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ provider "ibm" {
}

provider "helm" {
kubernetes {
kubernetes = {
host = data.ibm_container_cluster_config.cluster_config.host
token = data.ibm_container_cluster_config.cluster_config.token
cluster_ca_certificate = data.ibm_container_cluster_config.cluster_config.ca_certificate
}
# IBM Cloud credentials are required to authenticate to the helm repo
registry {
registries = [{
url = "oci://icr.io/ibm/observe/logs-agent-helm"
username = "iamapikey"
password = var.ibmcloud_api_key
}
}]
}

provider "kubernetes" {
Expand Down
2 changes: 1 addition & 1 deletion examples/logs-agent-iks/version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ terraform {
}
helm = {
source = "hashicorp/helm"
version = "2.15.0"
version = "3.0.2"
}
# The kubernetes provider is not actually required by the module itself, just this example, so OK to use ">=" here instead of locking into a version
kubernetes = {
Expand Down
6 changes: 3 additions & 3 deletions examples/logs-agent-ocp/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ provider "ibm" {
}

provider "helm" {
kubernetes {
kubernetes = {
host = data.ibm_container_cluster_config.cluster_config.host
token = data.ibm_container_cluster_config.cluster_config.token
cluster_ca_certificate = data.ibm_container_cluster_config.cluster_config.ca_certificate
}
# IBM Cloud credentials are required to authenticate to the helm repo
registry {
registries = [{
url = "oci://icr.io/ibm/observe/logs-agent-helm"
username = "iamapikey"
password = var.ibmcloud_api_key
}
}]
}

provider "kubernetes" {
Expand Down
2 changes: 1 addition & 1 deletion examples/logs-agent-ocp/version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ terraform {
}
helm = {
source = "hashicorp/helm"
version = ">= 2.15.0"
version = ">= 3.0.0, <4.0.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
131 changes: 67 additions & 64 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,73 +47,76 @@ resource "helm_release" "logs_agent" {
recreate_pods = true
force_update = true

set {
name = "metadata.name"
type = "string"
value = var.logs_agent_name
}
set {
name = "image.version"
type = "string"
value = var.logs_agent_image_version
}
set {
name = "env.ingestionHost"
type = "string"
value = local.cloud_logs_ingress_endpoint
}
set {
name = "env.ingestionPort"
value = var.cloud_logs_ingress_port
}
set_sensitive {
set = [
{
name = "metadata.name"
type = "string"
value = var.logs_agent_name
},
{
name = "image.version"
type = "string"
value = var.logs_agent_image_version
},
{
name = "env.ingestionHost"
type = "string"
value = local.cloud_logs_ingress_endpoint
},
{
name = "env.ingestionPort"
value = var.cloud_logs_ingress_port
},
{
name = "env.trustedProfileID"
type = "string"
value = local.logs_agent_trusted_profile_id
},
{
name = "env.iamMode"
type = "string"
value = var.logs_agent_iam_mode
},
{
name = "env.iamEnvironment"
type = "string"
value = var.logs_agent_iam_environment
},
{
name = "additionalLogSourcePaths"
type = "string"
value = join("\\,", var.logs_agent_additional_log_source_paths)
},
{
name = "excludeLogSourcePaths"
type = "string"
value = join("\\,", var.logs_agent_exclude_log_source_paths)
},
{
name = "selectedLogSourcePaths"
type = "string"
value = join("\\,", local.logs_agent_selected_log_source_paths)
},
{
name = "clusterName"
type = "string"
value = local.cluster_name
},
{
name = "scc.create"
value = var.logs_agent_enable_scc
},
{
name = "enableMultiline"
value = var.enable_multiline
}
]

set_sensitive = [{
name = "secret.iamAPIKey"
type = "string"
value = local.logs_agent_iam_api_key
}
set {
name = "env.trustedProfileID"
type = "string"
value = local.logs_agent_trusted_profile_id
}
set {
name = "env.iamMode"
type = "string"
value = var.logs_agent_iam_mode
}
set {
name = "env.iamEnvironment"
type = "string"
value = var.logs_agent_iam_environment
}
set {
name = "additionalLogSourcePaths"
type = "string"
value = join("\\,", var.logs_agent_additional_log_source_paths)
}
set {
name = "excludeLogSourcePaths"
type = "string"
value = join("\\,", var.logs_agent_exclude_log_source_paths)
}
set {
name = "selectedLogSourcePaths"
type = "string"
value = join("\\,", local.logs_agent_selected_log_source_paths)
}
set {
name = "clusterName"
type = "string"
value = local.cluster_name
}
set {
name = "scc.create"
value = var.logs_agent_enable_scc
}
set {
name = "enableMultiline"
value = var.enable_multiline
}
}]

# dummy value hack to force update https://github.com/hashicorp/terraform-provider-helm/issues/515#issuecomment-813088122
values = [
Expand Down
6 changes: 3 additions & 3 deletions solutions/fully-configurable/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ provider "kubernetes" {
}

provider "helm" {
kubernetes {
kubernetes = {
host = data.ibm_container_cluster_config.cluster_config.host
token = data.ibm_container_cluster_config.cluster_config.token
cluster_ca_certificate = data.ibm_container_cluster_config.cluster_config.ca_certificate
}
# IBM Cloud credentials are required to authenticate to the helm repo
registry {
registries = [{
url = "oci://icr.io/ibm/observe/logs-agent-helm"
username = "iamapikey"
password = var.ibmcloud_api_key
}
}]
}

# Retrieve information about an existing VPC cluster
Expand Down
2 changes: 1 addition & 1 deletion solutions/fully-configurable/version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ terraform {
}
helm = {
source = "hashicorp/helm"
version = "2.17.0"
version = "3.0.2"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ terraform {
}
helm = {
source = "hashicorp/helm"
version = ">= 2.15.0, <3.0.0"
version = ">= 3.0.0, <4.0.0"
}
}
}