Skip to content

Commit d8e2e6f

Browse files
authored
docs: fix the usage of logs agent module (#50)
1 parent 607c142 commit d8e2e6f

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

README.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Terraform IBM Logs agent module
32

43
[![Graduated (Supported)](https://img.shields.io/badge/Status-Graduated%20(Supported)-brightgreen)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
@@ -31,17 +30,15 @@ This module deploys the following logs agent to an IBM Cloud Red Hat OpenShift C
3130
# ############################################################################
3231
3332
data "ibm_container_cluster_config" "cluster_config" {
34-
# update this value with the Id of the cluster where the agent will be provisioned
35-
cluster_name_id = "cluster_id"
33+
cluster_name_id = "xxxxxxxxx" # replace with cluster ID or name
3634
}
3735
3836
# ############################################################################
3937
# Config providers
4038
# ############################################################################
4139
4240
provider "ibm" {
43-
# update this value with your IBM Cloud API key value
44-
ibmcloud_api_key = "api key value" # pragma: allowlist secret
41+
ibmcloud_api_key = "xxxxxxxxxxxx" # pragma: allowlist secret
4542
}
4643
4744
provider "helm" {
@@ -50,22 +47,32 @@ provider "helm" {
5047
token = data.ibm_container_cluster_config.cluster_config.token
5148
cluster_ca_certificate = data.ibm_container_cluster_config.cluster_config.ca_certificate
5249
}
50+
# IBM Cloud credentials are required to authenticate to the helm repo
51+
registry {
52+
url = "oci://icr.io/ibm/observe/logs-agent-helm"
53+
username = "iamapikey"
54+
password = "xxxxxxxxxxxx" # pragma: allowlist secret
55+
}
56+
}
57+
58+
provider "kubernetes" {
59+
host = data.ibm_container_cluster_config.cluster_config.host
60+
token = data.ibm_container_cluster_config.cluster_config.token
61+
cluster_ca_certificate = data.ibm_container_cluster_config.cluster_config.ca_certificate
5362
}
5463
5564
# ############################################################################
5665
# Install Logs Agent
5766
# ############################################################################
5867
5968
module "logs_agent_module" {
60-
source = "terraform-ibm-modules/logs-agent/ibm"
61-
# update this with your cluster id where the agent will be installed
62-
cluster_id = "cluster id"
63-
# update this with the Id of your IBM Cloud resource group
64-
cluster_resource_group_id = "resource group id"
65-
# Logs Agent variables
66-
logs_agent_trusted_profile_id = "XXXXXXXX"
67-
cloud_logs_ingress_endpoint = "<cloud-logs-instance-guid>.ingress.us-south.logs.cloud.ibm.com"
68-
cloud_logs_ingress_port = 443
69+
source = "terraform-ibm-modules/logs-agent/ibm"
70+
version = "X.Y.Z" # replace with actual version of module to consume
71+
cluster_id = "xxxxxxx" # replace with ID of the cluster
72+
cluster_resource_group_id = "xxxxxxx" # replace with ID of the cluster resource group
73+
logs_agent_trusted_profile_id = "XXXXXXXX" # replace with ID of the trusted profile to use for authentication
74+
cloud_logs_ingress_endpoint = "<cloud-logs-instance-guid>.ingress.us-south.logs.cloud.ibm.com"
75+
cloud_logs_ingress_port = 443
6976
}
7077
```
7178

0 commit comments

Comments
 (0)