Skip to content

Commit a21c44b

Browse files
authored
Update all modules, examples and tests to the latest versions and patterns (#57)
* Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns * Update all modules, examples and tests to the latest versions and patterns
1 parent f57eb66 commit a21c44b

File tree

14 files changed

+813
-434
lines changed

14 files changed

+813
-434
lines changed

‎LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2018-2020 Cloud Posse, LLC
189+
Copyright 2018-2022 Cloud Posse, LLC
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

‎README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,34 +104,35 @@ provider "aws" {
104104
}
105105
106106
module "vpc" {
107-
source = "cloudposse/vpc/aws"
107+
source = "cloudposse/vpc/aws"
108108
# Cloud Posse recommends pinning every module to a specific version
109109
# version = "x.x.x"
110-
namespace = var.namespace
111-
stage = var.stage
112-
name = var.name
113-
cidr_block = "172.16.0.0/16"
110+
111+
ipv4_primary_cidr_block = "172.19.0.0/16"
112+
113+
context = module.this.context
114114
}
115115
116116
module "subnets" {
117117
source = "cloudposse/dynamic-subnets/aws"
118118
# Cloud Posse recommends pinning every module to a specific version
119119
# version = "x.x.x"
120+
120121
availability_zones = var.availability_zones
121-
namespace = var.namespace
122-
stage = var.stage
123-
name = var.name
124122
vpc_id = module.vpc.vpc_id
125-
igw_id = module.vpc.igw_id
126-
cidr_block = module.vpc.vpc_cidr_block
123+
igw_id = [module.vpc.igw_id]
124+
ipv4_cidr_block = [module.vpc.vpc_cidr_block]
127125
nat_gateway_enabled = false
128126
nat_instance_enabled = false
127+
128+
context = module.this.context
129129
}
130130
131131
module "s3_log_storage" {
132132
source = "cloudposse/s3-log-storage/aws"
133133
# Cloud Posse recommends pinning every module to a specific version
134134
# version = "x.x.x"
135+
135136
region = var.region
136137
namespace = var.namespace
137138
stage = var.stage
@@ -156,6 +157,7 @@ module "emr_cluster" {
156157
source = "cloudposse/emr-cluster/aws"
157158
# Cloud Posse recommends pinning every module to a specific version
158159
# version = "x.x.x"
160+
159161
namespace = var.namespace
160162
stage = var.stage
161163
name = var.name
@@ -209,7 +211,7 @@ Available targets:
209211

210212
| Name | Version |
211213
|------|---------|
212-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
214+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.0 |
213215
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.5.0 |
214216

215217
## Providers

‎README.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,34 +65,35 @@ usage: |2-
6565
}
6666
6767
module "vpc" {
68-
source = "cloudposse/vpc/aws"
68+
source = "cloudposse/vpc/aws"
6969
# Cloud Posse recommends pinning every module to a specific version
7070
# version = "x.x.x"
71-
namespace = var.namespace
72-
stage = var.stage
73-
name = var.name
74-
cidr_block = "172.16.0.0/16"
71+
72+
ipv4_primary_cidr_block = "172.19.0.0/16"
73+
74+
context = module.this.context
7575
}
7676
7777
module "subnets" {
7878
source = "cloudposse/dynamic-subnets/aws"
7979
# Cloud Posse recommends pinning every module to a specific version
8080
# version = "x.x.x"
81+
8182
availability_zones = var.availability_zones
82-
namespace = var.namespace
83-
stage = var.stage
84-
name = var.name
8583
vpc_id = module.vpc.vpc_id
86-
igw_id = module.vpc.igw_id
87-
cidr_block = module.vpc.vpc_cidr_block
84+
igw_id = [module.vpc.igw_id]
85+
ipv4_cidr_block = [module.vpc.vpc_cidr_block]
8886
nat_gateway_enabled = false
8987
nat_instance_enabled = false
88+
89+
context = module.this.context
9090
}
9191
9292
module "s3_log_storage" {
9393
source = "cloudposse/s3-log-storage/aws"
9494
# Cloud Posse recommends pinning every module to a specific version
9595
# version = "x.x.x"
96+
9697
region = var.region
9798
namespace = var.namespace
9899
stage = var.stage
@@ -117,6 +118,7 @@ usage: |2-
117118
source = "cloudposse/emr-cluster/aws"
118119
# Cloud Posse recommends pinning every module to a specific version
119120
# version = "x.x.x"
121+
120122
namespace = var.namespace
121123
stage = var.stage
122124
name = var.name

‎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-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
6+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.0 |
77
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.5.0 |
88

99
## Providers

‎examples/complete/fixtures.us-east-2.tfvars

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ namespace = "eg"
66

77
stage = "test"
88

9-
# name will be passed in by terratest, see 'examples_complete_test.go'
10-
//name = "emr-test"
9+
name = "emr"
1110

1211
ebs_root_volume_size = 10
1312

1413
visible_to_all_users = true
1514

1615
# https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html
17-
release_label = "emr-6.1.0"
16+
release_label = "emr-6.7.0"
1817

18+
# https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-ha-applications.html
19+
# https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-670-release.html
20+
# https://github.com/hashicorp/terraform-provider-aws/issues/23226
1921
applications = ["Hive", "Presto"]
2022

2123
core_instance_group_instance_type = "m4.large"

‎examples/complete/main.tf

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ provider "aws" {
44

55
module "vpc" {
66
source = "cloudposse/vpc/aws"
7-
version = "0.25.0"
7+
version = "1.1.0"
88

9-
cidr_block = "172.16.0.0/16"
9+
ipv4_primary_cidr_block = "172.19.0.0/16"
1010

1111
context = module.this.context
1212
}
1313

1414
module "subnets" {
1515
source = "cloudposse/dynamic-subnets/aws"
16-
version = "0.39.4"
16+
version = "2.0.2"
1717

1818
availability_zones = var.availability_zones
1919
vpc_id = module.vpc.vpc_id
20-
igw_id = module.vpc.igw_id
21-
cidr_block = module.vpc.vpc_cidr_block
20+
igw_id = [module.vpc.igw_id]
21+
ipv4_cidr_block = [module.vpc.vpc_cidr_block]
2222
nat_gateway_enabled = false
2323
nat_instance_enabled = false
2424

@@ -27,23 +27,23 @@ module "subnets" {
2727

2828
module "s3_log_storage" {
2929
source = "cloudposse/s3-log-storage/aws"
30-
version = "0.24.1"
30+
version = "0.26.0"
3131

32-
attributes = ["logs"]
3332
force_destroy = true
33+
attributes = ["logs"]
3434

3535
context = module.this.context
3636
}
3737

3838
module "aws_key_pair" {
39-
source = "cloudposse/key-pair/aws"
40-
version = "0.18.2"
41-
namespace = var.namespace
42-
stage = var.stage
43-
name = var.name
44-
attributes = ["ssh", "key"]
39+
source = "cloudposse/key-pair/aws"
40+
version = "0.18.3"
41+
4542
ssh_public_key_path = var.ssh_public_key_path
4643
generate_ssh_key = var.generate_ssh_key
44+
attributes = ["ssh", "key"]
45+
46+
context = module.this.context
4747
}
4848

4949
module "emr_cluster" {
@@ -53,8 +53,8 @@ module "emr_cluster" {
5353
slave_allowed_security_groups = [module.vpc.vpc_default_security_group_id]
5454
region = var.region
5555
vpc_id = module.vpc.vpc_id
56-
subnet_id = module.subnets.private_subnet_ids[0]
57-
route_table_id = module.subnets.private_route_table_ids[0]
56+
subnet_id = module.this.enabled ? module.subnets.private_subnet_ids[0] : null
57+
route_table_id = module.this.enabled ? module.subnets.private_route_table_ids[0] : null
5858
subnet_type = "private"
5959
ebs_root_volume_size = var.ebs_root_volume_size
6060
visible_to_all_users = var.visible_to_all_users

‎examples/complete/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.13.0"
2+
required_version = ">= 1.1"
33

44
required_providers {
55
aws = {

0 commit comments

Comments
 (0)