jdormit-infra/prod/nginx/packer/terraform/main.tf

32 lines
1001 B
Terraform
Raw Normal View History

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"
}
2021-10-04 21:30:46 +00:00
],
"gitea_ip" : "${data.terraform_remote_state.gitea.outputs.gitea_ip_address}"
}
)
}