diff --git a/aws/wordpress_fargate/alb.tf b/aws/wordpress_fargate/alb.tf index 33ad71a..3cb5298 100644 --- a/aws/wordpress_fargate/alb.tf +++ b/aws/wordpress_fargate/alb.tf @@ -1,9 +1,8 @@ module "acm_alb" { source = "terraform-aws-modules/acm/aws" - version = "~> v2.0" + version = "~> v3.0" domain_name = var.public_alb_domain zone_id = data.aws_route53_zone.this.zone_id - tags = var.tags } resource "aws_security_group" "alb" { @@ -31,14 +30,12 @@ resource "aws_security_group" "alb" { protocol = "-1" self = true } - - tags = var.tags } module "alb" { source = "terraform-aws-modules/alb/aws" - version = "~> 5.0" + version = "~> 6.0" name = "${var.prefix}-${var.environment}" load_balancer_type = "application" vpc_id = module.vpc.vpc_id @@ -47,7 +44,7 @@ module "alb" { https_listeners = [ { - "certificate_arn" = module.acm_alb.this_acm_certificate_arn + "certificate_arn" = module.acm_alb.acm_certificate_arn "port" = 443 }, ] @@ -59,5 +56,4 @@ module "alb" { backend_port = 80 } ] - tags = var.tags } diff --git a/aws/wordpress_fargate/cloudfront.tf b/aws/wordpress_fargate/cloudfront.tf index 19aa233..694fa3d 100644 --- a/aws/wordpress_fargate/cloudfront.tf +++ b/aws/wordpress_fargate/cloudfront.tf @@ -2,10 +2,9 @@ module "acm" { source = "terraform-aws-modules/acm/aws" - version = "~> v2.0" + version = "~> v3.0" domain_name = var.site_domain zone_id = data.aws_route53_zone.this.zone_id - tags = var.tags providers = { aws = aws.us_east_1 # cloudfront needs acm certificate to be from "us-east-1" region @@ -99,7 +98,6 @@ resource "aws_cloudfront_distribution" "this" { viewer_protocol_policy = "redirect-to-https" } price_class = var.cf_price_class - tags = var.tags restrictions { geo_restriction { restriction_type = "none" @@ -108,7 +106,7 @@ resource "aws_cloudfront_distribution" "this" { viewer_certificate { - acm_certificate_arn = module.acm.this_acm_certificate_arn + acm_certificate_arn = module.acm.acm_certificate_arn ssl_support_method = "sni-only" minimum_protocol_version = "TLSv1.1_2016" } diff --git a/aws/wordpress_fargate/db.tf b/aws/wordpress_fargate/db.tf index c9b52a4..457a6b2 100644 --- a/aws/wordpress_fargate/db.tf +++ b/aws/wordpress_fargate/db.tf @@ -23,13 +23,11 @@ resource "aws_rds_cluster" "this" { min_capacity = var.db_min_capacity } final_snapshot_identifier = "${var.prefix}-${var.environment}-${random_string.snapshot_suffix.result}" - tags = var.tags } resource "aws_db_subnet_group" "this" { name = "${var.prefix}-${var.environment}" subnet_ids = module.vpc.private_subnets - tags = var.tags } resource "aws_security_group" "db" { @@ -52,19 +50,16 @@ resource "aws_security_group" "db" { lifecycle { create_before_destroy = true } - tags = var.tags } resource "aws_ssm_parameter" "db_master_user" { name = "/${var.prefix}/${var.environment}/db_master_user" type = "SecureString" value = var.db_master_username - tags = var.tags } resource "aws_ssm_parameter" "db_master_password" { name = "/${var.prefix}/${var.environment}/db_master_password" type = "SecureString" value = var.db_master_password - tags = var.tags } diff --git a/aws/wordpress_fargate/efs.tf b/aws/wordpress_fargate/efs.tf index 88ddae0..aa391b7 100644 --- a/aws/wordpress_fargate/efs.tf +++ b/aws/wordpress_fargate/efs.tf @@ -1,6 +1,5 @@ resource "aws_efs_file_system" "this" { creation_token = "${var.prefix}-${var.environment}" - tags = var.tags } resource "aws_efs_mount_target" "this" { @@ -30,5 +29,4 @@ resource "aws_security_group" "efs" { protocol = "tcp" self = true } - tags = var.tags } diff --git a/aws/wordpress_fargate/fargate.tf b/aws/wordpress_fargate/fargate.tf index 63f9015..75da1df 100644 --- a/aws/wordpress_fargate/fargate.tf +++ b/aws/wordpress_fargate/fargate.tf @@ -1,7 +1,6 @@ # Ref - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html resource "aws_iam_role" "task_execution_role" { name = "${var.prefix}-task-execution-role-${var.environment}" - tags = var.tags assume_role_policy = <