Skip to content

Commit 34b6823

Browse files
authored
update context and tf .14 support (#79)
1 parent 3f912cc commit 34b6823

File tree

7 files changed

+41
-8
lines changed

7 files changed

+41
-8
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
<!-- markdownlint-disable -->
12
# terraform-aws-tfstate-backend [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-tfstate-backend.svg)](https://github.com/cloudposse/terraform-aws-tfstate-backend/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
3+
<!-- markdownlint-restore -->
24

35
[![README Header][readme_header_img]][readme_header_link]
46

@@ -77,8 +79,15 @@ We literally have [*hundreds of terraform modules*][terraform_modules] that are
7779
## Usage
7880

7981

80-
**IMPORTANT:** The `master` branch is used in `source` just as an example. In your code, do not pin to `master` because there may be breaking changes between releases.
81-
Instead pin to the release tag (e.g. `?ref=tags/x.y.z`) of one of our [latest releases](https://github.com/cloudposse/terraform-aws-tfstate-backend/releases).
82+
**IMPORTANT:** We do not pin modules to versions in our examples because of the
83+
difficulty of keeping the versions in the documentation in sync with the latest released versions.
84+
We highly recommend that in your code you pin the version to the exact version you are
85+
using so that your infrastructure remains stable, and update versions in a
86+
systematic way so that they do not catch you by surprise.
87+
88+
Also, because of a bug in the Terraform registry ([hashicorp/terraform#21417](https://github.com/hashicorp/terraform/issues/21417)),
89+
the registry shows many of our inputs as required when in fact they are optional.
90+
The table below correctly indicates which inputs are required.
8291

8392

8493

@@ -217,7 +226,7 @@ Available targets:
217226

218227
| Name | Version |
219228
|------|---------|
220-
| terraform | >= 0.12.0 |
229+
| terraform | >= 0.12.26 |
221230
| aws | >= 2.0 |
222231
| local | >= 1.3 |
223232
| template | >= 2.0 |
@@ -433,8 +442,10 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
433442

434443
### Contributors
435444

445+
<!-- markdownlint-disable -->
436446
| [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]<br/>[Andriy Knysh][aknysh_homepage] | [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Maarten van der Hoef][maartenvanderhoef_avatar]][maartenvanderhoef_homepage]<br/>[Maarten van der Hoef][maartenvanderhoef_homepage] | [![Vladimir][SweetOps_avatar]][SweetOps_homepage]<br/>[Vladimir][SweetOps_homepage] | [![Chris Weyl][rsrchboy_avatar]][rsrchboy_homepage]<br/>[Chris Weyl][rsrchboy_homepage] | [![John McGehee][jmcgeheeiv_avatar]][jmcgeheeiv_homepage]<br/>[John McGehee][jmcgeheeiv_homepage] | [![Oliver L Schoenborn][schollii_avatar]][schollii_homepage]<br/>[Oliver L Schoenborn][schollii_homepage] |
437447
|---|---|---|---|---|---|---|
448+
<!-- markdownlint-restore -->
438449

439450
[aknysh_homepage]: https://github.com/aknysh
440451
[aknysh_avatar]: https://img.cloudposse.com/150x150/https://github.com/aknysh.png

context.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
# will be null, and `module.this.delimiter` will be `-` (hyphen).
1919
#
2020

21+
2122
module "this" {
22-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.21.0"
23+
source = "cloudposse/label/null"
24+
version = "0.22.0" // requires Terraform >= 0.12.26
2325

2426
enabled = var.enabled
2527
namespace = var.namespace

docs/terraform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
| Name | Version |
55
|------|---------|
6-
| terraform | >= 0.12.0 |
6+
| terraform | >= 0.12.26 |
77
| aws | >= 2.0 |
88
| local | >= 1.3 |
99
| template | >= 2.0 |

examples/complete/context.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
# will be null, and `module.this.delimiter` will be `-` (hyphen).
1919
#
2020

21+
2122
module "this" {
22-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.21.0"
23+
source = "cloudposse/label/null"
24+
version = "0.22.0" // requires Terraform >= 0.12.26
2325

2426
enabled = var.enabled
2527
namespace = var.namespace

examples/complete/versions.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
terraform {
2+
required_version = ">= 0.12.26"
3+
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = ">= 2.0"
8+
}
9+
local = {
10+
source = "hashicorp/local"
11+
version = ">= 1.3"
12+
}
13+
template = {
14+
source = "hashicorp/template"
15+
version = ">= 2.0"
16+
}
17+
}
18+
}

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ resource "aws_s3_bucket_public_access_block" "default" {
152152
}
153153

154154
module "dynamodb_table_label" {
155-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.21.0"
155+
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.22.0"
156156
attributes = compact(concat(var.attributes, ["lock"]))
157157
context = module.this.context
158158
}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 0.12.0"
2+
required_version = ">= 0.12.26"
33

44
required_providers {
55
aws = {

0 commit comments

Comments
 (0)