-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
46 lines (41 loc) · 1.09 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
terraform {
required_providers {
kubernetes = {
source = "hashicorp/kubernetes"
version = "2.11.0"
}
}
}
provider "kubernetes" {
config_path = "~/.kube/config"
config_context = "minikube"
}
module "apache" {
source = "./modules/apache"
namespace = "default"
app_name = "php-webserver"
replicas = 1
image = "192.168.49.2:5000/php-webserver:latest"
depends_on = [module.mysql]
}
module "phpmyadmin" {
source = "./modules/phpmyadmin"
namespace = "default"
app_name = "phpmyadmin"
replicas = 1
image = "phpmyadmin/phpmyadmin:latest"
pma_host = "mysql-service"
mysql_root_password = "example_password"
}
module "mysql" {
source = "./modules/mysql"
namespace = "default"
app_name = "mysql"
replicas = 1
image = "mysql:latest"
mysql_root_password = "example_password"
mysql_database = "my_database"
mysql_user = "my_user"
mysql_password = "my_password"
persistent_volume_claim = "mysql-pv-claim"
}