diff --git a/README.md b/README.md index 82e17ba..c527888 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,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-elasticache-redis/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. @@ -153,7 +160,7 @@ Available targets: | Name | Version | |------|---------| -| terraform | >= 0.12.0 | +| terraform | >= 0.12.26 | | aws | >= 2.0 | | null | >= 2.0 | diff --git a/context.tf b/context.tf index bae0cf1..e5734b7 100644 --- a/context.tf +++ b/context.tf @@ -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.19.2" + source = "cloudposse/label/null" + version = "0.22.0" // requires Terraform >= 0.12.26 enabled = var.enabled namespace = var.namespace diff --git a/docs/terraform.md b/docs/terraform.md index 1f23da5..75d99b0 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -3,7 +3,7 @@ | Name | Version | |------|---------| -| terraform | >= 0.12.0 | +| terraform | >= 0.12.26 | | aws | >= 2.0 | | null | >= 2.0 | diff --git a/examples/complete/context.tf b/examples/complete/context.tf index bae0cf1..e5734b7 100644 --- a/examples/complete/context.tf +++ b/examples/complete/context.tf @@ -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.19.2" + source = "cloudposse/label/null" + version = "0.22.0" // requires Terraform >= 0.12.26 enabled = var.enabled namespace = var.namespace diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf index 723d6b1..f34d0d0 100644 --- a/examples/complete/versions.tf +++ b/examples/complete/versions.tf @@ -1,8 +1,14 @@ terraform { - required_version = ">= 0.12.0" + required_version = ">= 0.12.26" required_providers { - aws = ">= 2.0" - null = ">= 2.0" + aws = { + source = "hashicorp/aws" + version = ">= 2.0" + } + null = { + source = "hashicorp/null" + version = ">= 2.0" + } } } diff --git a/main.tf b/main.tf index 33ee31c..834449a 100644 --- a/main.tf +++ b/main.tf @@ -159,7 +159,7 @@ resource "aws_cloudwatch_metric_alarm" "cache_memory" { } module "dns" { - source = "git::https://github.com/cloudposse/terraform-aws-route53-cluster-hostname.git?ref=tags/0.7.0" + source = "git::https://github.com/cloudposse/terraform-aws-route53-cluster-hostname.git?ref=tags/0.8.0" enabled = module.this.enabled && var.zone_id != "" ? true : false dns_name = var.dns_subdomain != "" ? var.dns_subdomain : module.this.id diff --git a/versions.tf b/versions.tf index 723d6b1..f34d0d0 100644 --- a/versions.tf +++ b/versions.tf @@ -1,8 +1,14 @@ terraform { - required_version = ">= 0.12.0" + required_version = ">= 0.12.26" required_providers { - aws = ">= 2.0" - null = ">= 2.0" + aws = { + source = "hashicorp/aws" + version = ">= 2.0" + } + null = { + source = "hashicorp/null" + version = ">= 2.0" + } } }