forked from sjmiller609/terraform-aws-astronomer-enterprise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovider_workaround.tf
32 lines (28 loc) · 971 Bytes
/
provider_workaround.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
# this is a workaround to allow JIT
# initialization of these providers
# https://github.com/hashicorp/terraform/issues/2430
resource "local_file" "kubeconfig" {
depends_on = [module.aws]
content = module.aws.kubeconfig
filename = "${path.root}/kubeconfig-${var.deployment_id}"
}
resource "local_file" "astronomer_helm_values" {
content = var.astronomer_helm_values
filename = "${path.root}/${var.deployment_id}-config.yaml"
}
provider "kubernetes" {
host = module.aws.kube_endpoint
cluster_ca_certificate = module.aws.kube_ca_certificate
token = module.aws.kube_auth_token
load_config_file = false
version = "~> 1.9"
}
provider "helm" {
version = "~> 1.2"
kubernetes {
host = module.aws.kube_endpoint
cluster_ca_certificate = module.aws.kube_ca_certificate
token = module.aws.kube_auth_token
load_config_file = false
}
}