Skip to content

Instantly share code, notes, and snippets.

@MohitTilwani15
Created May 9, 2019 16:43
Show Gist options
  • Save MohitTilwani15/5078a41b4115c0342234306ff2cea7eb to your computer and use it in GitHub Desktop.
Save MohitTilwani15/5078a41b4115c0342234306ff2cea7eb to your computer and use it in GitHub Desktop.
provider "heroku" {
version = "~> 1.9"
}
variable "example_app_name" {
description = "Name of the Heroku app provisioned as an example"
}
resource "heroku_app" "example" {
name = "${var.example_app_name}"
region = "us"
}
# Build code & release to the app
resource "heroku_build" "example" {
app = "${heroku_app.example.name}"
source = {
url = "https://github.com/MohitTilwani15/voting-system/tarball/master"
}
}
output "example_app_url" {
value = "https://${heroku_app.example.name}.herokuapp.com"
}
@MohitTilwani15
Copy link
Author

A simple terraform configuration for deploying app to Heroku with local backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment