Skip to content

Commit 9d720ec

Browse files
authored
Support AWS Provider V5 (#159)
* Support AWS Provider V5 * Support AWS Provider V5 * updates * Update ID * Bump provider * updates
1 parent afc11a4 commit 9d720ec

File tree

12 files changed

+74
-101
lines changed

12 files changed

+74
-101
lines changed

.github/renovate.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"extends": [
33
"config:base",
4-
":preserveSemverRanges"
4+
":preserveSemverRanges",
5+
":rebaseStalePrs"
56
],
6-
"baseBranches": ["main", "master", "/^release\\/v\\d{1,2}$/"],
7+
"baseBranches": ["main"],
78
"labels": ["auto-update"],
89
"dependencyDashboardAutoclose": true,
910
"enabledManagers": ["terraform"],
1011
"terraform": {
11-
"ignorePaths": ["**/context.tf", "examples/**"]
12+
"ignorePaths": ["**/context.tf"]
1213
}
1314
}

.github/workflows/release-branch.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- 'docs/**'
1111
- 'examples/**'
1212
- 'test/**'
13+
- 'README.*'
1314

1415
permissions:
1516
contents: write

.github/workflows/release-published.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ permissions:
1111

1212
jobs:
1313
terraform-module:
14-
uses: cloudposse/github-actions-workflows-terraform-module/.github/workflows/release.yml@main
14+
uses: cloudposse/github-actions-workflows-terraform-module/.github/workflows/release-published.yml@main

README.md

+16-57
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ Terraform module to provision AWS [`RDS`](https://aws.amazon.com/rds/) instances
3333
---
3434

3535
This project is part of our comprehensive ["SweetOps"](https://cpco.io/sweetops) approach towards DevOps.
36-
[<img align="right" title="Share via Email" src="https://docs.cloudposse.com/images/ionicons/ios-email-outline-2.0.1-16x16-999999.svg"/>][share_email]
37-
[<img align="right" title="Share on Google+" src="https://docs.cloudposse.com/images/ionicons/social-googleplus-outline-2.0.1-16x16-999999.svg" />][share_googleplus]
38-
[<img align="right" title="Share on Facebook" src="https://docs.cloudposse.com/images/ionicons/social-facebook-outline-2.0.1-16x16-999999.svg" />][share_facebook]
39-
[<img align="right" title="Share on Reddit" src="https://docs.cloudposse.com/images/ionicons/social-reddit-outline-2.0.1-16x16-999999.svg" />][share_reddit]
40-
[<img align="right" title="Share on LinkedIn" src="https://docs.cloudposse.com/images/ionicons/social-linkedin-outline-2.0.1-16x16-999999.svg" />][share_linkedin]
41-
[<img align="right" title="Share on Twitter" src="https://docs.cloudposse.com/images/ionicons/social-twitter-outline-2.0.1-16x16-999999.svg" />][share_twitter]
4236

4337

4438
[![Terraform Open Source Modules](https://docs.cloudposse.com/images/terraform-open-source-modules.svg)][terraform_modules]
@@ -99,10 +93,6 @@ We highly recommend that in your code you pin the version to the exact version y
9993
using so that your infrastructure remains stable, and update versions in a
10094
systematic way so that they do not catch you by surprise.
10195

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

10797
```hcl
10898
module "rds_instance" {
@@ -218,14 +208,14 @@ Available targets:
218208

219209
| Name | Version |
220210
|------|---------|
221-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
222-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.49.0 |
211+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
212+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0 |
223213

224214
## Providers
225215

226216
| Name | Version |
227217
|------|---------|
228-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.49.0 |
218+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0 |
229219

230220
## Modules
231221

@@ -348,8 +338,6 @@ Available targets:
348338

349339
Like this project? Please give it a ★ on [our GitHub](https://github.com/cloudposse/terraform-aws-rds)! (it helps us **a lot**)
350340

351-
Are you using this project or any of our other projects? Consider [leaving a testimonial][testimonial]. =)
352-
353341

354342

355343
## Related Projects
@@ -393,10 +381,6 @@ We deliver 10x the value for a fraction of the cost of a full-time engineer. Our
393381

394382
Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.
395383

396-
## Discourse Forums
397-
398-
Participate in our [Discourse Forums][discourse]. Here you'll find answers to commonly asked questions. Most questions will be related to the enormous number of projects we support on our GitHub. Come here to collaborate on answers, find solutions, and get ideas about the products and services we value. It only takes a minute to get started! Just sign in with SSO using your GitHub account.
399-
400384
## Newsletter
401385

402386
Sign up for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
@@ -407,7 +391,18 @@ Sign up for [our newsletter][newsletter] that covers everything on our technolog
407391

408392
[![zoom](https://img.cloudposse.com/fit-in/200x200/https://cloudposse.com/wp-content/uploads/2019/08/Powered-by-Zoom.png")][office_hours]
409393

410-
## Contributing
394+
## ✨ Contributing
395+
396+
397+
398+
This project is under active development, and we encourage contributions from our community.
399+
Many thanks to our outstanding contributors:
400+
401+
<a href="https://github.com/cloudposse/terraform-aws-rds/graphs/contributors">
402+
<img src="https://contrib.rocks/image?repo=cloudposse/terraform-aws-rds&max=24" />
403+
</a>
404+
405+
411406

412407
### Bug Reports & Feature Requests
413408

@@ -481,35 +476,7 @@ We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. W
481476

482477
We offer [paid support][commercial_support] on all of our projects.
483478

484-
Check out [our other projects][github], [follow us on twitter][twitter], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.
485-
486-
487-
488-
### Contributors
489-
490-
<!-- markdownlint-disable -->
491-
| [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]<br/>[Andriy Knysh][aknysh_homepage] | [![Sergey Vasilyev][s2504s_avatar]][s2504s_homepage]<br/>[Sergey Vasilyev][s2504s_homepage] | [![Valeriy][drama17_avatar]][drama17_homepage]<br/>[Valeriy][drama17_homepage] | [![Konstantin B][comeanother_avatar]][comeanother_homepage]<br/>[Konstantin B][comeanother_homepage] | [![drmikecrowe][drmikecrowe_avatar]][drmikecrowe_homepage]<br/>[drmikecrowe][drmikecrowe_homepage] | [![Oscar Sullivan][osulli_avatar]][osulli_homepage]<br/>[Oscar Sullivan][osulli_homepage] | [![Federico Márquez][fedemzcor_avatar]][fedemzcor_homepage]<br/>[Federico Márquez][fedemzcor_homepage] |
492-
|---|---|---|---|---|---|---|---|
493-
<!-- markdownlint-restore -->
494-
495-
[osterman_homepage]: https://github.com/osterman
496-
[osterman_avatar]: https://img.cloudposse.com/150x150/https://github.com/osterman.png
497-
[aknysh_homepage]: https://github.com/aknysh
498-
[aknysh_avatar]: https://img.cloudposse.com/150x150/https://github.com/aknysh.png
499-
[s2504s_homepage]: https://github.com/s2504s
500-
[s2504s_avatar]: https://img.cloudposse.com/150x150/https://github.com/s2504s.png
501-
[drama17_homepage]: https://github.com/drama17
502-
[drama17_avatar]: https://img.cloudposse.com/150x150/https://github.com/drama17.png
503-
[comeanother_homepage]: https://github.com/comeanother
504-
[comeanother_avatar]: https://img.cloudposse.com/150x150/https://github.com/comeanother.png
505-
[drmikecrowe_homepage]: https://github.com/drmikecrowe
506-
[drmikecrowe_avatar]: https://img.cloudposse.com/150x150/https://github.com/drmikecrowe.png
507-
[osulli_homepage]: https://github.com/osulli
508-
[osulli_avatar]: https://img.cloudposse.com/150x150/https://github.com/osulli.png
509-
[fedemzcor_homepage]: https://github.com/fedemzcor
510-
[fedemzcor_avatar]: https://img.cloudposse.com/150x150/https://github.com/fedemzcor.png
511-
512-
[![README Footer][readme_footer_img]][readme_footer_link]
479+
Check out [our other projects][github], [follow us on twitter][twitter], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.[![README Footer][readme_footer_img]][readme_footer_link]
513480
[![Beacon][beacon]][website]
514481
<!-- markdownlint-disable -->
515482
[logo]: https://cloudposse.com/logo-300x69.svg
@@ -519,12 +486,10 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
519486
[jobs]: https://cpco.io/jobs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=jobs
520487
[hire]: https://cpco.io/hire?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=hire
521488
[slack]: https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=slack
522-
[linkedin]: https://cpco.io/linkedin?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=linkedin
523489
[twitter]: https://cpco.io/twitter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=twitter
524490
[testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=testimonial
525491
[office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=office_hours
526492
[newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=newsletter
527-
[discourse]: https://ask.sweetops.com/?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=discourse
528493
[email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=email
529494
[commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=commercial_support
530495
[we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=we_love_open_source
@@ -535,11 +500,5 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
535500
[readme_footer_link]: https://cloudposse.com/readme/footer/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=readme_footer_link
536501
[readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img
537502
[readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-rds&utm_content=readme_commercial_support_link
538-
[share_twitter]: https://twitter.com/intent/tweet/?text=terraform-aws-rds&url=https://github.com/cloudposse/terraform-aws-rds
539-
[share_linkedin]: https://www.linkedin.com/shareArticle?mini=true&title=terraform-aws-rds&url=https://github.com/cloudposse/terraform-aws-rds
540-
[share_reddit]: https://reddit.com/submit/?url=https://github.com/cloudposse/terraform-aws-rds
541-
[share_facebook]: https://facebook.com/sharer/sharer.php?u=https://github.com/cloudposse/terraform-aws-rds
542-
[share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-rds
543-
[share_email]: mailto:?subject=terraform-aws-rds&body=https://github.com/cloudposse/terraform-aws-rds
544503
[beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-rds?pixel&cs=github&cm=readme&an=terraform-aws-rds
545504
<!-- markdownlint-restore -->

docs/terraform.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
| Name | Version |
55
|------|---------|
6-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
7-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.49.0 |
6+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
7+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0 |
88

99
## Providers
1010

1111
| Name | Version |
1212
|------|---------|
13-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.49.0 |
13+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0 |
1414

1515
## Modules
1616

examples/complete/main.tf

+5-5
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.28.1"
7+
version = "2.1.0"
88

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

1111
context = module.this.context
1212
}
1313

1414
module "subnets" {
1515
source = "cloudposse/dynamic-subnets/aws"
16-
version = "0.40.1"
16+
version = "2.4.1"
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

examples/complete/versions.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0.0"
2+
required_version = ">= 1.3"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.9.0"
7+
version = ">= 5.0"
88
}
99
}
1010
}

examples/mssql/main.tf

+13-11
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,26 @@ provider "aws" {
33
}
44

55
module "vpc" {
6-
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.7.0"
7-
namespace = var.namespace
8-
stage = var.stage
9-
name = var.name
10-
cidr_block = "172.16.0.0/16"
6+
source = "cloudposse/vpc/aws"
7+
version = "2.1.0"
8+
9+
ipv4_primary_cidr_block = "172.16.0.0/16"
10+
11+
context = module.this.context
1112
}
1213

1314
module "subnets" {
14-
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.16.0"
15+
source = "cloudposse/dynamic-subnets/aws"
16+
version = "2.4.1"
17+
1518
availability_zones = var.availability_zones
16-
namespace = var.namespace
17-
stage = var.stage
18-
name = var.name
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
24+
25+
context = module.this.context
2426
}
2527

2628
module "rds_instance" {

examples/mssql/versions.tf

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
terraform {
2+
required_version = ">= 1.3"
3+
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = ">= 5.0"
8+
}
9+
}
10+
}

main.tf

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ locals {
1818
# finally, if no name is provided, and it is not a replica, we check if subnets were provided.
1919
db_subnet_group_name = local.db_subnet_group_name_provided ? var.db_subnet_group_name : (
2020
local.is_replica ? null : (
21-
local.subnet_ids_provided ? join("", aws_db_subnet_group.default.*.name) : null)
21+
local.subnet_ids_provided ? join("", aws_db_subnet_group.default[*].name) : null)
2222
)
2323

2424
availability_zone = var.multi_az ? null : var.availability_zone
@@ -43,7 +43,7 @@ resource "aws_db_instance" "default" {
4343

4444
vpc_security_group_ids = compact(
4545
concat(
46-
[join("", aws_security_group.default.*.id)],
46+
[join("", aws_security_group.default[*].id)],
4747
var.associate_security_group_ids
4848
)
4949
)
@@ -52,8 +52,8 @@ resource "aws_db_instance" "default" {
5252
availability_zone = local.availability_zone
5353

5454
ca_cert_identifier = var.ca_cert_identifier
55-
parameter_group_name = length(var.parameter_group_name) > 0 ? var.parameter_group_name : join("", aws_db_parameter_group.default.*.name)
56-
option_group_name = length(var.option_group_name) > 0 ? var.option_group_name : join("", aws_db_option_group.default.*.name)
55+
parameter_group_name = length(var.parameter_group_name) > 0 ? var.parameter_group_name : join("", aws_db_parameter_group.default[*].name)
56+
option_group_name = length(var.option_group_name) > 0 ? var.option_group_name : join("", aws_db_option_group.default[*].name)
5757
license_model = var.license_model
5858
multi_az = var.multi_az
5959
storage_type = var.storage_type
@@ -183,7 +183,7 @@ resource "aws_security_group_rule" "ingress_security_groups" {
183183
to_port = var.database_port
184184
protocol = "tcp"
185185
source_security_group_id = var.security_group_ids[count.index]
186-
security_group_id = join("", aws_security_group.default.*.id)
186+
security_group_id = join("", aws_security_group.default[*].id)
187187
}
188188

189189
resource "aws_security_group_rule" "ingress_cidr_blocks" {
@@ -195,7 +195,7 @@ resource "aws_security_group_rule" "ingress_cidr_blocks" {
195195
to_port = var.database_port
196196
protocol = "tcp"
197197
cidr_blocks = var.allowed_cidr_blocks
198-
security_group_id = join("", aws_security_group.default.*.id)
198+
security_group_id = join("", aws_security_group.default[*].id)
199199
}
200200

201201
resource "aws_security_group_rule" "egress" {
@@ -206,7 +206,7 @@ resource "aws_security_group_rule" "egress" {
206206
to_port = 0
207207
protocol = "-1"
208208
cidr_blocks = ["0.0.0.0/0"]
209-
security_group_id = join("", aws_security_group.default.*.id)
209+
security_group_id = join("", aws_security_group.default[*].id)
210210
}
211211

212212
module "dns_host_name" {
@@ -216,7 +216,7 @@ module "dns_host_name" {
216216
enabled = length(var.dns_zone_id) > 0 && module.this.enabled
217217
dns_name = var.host_name
218218
zone_id = var.dns_zone_id
219-
records = coalescelist(aws_db_instance.default.*.address, [""])
219+
records = coalescelist(aws_db_instance.default[*].address, [""])
220220

221221
context = module.this.context
222222
}

0 commit comments

Comments
 (0)