Files
terraform-aws-observability…/modules/workloads/nginx/locals.tf
T
Kevin Lewin 9f0b90ab2f Nginx module source (#35)
* working module

* metrics work

* Add dynamic targets

* dashboards and rules

* readme and outputs

* updating readme

* Update scrape config

- Drop unused go metrics
- Drop empty labels
- Add host, container and namespace labels

* Update tags and query labels

Co-authored-by: EC2 Default User <ec2-user@ip-172-31-9-72.us-west-2.compute.internal>
Co-authored-by: Rodrigue Koffi <bonclay7@users.noreply.github.com>
2022-09-27 16:00:55 +02:00

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 {
name = "adot-collector-nginx"
namespace = try(var.config.helm_config.namespace, local.name)
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
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
}
}