-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
94 lines (83 loc) · 2.11 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.77.0"
}
azuread = {
source = "hashicorp/azuread"
version = "~>2.44.1"
}
random = {
source = "hashicorp/random"
version = "~> 3.5.1"
}
helm = {
source = "hashicorp/helm"
version = "~> 2.10.1"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "~> 2.22.0"
}
acme = {
source = "vancluever/acme"
version = "~> 2.18.0"
}
tls = {
source = "hashicorp/tls"
version = "~> 4.0.4"
}
}
required_version = ">= 1.1.0"
backend "azurerm" {
# will get configured with -backend-config= in the terraform init -upgrade command
# the backend config file will be created using envsubst and provider_secrets_template file
# env vars are set in the github action
# env vars used in provider_secrets_template file are also used in the variable blocks below
# to configure the azurerm provider
}
}
provider "azurerm" {
features {
key_vault {
# purge_soft_delete_on_destroy = true
recover_soft_deleted_key_vaults = false
recover_soft_deleted_certificates = false
recover_soft_deleted_secrets = false
recover_soft_deleted_keys = false
}
template_deployment {
delete_nested_items_during_deletion = false
}
}
subscription_id = var.SUBSCRIPTION_ID
tenant_id = var.TENANT_ID
client_id = var.CLIENT_ID
client_secret = var.CLIENT_SECRET
}
provider "azuread" {
tenant_id = var.TENANT_ID
client_id = var.CLIENT_ID
client_secret = var.CLIENT_SECRET
}
provider "acme" {
server_url = "https://acme-v02.api.letsencrypt.org/directory"
# server_url = var.ENVIRONMENT == "prod" ? "https://acme-v02.api.letsencrypt.org/directory" : "https://acme-staging-v02.api.letsencrypt.org/directory"
}
provider "tls" {
}
provider "random" {
}
variable "SUBSCRIPTION_ID" {
type = string
}
variable "TENANT_ID" {
type = string
}
variable "CLIENT_ID" {
type = string
}
variable "CLIENT_SECRET" {
type = string
}