diff --git a/main.tf b/main.tf index cf7fb85..9415948 100644 --- a/main.tf +++ b/main.tf @@ -1,14 +1,6 @@ data "aws_caller_identity" "current" { } -data "aws_eks_cluster" "cluster" { - name = var.cluster_name -} - -data "aws_eks_cluster_auth" "cluster_auth" { - name = var.cluster_name -} - locals { account_id = data.aws_caller_identity.current.account_id tags = merge({ @@ -18,12 +10,7 @@ locals { "boc:created_by" = "terraform" }, var.additional_tags) - aws_eks_cluster_auth = data.aws_eks_cluster_auth.cluster_auth - aws_eks_cluster = data.aws_eks_cluster.cluster - oidc_url = data.aws_eks_cluster.cluster.identity[0].oidc[0].issuer - oidc_domain = replace(local.oidc_url, "https://", "") - oidc_arn = "arn:aws-us-gov:iam::${local.account_id}:oidc-provider/${local.oidc_domain}" - + oidc_arn = var.oidc_provider_arn } module "tempo-irsa-role" { diff --git a/variables.tf b/variables.tf index 0019f2e..0f7b0d1 100644 --- a/variables.tf +++ b/variables.tf @@ -50,6 +50,11 @@ variable "tempo_tag" { default = "2.5.0" } +variable "oidc_provider_arn" { + description = "The ARN in the EKS cluster for the OpenID Connect identity provider." + type = string +} + # Prometheus data for metrics generator variable "prometheus_svc" { description = "Prometheus service name."