Skip to content

Commit 450fc2e

Browse files
authored
Terraform 1.0 (#7)
* Upgrade to Terraform 1.0 * fix syntax
1 parent f9cb7fb commit 450fc2e

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.terraform/
2+
.terraform.lock.hcl
23
terraform.tfstate*

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Terraforming 🌱 Heroku app
22
===========================
33

4-
[Terraform](https://www.terraform.io/) [0.12](https://www.hashicorp.com/blog/announcing-terraform-0-12) as a [Heroku](https://www.heroku.com/) app.
4+
[Terraform](https://www.terraform.io/) [1.0](https://www.hashicorp.com/blog/announcing-terraform-0-12) as a [Heroku](https://www.heroku.com/) app.
55

66
Run Terraform CLI in the cloud:
77

@@ -11,7 +11,7 @@ heroku run terraform apply
1111

1212
🔬🚧 This is a community proof-of-concept, [MIT license](LICENSE), provided "as is", without warranty of any kind.
1313

14-
⭐️💁‍♀️ 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).
14+
⭐️💁‍♀️ Uses the [Terraform Postgres backend](https://www.terraform.io/docs/backends/types/pg.html).
1515

1616
Set-up
1717
------

backend.tf

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
terraform {
2+
backend "pg" {
3+
}
4+
}

main.tf

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
terraform {
2-
backend "pg" {
2+
required_providers {
3+
heroku = {
4+
source = "heroku/heroku"
5+
version = "4.6.0"
6+
}
37
}
48
}
59

6-
provider "heroku" {
7-
version = "~> 2.0"
8-
}
9-
1010
variable "example_app_name" {
1111
description = "Name of the Heroku app provisioned as an example"
1212
}
@@ -19,7 +19,7 @@ resource "heroku_app" "example" {
1919
resource "heroku_build" "example" {
2020
app = heroku_app.example.name
2121

22-
source = {
22+
source {
2323
path = "app/"
2424
}
2525
}

versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

22
terraform {
3-
required_version = ">= 0.12"
3+
required_version = ">= 1.0"
44
}

0 commit comments

Comments
 (0)