From 38d367ffe96a647e582c3829c9c8d5b48e291be5 Mon Sep 17 00:00:00 2001 From: Jan David Date: Wed, 17 Jul 2024 16:01:55 +0200 Subject: [PATCH 1/2] Remove warning for unnecessary lifecycle rule The `latest_restorable_time` cannot be compared between Terraform plans anyways and thus doesn't need to be ignored. Terraform started printing a warning for this configuration, so the attribute has been removed. In its place, the engine version of the database is being ignored since it is periodically updated manually through the AWS console. --- terraform/docs-rs/rds.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/docs-rs/rds.tf b/terraform/docs-rs/rds.tf index 58dd69f07..7c5c7bed7 100644 --- a/terraform/docs-rs/rds.tf +++ b/terraform/docs-rs/rds.tf @@ -82,7 +82,7 @@ resource "aws_db_instance" "db" { lifecycle { ignore_changes = [ - latest_restorable_time + engine_version, ] } } From ce143ba4bdaad9dd321accbfb2cc5ac7b531f1fa Mon Sep 17 00:00:00 2001 From: Jan David Date: Wed, 17 Jul 2024 16:28:40 +0200 Subject: [PATCH 2/2] Fix value for allowed methods AWS only allows three different sets of methods as values for the `allowed_methods` field. Adding the `POST` method requires to also allow the other methods. --- terraform/docs-rs/cloudfront.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/docs-rs/cloudfront.tf b/terraform/docs-rs/cloudfront.tf index f0e5c850d..6a8bd991a 100644 --- a/terraform/docs-rs/cloudfront.tf +++ b/terraform/docs-rs/cloudfront.tf @@ -90,7 +90,7 @@ resource "aws_cloudfront_distribution" "webapp" { default_cache_behavior { target_origin_id = "ec2" - allowed_methods = ["GET", "HEAD", "OPTIONS", "POST"] + allowed_methods = ["GET", "HEAD", "OPTIONS", "DELETE", "PATCH", "POST", "PUT"] cached_methods = ["GET", "HEAD", "OPTIONS"] compress = true viewer_protocol_policy = "redirect-to-https"