Open ryaninvents opened 6 years ago
Add a second Terraform module that would allow for a second application to be started via a reference to the remote state.
Usage might look something like this:
data "terraform_remote_state" "dev" { backend = "s3" config { bucket = "myterraformstate.example.com" region = "us-east-1" key = "applications/app-name/deployments/dev/terraform.tfstate" } } module "second_app" { source = "github.com/r24y/terraform-node-pm2/config/application" ssh_key = "${data.terraform_remote_state.dev.ssh_key}" host = "${data.terraform_remote_state.dev.instance_ip}" app { name = "my-second-app" source_tarball = "${file("${path.cwd}/dist/app.tgz")}" config = { env = { NODE_ENV = "development" PORT = 3001 } } } }
Todo:
config/terraform
config/infrastructure
ecosystem.config.json
config/application
Add a second Terraform module that would allow for a second application to be started via a reference to the remote state.
Usage might look something like this:
Todo:
config/terraform
toconfig/infrastructure
ecosystem.config.json
config/application
moduleconfig/infrastructure
module