-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
40 lines (35 loc) · 1.14 KB
/
main.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
34
35
36
37
38
39
40
terraform {
backend "remote" {
organization = "infrastructure-pipelines-workshop"
workspaces {
name = "lin-z-consul"
}
}
}
data "terraform_remote_state" "cluster" {
backend = "remote"
config = {
organization = var.organization
workspaces = {
name = var.cluster_workspace
}
}
}
provider "kubernetes" {
version = "~> 1.11"
load_config_file = false
host = data.terraform_remote_state.cluster.outputs.host
username = data.terraform_remote_state.cluster.outputs.username
password = data.terraform_remote_state.cluster.outputs.password
cluster_ca_certificate = data.terraform_remote_state.cluster.outputs.cluster_ca_certificate
}
provider "helm" {
version = "~> 1.0"
kubernetes {
load_config_file = false
host = data.terraform_remote_state.cluster.outputs.host
username = data.terraform_remote_state.cluster.outputs.username
password = data.terraform_remote_state.cluster.outputs.password
cluster_ca_certificate = data.terraform_remote_state.cluster.outputs.cluster_ca_certificate
}
}