Skip to content

Commit 9d858ad

Browse files
authored
fix: revert back to supporting terraform >= 1.3.0 (#402)
1 parent d5eecf8 commit 9d858ad

File tree

8 files changed

+13
-27
lines changed

8 files changed

+13
-27
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ You need the following permissions to run this module.
121121

122122
| Name | Version |
123123
|------|---------|
124-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |
124+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
125125
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.15.0, <3.0.0 |
126126
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.69.2, <2.0.0 |
127127

examples/obs-agent-iks/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.9.0"
2+
required_version = ">= 1.3.0"
33

44
# Ensure that there is always 1 example locked into the lowest provider version of the range defined in the main
55
# module's version.tf (this example), and 1 example that will always use the latest provider version (obs-agent-ocp).

examples/obs-agent-ocp/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.9.0"
2+
required_version = ">= 1.3.0"
33

44
# Ensure that there is always 1 example locked into the lowest provider version of the range defined in the main
55
# module's version.tf (obs-agent-iks), and 1 example that will always use the latest provider version (this exammple).

main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ locals {
5151
cloud_monitoring_key_validate_msg = "Values for 'cloud_monitoring_access_key' and 'log_analysis_instance_region' variables must be passed when 'cloud_monitoring_enabled = true'"
5252
# tflint-ignore: terraform_unused_declarations
5353
cloud_monitoring_key_validate_check = regex("^${local.cloud_monitoring_key_validate_msg}$", (!local.cloud_monitoring_key_validate_condition ? local.cloud_monitoring_key_validate_msg : ""))
54+
# Logs Agent Validation
55+
# tflint-ignore: terraform_unused_declarations
56+
validate_iam_mode = var.logs_agent_enabled == true && (var.logs_agent_iam_mode == "IAMAPIKey" && (var.logs_agent_iam_api_key == null || var.logs_agent_iam_api_key == "")) ? tobool("When passing 'IAMAPIKey' value for 'logs_agent_iam_mode' you cannot set 'logs_agent_iam_api_key' as null or empty string.") : true
57+
# tflint-ignore: terraform_unused_declarations
58+
validate_trusted_profile_mode = var.logs_agent_enabled == true && (var.logs_agent_iam_mode == "TrustedProfile" && (var.logs_agent_trusted_profile == null || var.logs_agent_trusted_profile == "")) ? tobool(" When passing 'TrustedProfile' value for 'logs_agent_iam_mode' you cannot set 'logs_agent_trusted_profile' as null or empty string.") : true
59+
# tflint-ignore: terraform_unused_declarations
60+
validate_icl_ingress_endpoint = var.logs_agent_enabled == true && (var.cloud_logs_ingress_endpoint == null || var.cloud_logs_ingress_endpoint == "") ? tobool("When 'logs_agent_enabled' is enabled, you cannot set 'cloud_logs_ingress_endpoint' as null or empty string.") : true
5461
}
5562

5663
/** Log Analysis Configuration Start **/

modules/logs-agent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module "logs_agent_module" {
5959

6060
| Name | Version |
6161
|------|---------|
62-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |
62+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
6363
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.11.0, <3.0.0 |
6464
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.59.0, <2.0.0 |
6565

modules/logs-agent/variables.tf

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ variable "logs_agent_trusted_profile" {
5151
type = string
5252
description = "The IBM Cloud trusted profile ID. Used only when `logs_agent_iam_mode` is set to `TrustedProfile`. The trusted profile must have an IBM Cloud Logs `Sender` role."
5353
default = null
54-
55-
validation {
56-
condition = (
57-
var.logs_agent_iam_mode != "TrustedProfile" ||
58-
(var.logs_agent_trusted_profile != null && var.logs_agent_trusted_profile != "")
59-
)
60-
error_message = "When 'logs_agent_iam_mode' is set to 'TrustedProfile', 'logs_agent_trusted_profile' cannot be null or an empty string."
61-
}
6254
}
6355

6456

@@ -67,14 +59,6 @@ variable "logs_agent_iam_api_key" {
6759
description = "The IBM Cloud API key for the Logs agent to authenticate and communicate with the IBM Cloud Logs. It is required if `logs_agent_iam_mode` is set to `IAMAPIKey`."
6860
sensitive = true
6961
default = null
70-
71-
validation {
72-
condition = (
73-
var.logs_agent_iam_mode != "IAMAPIKey" ||
74-
(var.logs_agent_iam_api_key != null && var.logs_agent_iam_api_key != "")
75-
)
76-
error_message = "When 'logs_agent_iam_mode' is set to 'IAMAPIKey', 'logs_agent_iam_api_key' cannot be null or an empty string."
77-
}
7862
}
7963

8064
variable "logs_agent_tolerations" {
@@ -158,11 +142,6 @@ variable "cloud_logs_ingress_endpoint" {
158142
description = "The host for IBM Cloud Logs ingestion. Ensure you use the ingress endpoint. See https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-endpoints_ingress."
159143
type = string
160144
default = null
161-
162-
validation {
163-
condition = (var.cloud_logs_ingress_endpoint != null && var.cloud_logs_ingress_endpoint != "")
164-
error_message = "When 'logs_agent_enabled' is enabled, you cannot set 'cloud_logs_ingress_endpoint' as null or empty string."
165-
}
166145
}
167146

168147
variable "cloud_logs_ingress_port" {

modules/logs-agent/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.9.0"
2+
required_version = ">= 1.3.0"
33

44
# Each required provider's version should be a flexible range to future proof the module's usage with upcoming minor and patch versions.
55
required_providers {

version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.9.0"
2+
required_version = ">= 1.3.0"
33

44
# Each required provider's version should be a flexible range to future proof the module's usage with upcoming minor and patch versions.
55
required_providers {

0 commit comments

Comments
 (0)