-
Notifications
You must be signed in to change notification settings - Fork 0
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
4 changed files
with
72 additions
and
13 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
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,8 +1,18 @@ | ||
variable "metrics_storage" { | ||
description = "AWS S3 bucket configuration values for the bucket where the archived metrics will be stored." | ||
description = <<-EOT | ||
AWS S3 bucket configuration values for the bucket where the archived metrics will be stored. | ||
An IAM role is required to give the Thanos components read and write access to the S3 bucket. You can create this role yourself or let the module create it for you. If you want the module to create the role, you need to provide the OIDC issuer's URL for the EKS cluster. If you create the role yourself, you need to provide the ARN of the IAM role you created. | ||
EOT | ||
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) | ||
}) | ||
|
||
validation { | ||
condition = var.metrics_storage.create_role ? var.metrics_storage.cluster_oidc_issuer_url != null : var.metrics_storage.iam_role_arn != null | ||
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