2021-10-04 13:06:02 +00:00
|
|
|
resource "local_file" "nginx_config" {
|
|
|
|
filename = "${path.module}/../tmp/nginx.conf"
|
2021-10-04 13:28:06 +00:00
|
|
|
content = templatefile(
|
|
|
|
"${path.module}/templates/nginx.conf.template",
|
|
|
|
{
|
|
|
|
"servers" : [
|
|
|
|
{
|
|
|
|
"domain" : "git.jeremydormitzer.com",
|
|
|
|
"ip" : "${data.terraform_remote_state.gitea.outputs.gitea_ip_address}",
|
|
|
|
"port" : "3000"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"domain" : "wallabag.jeremydormitzer.com",
|
|
|
|
"ip" : "${data.terraform_remote_state.wallabag.outputs.ip_address}",
|
|
|
|
"port" : "80"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"domain" : "rss.jeremydormitzer.com",
|
|
|
|
"ip" : "${data.terraform_remote_state.freshrss.outputs.ip_address}",
|
|
|
|
"port" : "80"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"domain" : "syncthing.jeremydormitzer.com",
|
|
|
|
"ip" : "${data.terraform_remote_state.syncthing.outputs.ip_address}",
|
|
|
|
"port" : "8384"
|
|
|
|
}
|
2021-10-04 21:30:46 +00:00
|
|
|
],
|
|
|
|
"gitea_ip" : "${data.terraform_remote_state.gitea.outputs.gitea_ip_address}"
|
2021-10-04 13:28:06 +00:00
|
|
|
}
|
|
|
|
)
|
2021-10-04 13:06:02 +00:00
|
|
|
}
|