Skip to content

Commit

Permalink
make this module v14 compatible (#62)
Browse files Browse the repository at this point in the history
* remove top end version constraints

* go back to the cloudposse modules

* no v

* fix null label reference

* use my one again

* fix null label reference

* fix null label reference

* update for v14 compat

* updates to pass all requirements for tf-14 support

* move to tf registry

* examples submodules upgrade to fully support TF 0.14

Co-authored-by: Maxim Mironenko <[email protected]>
  • Loading branch information
jurgenweber and maximmi authored Dec 23, 2020
1 parent 702e271 commit 816413f
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 15 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ Include this repository as a module in your existing terraform code:

```hcl
module "efs" {
source = "git::https://github.com/cloudposse/terraform-aws-efs.git?ref=master"
source = "cloudposse/efs/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = "eg"
stage = "test"
Expand Down Expand Up @@ -114,7 +116,7 @@ Available targets:

| Name | Version |
|------|---------|
| terraform | >= 0.12.0 |
| terraform | >= 0.12.26 |
| aws | >= 2.0 |
| local | >= 1.2 |
| null | >= 2.0 |
Expand Down
4 changes: 3 additions & 1 deletion README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ usage: |-
```hcl
module "efs" {
source = "git::https://github.com/cloudposse/terraform-aws-efs.git?ref=master"
source = "cloudposse/efs/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = "eg"
stage = "test"
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.2 |
| null | >= 2.0 |
Expand Down
6 changes: 4 additions & 2 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ provider "aws" {
}

module "vpc" {
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.17.0"
source = "cloudposse/vpc/aws"
version = "0.18.1"

cidr_block = "172.16.0.0/16"

context = module.this.context
}

module "subnets" {
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.28.0"
source = "cloudposse/dynamic-subnets/aws"
version = "0.33.0"

availability_zones = var.availability_zones
vpc_id = module.vpc.vpc_id
Expand Down
17 changes: 13 additions & 4 deletions examples/complete/versions.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
terraform {
required_version = ">= 0.12.0"
required_version = ">= 0.12.26"

required_providers {
aws = ">= 2.0"
local = ">= 1.2"
null = ">= 2.0"
aws = {
source = "hashicorp/aws"
version = ">= 2.0"
}
local = {
source = "hashicorp/local"
version = ">= 1.2"
}
null = {
source = "hashicorp/null"
version = ">= 2.0"
}
}
}
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ resource "aws_security_group_rule" "egress" {
}

module "dns" {
source = "git::https://github.com/cloudposse/terraform-aws-route53-cluster-hostname.git?ref=tags/0.9.0"
source = "cloudposse/route53-cluster-hostname/aws"
version = "0.9.0"

enabled = module.this.enabled && length(var.zone_id) > 0 ? true : false
dns_name = var.dns_name == "" ? module.this.id : var.dns_name
Expand Down
17 changes: 13 additions & 4 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
terraform {
required_version = ">= 0.12.0"
required_version = ">= 0.12.26"

required_providers {
aws = ">= 2.0"
local = ">= 1.2"
null = ">= 2.0"
aws = {
source = "hashicorp/aws"
version = ">= 2.0"
}
local = {
source = "hashicorp/local"
version = ">= 1.2"
}
null = {
source = "hashicorp/null"
version = ">= 2.0"
}
}
}

0 comments on commit 816413f

Please sign in to comment.