-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterragrunt.hcl
45 lines (39 loc) · 940 Bytes
/
terragrunt.hcl
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
34
35
36
37
38
39
40
41
42
43
44
45
locals {
environment_vars = jsondecode(file("${path_relative_to_include()}/params.json"))
stage = local.environment_vars.environment
}
# Generate an k8s provider block. You can run `minikube ip` to get the local ip address.
# And run `minikube config view` to get the certificates and key
generate "provider" {
path = "provider.tf"
if_exists = "overwrite_terragrunt"
contents = <<EOF
terraform {
required_providers {
kubernetes = {
source = "hashicorp/kubernetes"
version = "2.21.1"
}
helm = {
source = "hashicorp/helm"
version = "2.9.0"
}
}
}
provider "kubernetes" {
config_path = "~/.kube/config"
}
provider "helm" {
kubernetes {
config_path = "~/.kube/config"
}
}
EOF
}
terraform {
source = "../../terraform//"
}
inputs = merge (
local.environment_vars,
local
)