mirror of https://github.com/buster-so/buster.git
42 lines
1.0 KiB
Terraform
42 lines
1.0 KiB
Terraform
|
terraform {
|
||
|
required_providers {
|
||
|
aws = {
|
||
|
source = "hashicorp/aws"
|
||
|
version = "~> 4.0"
|
||
|
}
|
||
|
helm = {
|
||
|
source = "hashicorp/helm"
|
||
|
version = "~> 2.5"
|
||
|
}
|
||
|
kubernetes = {
|
||
|
source = "hashicorp/kubernetes"
|
||
|
version = "~> 2.10"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
provider "aws" {
|
||
|
region = var.region
|
||
|
}
|
||
|
|
||
|
provider "kubernetes" {
|
||
|
host = module.eks.cluster_endpoint
|
||
|
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
|
||
|
exec {
|
||
|
api_version = "client.authentication.k8s.io/v1beta1"
|
||
|
command = "aws"
|
||
|
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
provider "helm" {
|
||
|
kubernetes {
|
||
|
host = module.eks.cluster_endpoint
|
||
|
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
|
||
|
exec {
|
||
|
api_version = "client.authentication.k8s.io/v1beta1"
|
||
|
command = "aws"
|
||
|
args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
|
||
|
}
|
||
|
}
|
||
|
}
|