jdormit-infra/prod/nginx/packer/terraform/main.tf
2021-10-04 09:28:06 -04:00

31 lines
917 B
HCL

resource "local_file" "nginx_config" {
filename = "${path.module}/../tmp/nginx.conf"
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"
}
]
}
)
}