diff --git a/.gitignore b/.gitignore index aaf6826..fcff9a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .terraform/ +.terraform.lock.hcl terraform.tfstate* diff --git a/README.md b/README.md index 6e5886f..5dd5e75 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Terraforming 🌱 Heroku app =========================== -[Terraform](https://www.terraform.io/) [0.12](https://www.hashicorp.com/blog/announcing-terraform-0-12) as a [Heroku](https://www.heroku.com/) app. +[Terraform](https://www.terraform.io/) [1.0](https://www.hashicorp.com/blog/announcing-terraform-0-12) as a [Heroku](https://www.heroku.com/) app. Run Terraform CLI in the cloud: @@ -11,7 +11,7 @@ heroku run terraform apply 🔬🚧 This is a community proof-of-concept, [MIT license](LICENSE), provided "as is", without warranty of any kind. -⭐️💁‍♀️ To use the [Terraform Postgres backend](https://www.terraform.io/docs/backends/types/pg.html), this app requires [Terraform 0.12](https://www.hashicorp.com/blog/announcing-terraform-0-12). +⭐️💁‍♀️ Uses the [Terraform Postgres backend](https://www.terraform.io/docs/backends/types/pg.html). Set-up ------ diff --git a/backend.tf b/backend.tf new file mode 100644 index 0000000..067345d --- /dev/null +++ b/backend.tf @@ -0,0 +1,4 @@ +terraform { + backend "pg" { + } +} diff --git a/main.tf b/main.tf index 6de786a..a4c197e 100644 --- a/main.tf +++ b/main.tf @@ -1,12 +1,12 @@ terraform { - backend "pg" { + required_providers { + heroku = { + source = "heroku/heroku" + version = "4.6.0" + } } } -provider "heroku" { - version = "~> 2.0" -} - variable "example_app_name" { description = "Name of the Heroku app provisioned as an example" } @@ -19,7 +19,7 @@ resource "heroku_app" "example" { resource "heroku_build" "example" { app = heroku_app.example.name - source = { + source { path = "app/" } } diff --git a/versions.tf b/versions.tf index ac97c6a..0d15f94 100644 --- a/versions.tf +++ b/versions.tf @@ -1,4 +1,4 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 1.0" }