-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
51 lines (40 loc) · 933 Bytes
/
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
41
42
43
44
45
46
47
48
49
50
51
terraform {
required_providers {
kubernetes = {
source = "hashicorp/kubernetes"
}
}
}
provider "kubernetes" {
config_path = "~/.kube/config"
}
### Auth0 variables:
variable "auth0-subdomain" {
type = string
sensitive = true
}
variable "auth0-client-id" {
type = string
sensitive = true
}
variable "auth0-secret" {
type = string
sensitive = true
}
variable "cookie-secret" {
type = string
sensitive = true
}
module "shiny_app" {
source = "./modules/shiny-app"
for_each = var.deployments
name = each.key
tag = each.value.tag
access = each.value.access
auth0-subdomain = var.auth0-subdomain
auth0-client-id = var.auth0-client-id
auth0-secret = var.auth0-secret
cookie-secret = var.cookie-secret
# Hackishly set these to known-up-front values, rather than allowing k8s to pick
node_port = 31000 + index(keys(var.deployments), each.key)
}