-
Notifications
You must be signed in to change notification settings - Fork 28
/
providers.tf
68 lines (62 loc) · 3.47 KB
/
providers.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
# Configure the Microsoft Azure Provider
provider "azurerm" {
subscription_id = "dff2ec18-6a8e-405c-8e45-b7df7465acf0"
resource_provider_registrations = "none"
features {}
}
provider "azurerm" {
alias = "jenkins-sponsorship"
subscription_id = "1311c09f-aee0-4d6c-99a4-392c2b543204"
resource_provider_registrations = "none"
features {}
}
provider "kubernetes" {
alias = "privatek8s"
host = azurerm_kubernetes_cluster.privatek8s.kube_config.0.host
client_certificate = base64decode(azurerm_kubernetes_cluster.privatek8s.kube_config.0.client_certificate)
client_key = base64decode(azurerm_kubernetes_cluster.privatek8s.kube_config.0.client_key)
cluster_ca_certificate = base64decode(azurerm_kubernetes_cluster.privatek8s.kube_config.0.cluster_ca_certificate)
}
provider "kubernetes" {
alias = "publick8s"
host = data.azurerm_kubernetes_cluster.publick8s.kube_config.0.host
client_certificate = base64decode(data.azurerm_kubernetes_cluster.publick8s.kube_config.0.client_certificate)
client_key = base64decode(data.azurerm_kubernetes_cluster.publick8s.kube_config.0.client_key)
cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.publick8s.kube_config.0.cluster_ca_certificate)
}
provider "kubernetes" {
alias = "cijenkinsio_agents_1"
host = "https://${azurerm_kubernetes_cluster.cijenkinsio_agents_1.fqdn}:443" # Cannot use the kubeconfig host as it provides a private DNS name
client_certificate = base64decode(azurerm_kubernetes_cluster.cijenkinsio_agents_1.kube_config.0.client_certificate)
client_key = base64decode(azurerm_kubernetes_cluster.cijenkinsio_agents_1.kube_config.0.client_key)
cluster_ca_certificate = base64decode(azurerm_kubernetes_cluster.cijenkinsio_agents_1.kube_config.0.cluster_ca_certificate)
}
provider "kubernetes" {
alias = "infracijenkinsio_agents_1"
host = "https://${azurerm_kubernetes_cluster.infracijenkinsio_agents_1.fqdn}:443" # Cannot use the kubeconfig host as it provides a private DNS name
client_certificate = base64decode(azurerm_kubernetes_cluster.infracijenkinsio_agents_1.kube_config.0.client_certificate)
client_key = base64decode(azurerm_kubernetes_cluster.infracijenkinsio_agents_1.kube_config.0.client_key)
cluster_ca_certificate = base64decode(azurerm_kubernetes_cluster.infracijenkinsio_agents_1.kube_config.0.cluster_ca_certificate)
}
provider "postgresql" {
/**
Reaching this DB requires:
- VPN access (with proper routing)
- The following line added in your `/etc/hosts` as there are no public DNS: `10.253.0.4 public-db.postgres.database.azure.com`
**/
host = azurerm_postgresql_flexible_server.public_db.fqdn
username = local.public_db_pgsql_admin_login
password = random_password.public_db_pgsql_admin_password.result
superuser = false
}
provider "mysql" {
/**
Reaching this DB requires:
- VPN access (with proper routing)
- The following line added in your `/etc/hosts` as there are no public DNS: `10.253.1.4 public-db-mysql.mysql.database.azure.com`
**/
endpoint = "${azurerm_mysql_flexible_server.public_db_mysql.fqdn}:3306"
username = local.public_db_mysql_admin_login
password = random_password.public_db_mysql_admin_password.result
tls = true # Mandatory for Azure MySQL Flexible instances
}