forked from atlassian-labs/data-center-terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
providers.tf
33 lines (30 loc) · 1.16 KB
/
providers.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
locals {
cluster_name = format("atlas-%s-cluster", var.environment_name)
}
provider "aws" {
region = var.region
// This will allow an AWS provider to add the resource tags to every AWS resources except ASG resources (See https://learn.hashicorp.com/tutorials/terraform/aws-default-tags?in=terraform/aws)
default_tags {
tags = var.resource_tags
}
}
provider "kubernetes" {
host = module.base-infrastructure.eks.kubernetes_provider_config.host
cluster_ca_certificate = module.base-infrastructure.eks.kubernetes_provider_config.cluster_ca_certificate
exec {
api_version = "client.authentication.k8s.io/v1alpha1"
args = ["eks", "get-token", "--cluster-name", local.cluster_name]
command = "aws"
}
}
provider "helm" {
kubernetes {
host = module.base-infrastructure.eks.kubernetes_provider_config.host
cluster_ca_certificate = module.base-infrastructure.eks.kubernetes_provider_config.cluster_ca_certificate
exec {
api_version = "client.authentication.k8s.io/v1alpha1"
args = ["eks", "get-token", "--cluster-name", local.cluster_name]
command = "aws"
}
}
}