mirror of
https://github.com/storytold/terraform-aws-observability-accelerator.git
synced 2026-10-09 00:09:43 +00:00
32 lines
1.3 KiB
Terraform
32 lines
1.3 KiB
Terraform
data "aws_partition" "current" {}
|
|
|
|
data "aws_caller_identity" "current" {}
|
|
|
|
data "aws_region" "current" {}
|
|
|
|
data "aws_eks_cluster" "eks_cluster" {
|
|
name = var.eks_cluster_id
|
|
}
|
|
|
|
locals {
|
|
eks_oidc_issuer_url = replace(data.aws_eks_cluster.eks_cluster.identity[0].oidc[0].issuer, "https://", "")
|
|
eks_cluster_endpoint = data.aws_eks_cluster.eks_cluster.endpoint
|
|
eks_cluster_version = data.aws_eks_cluster.eks_cluster.version
|
|
|
|
context = {
|
|
aws_caller_identity_account_id = data.aws_caller_identity.current.account_id
|
|
aws_caller_identity_arn = data.aws_caller_identity.current.arn
|
|
aws_eks_cluster_endpoint = local.eks_cluster_endpoint
|
|
aws_partition_id = data.aws_partition.current.partition
|
|
aws_region_name = data.aws_region.current.name
|
|
eks_cluster_id = var.eks_cluster_id
|
|
eks_oidc_issuer_url = local.eks_oidc_issuer_url
|
|
eks_oidc_provider_arn = "arn:${data.aws_partition.current.partition}:iam::${data.aws_caller_identity.current.account_id}:oidc-provider/${local.eks_oidc_issuer_url}"
|
|
tags = var.tags
|
|
irsa_iam_role_path = var.irsa_iam_role_path
|
|
irsa_iam_permissions_boundary = var.irsa_iam_permissions_boundary
|
|
}
|
|
|
|
name = "aws-observability-accelerator"
|
|
}
|