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" } ] } ) }