Skip to content

Commit

Permalink
update context and tf .14 support (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
woz5999 authored Dec 15, 2020
1 parent 3f912cc commit 34b6823
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 8 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<!-- markdownlint-disable -->
# 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)
<!-- markdownlint-restore -->

[![README Header][readme_header_img]][readme_header_link]

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


**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.
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).
**IMPORTANT:** We do not pin modules to versions in our examples because of the
difficulty of keeping the versions in the documentation in sync with the latest released versions.
We highly recommend that in your code you pin the version to the exact version you are
using so that your infrastructure remains stable, and update versions in a
systematic way so that they do not catch you by surprise.

Also, because of a bug in the Terraform registry ([hashicorp/terraform#21417](https://github.com/hashicorp/terraform/issues/21417)),
the registry shows many of our inputs as required when in fact they are optional.
The table below correctly indicates which inputs are required.



Expand Down Expand Up @@ -217,7 +226,7 @@ Available targets:

| Name | Version |
|------|---------|
| terraform | >= 0.12.0 |
| terraform | >= 0.12.26 |
| aws | >= 2.0 |
| local | >= 1.3 |
| template | >= 2.0 |
Expand Down Expand Up @@ -433,8 +442,10 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply

### Contributors

<!-- markdownlint-disable -->
| [![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] |
|---|---|---|---|---|---|---|
<!-- markdownlint-restore -->

[aknysh_homepage]: https://github.com/aknysh
[aknysh_avatar]: https://img.cloudposse.com/150x150/https://github.com/aknysh.png
Expand Down
4 changes: 3 additions & 1 deletion context.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
# will be null, and `module.this.delimiter` will be `-` (hyphen).
#


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

enabled = var.enabled
namespace = var.namespace
Expand Down
2 changes: 1 addition & 1 deletion docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

| Name | Version |
|------|---------|
| terraform | >= 0.12.0 |
| terraform | >= 0.12.26 |
| aws | >= 2.0 |
| local | >= 1.3 |
| template | >= 2.0 |
Expand Down
4 changes: 3 additions & 1 deletion examples/complete/context.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
# will be null, and `module.this.delimiter` will be `-` (hyphen).
#


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

enabled = var.enabled
namespace = var.namespace
Expand Down
18 changes: 18 additions & 0 deletions examples/complete/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
terraform {
required_version = ">= 0.12.26"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 2.0"
}
local = {
source = "hashicorp/local"
version = ">= 1.3"
}
template = {
source = "hashicorp/template"
version = ">= 2.0"
}
}
}
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ resource "aws_s3_bucket_public_access_block" "default" {
}

module "dynamodb_table_label" {
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.21.0"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.22.0"
attributes = compact(concat(var.attributes, ["lock"]))
context = module.this.context
}
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 0.12.0"
required_version = ">= 0.12.26"

required_providers {
aws = {
Expand Down

0 comments on commit 34b6823

Please sign in to comment.