Skip to content

Commit

Permalink
Terraform 1.0 (#7)
Browse files Browse the repository at this point in the history
* Upgrade to Terraform 1.0

* fix syntax
  • Loading branch information
mars authored Oct 25, 2021
1 parent f9cb7fb commit 450fc2e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.terraform/
.terraform.lock.hcl
terraform.tfstate*
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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
------
Expand Down
4 changes: 4 additions & 0 deletions backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
terraform {
backend "pg" {
}
}
12 changes: 6 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
@@ -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"
}
Expand All @@ -19,7 +19,7 @@ resource "heroku_app" "example" {
resource "heroku_build" "example" {
app = heroku_app.example.name

source = {
source {
path = "app/"
}
}
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 1.0"
}

0 comments on commit 450fc2e

Please sign in to comment.