-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eks)!: add option to create IAM role for the metrics storage
This commit solves ISDEVOPS-279 and ISDEVOPS-283 for the EKS variants.
- Loading branch information
Showing
3 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
variable "metrics_storage" { | ||
description = "AWS S3 bucket configuration values for the bucket where the archived metrics will be stored." | ||
type = object({ | ||
bucket_id = string | ||
region = string | ||
iam_role_arn = string | ||
bucket_id = string | ||
create_role = bool | ||
iam_role_arn = optional(string, null) | ||
cluster_oidc_issuer_url = optional(string, null) | ||
}) | ||
|
||
default = null | ||
|
||
validation { | ||
# We use the try() function to avoid errors here when we deactivate the metrics storage by setting the | ||
# `metrics_storage` variable to `null`. | ||
condition = try(var.metrics_storage.create_role ? var.metrics_storage.cluster_oidc_issuer_url != null : var.metrics_storage.iam_role_arn != null, true) | ||
error_message = "If you want to create a role, you need to provide the OIDC issuer's URL for the EKS cluster. Otherwise, you need to provide the ARN of the IAM role you created." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters