Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
### Bug Fixes

* Environment check was looking for the wrong string when enabling backups ([#9](https://github.com/commitdev/terraform-aws-zero/issues/9))
* Bump external module versions in database and logging modules to allow support for AWS provider version 3


### Enhancements

Expand Down
23 changes: 11 additions & 12 deletions modules/certificate/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,19 @@ resource "aws_acm_certificate" "cert" {
}
}

locals {
# Change this from a set to a list so we can iterate on it.
# for_each was not working properly on initial creation
# https://github.com/terraform-providers/terraform-provider-aws/issues/14447
validation_records = tolist(aws_acm_certificate.cert.domain_validation_options)
}

# # Route53 record to validate the certificate
# Route53 record to validate the certificate
resource "aws_route53_record" "cert_validation_record" {
count = length(local.validation_records)
for_each = {
for dvo in aws_acm_certificate.cert.domain_validation_options : dvo.domain_name => {
name = dvo.resource_record_name
record = dvo.resource_record_value
type = dvo.resource_record_type
}
}

name = local.validation_records[count.index].resource_record_name
records = [local.validation_records[count.index].resource_record_value]
type = local.validation_records[count.index].resource_record_type
name = each.value.name
records = [each.value.record]
type = each.value.type
allow_overwrite = true
zone_id = data.aws_route53_zone.public.zone_id
ttl = 300
Expand Down
6 changes: 3 additions & 3 deletions modules/database/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

module "rds_security_group" {
source = "terraform-aws-modules/security-group/aws"
version = "3.2.0"
version = "3.16.0"

name = "${var.project}-${var.environment}-rds-sg"
description = "Security group for RDS DB"
Expand Down Expand Up @@ -48,7 +48,7 @@ data "aws_secretsmanager_secret_version" "rds_master_secret" {
module "rds_postgres" {
count = var.database_engine == "postgres" ? 1 : 0
source = "terraform-aws-modules/rds/aws"
version = "2.17.0"
version = "2.18.0"

identifier = "${var.project}-${var.environment}"

Expand Down Expand Up @@ -98,7 +98,7 @@ module "rds_postgres" {
module "rds_mysql" {
count = var.database_engine == "mysql" ? 1 : 0
source = "terraform-aws-modules/rds/aws"
version = "2.17.0"
version = "2.18.0"

identifier = "${var.project}-${var.environment}"

Expand Down
2 changes: 1 addition & 1 deletion modules/logging/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# After creating the infra, run the manifest in kubernetes/monitoring/ to set up fluentd
module "elasticsearch" {
source = "cloudposse/elasticsearch/aws"
version = "0.20.4"
version = "0.21.0"
namespace = var.project
stage = var.environment
name = "logging"
Expand Down