Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update modules #1524

Merged
merged 2 commits into from
Sep 10, 2024
Merged

Update modules #1524

merged 2 commits into from
Sep 10, 2024

Conversation

jzbahrai
Copy link
Contributor

Summary | Résumé

Update modules


bucket_name = "notification-canada-ca-${var.env}-csv-upload-logs"
force_destroy = var.force_destroy_s3
billing_tag_value = "notification-canada-ca-${var.env}"
versioning_status = "Enabled"

lifecycle_rule = { "lifecycle_rule" : { "enabled" : "true", "expiration" : { "days" : "90" } } }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lifecycle_rule block should be properly indented for better readability. Consider aligning the nested elements.


bucket_name = "notification-canada-ca-${var.env}-document-download-logs"
force_destroy = var.force_destroy_s3
billing_tag_value = "notification-canada-ca-${var.env}"
versioning_status = "Enabled"

lifecycle_rule = { "lifecycle_rule" : { "enabled" : "true", "expiration" : { "days" : "90" } } }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lifecycle_rule attribute is defined as a map with a single key lifecycle_rule. This seems redundant and could be simplified. Consider defining lifecycle_rule directly as an object without the extra nesting.


bucket_name = "notification-canada-ca-${var.env}-athena-logs"
force_destroy = var.force_destroy_s3
billing_tag_value = "notification-canada-ca-${var.env}"
versioning_status = "Enabled"

lifecycle_rule = { "lifecycle_rule" : { "enabled" : "true", "expiration" : { "days" : "90" } } }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lifecycle_rule block is using a map with a single key-value pair. Consider simplifying it by directly defining the lifecycle rule without the extra map nesting.

count = var.create_cbs_bucket ? 1 : 0

bucket_name = var.cbs_satellite_bucket_name
force_destroy = var.force_destroy_s3
billing_tag_value = "notification-canada-ca-${var.env}"
attach_lb_log_delivery_policy = true
attach_elb_log_delivery_policy = true
versioning_status = "Enabled"

lifecycle_rule = { "lifecycle_rule" : { "enabled" : "true", "expiration" : { "days" : "90" } } }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lifecycle_rule block should be updated to use a list of maps instead of a single map. This ensures compatibility with the latest Terraform best practices and module expectations. Example:

lifecycle_rule = [
  {
    id      = "lifecycle_rule"
    enabled = true
    expiration = {
      days = 90
    }
  }
]

Copy link

Staging: common

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

⚠️   Warning: resources will be destroyed by this change!

Plan: 16 to add, 5 to change, 12 to destroy
Show summary
CHANGE NAME
add module.notify_slack_critical.module.lambda.local_file.archive_plan[0]
module.notify_slack_general.module.lambda.local_file.archive_plan[0]
module.notify_slack_ok.module.lambda.local_file.archive_plan[0]
module.notify_slack_warning.module.lambda.local_file.archive_plan[0]
update module.budget_notifier.aws_lambda_function.spend_notifier
module.notify_slack_critical.module.lambda.aws_lambda_function.this[0]
module.notify_slack_general.module.lambda.aws_lambda_function.this[0]
module.notify_slack_ok.module.lambda.aws_lambda_function.this[0]
module.notify_slack_warning.module.lambda.aws_lambda_function.this[0]
recreate module.notify_slack_critical.aws_sns_topic_subscription.sns_notify_slack[0]
module.notify_slack_general.aws_sns_topic_subscription.sns_notify_slack[0]
module.notify_slack_ok.aws_sns_topic_subscription.sns_notify_slack[0]
module.notify_slack_warning.aws_sns_topic_subscription.sns_notify_slack[0]
module.notify_slack_critical.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"]
module.notify_slack_critical.module.lambda.null_resource.archive[0]
module.notify_slack_general.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"]
module.notify_slack_general.module.lambda.null_resource.archive[0]
module.notify_slack_ok.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"]
module.notify_slack_ok.module.lambda.null_resource.archive[0]
module.notify_slack_warning.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"]
module.notify_slack_warning.module.lambda.null_resource.archive[0]
Show plan
Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.budget_notifier.aws_cloudwatch_event_rule.daily_budget_spend has moved to module.budget_notifier.aws_cloudwatch_event_rule.daily_budget_spend[0]
    resource "aws_cloudwatch_event_rule" "daily_budget_spend" {
        id                  = "dailyBudgetSpend"
        name                = "dailyBudgetSpend"
        tags                = {
            "CostCentre" = "notification-canada-ca-staging"
            "Terraform"  = "true"
        }
        # (6 unchanged attributes hidden)
    }

  # module.budget_notifier.aws_cloudwatch_event_rule.weekly_budget_spend has moved to module.budget_notifier.aws_cloudwatch_event_rule.weekly_budget_spend[0]
    resource "aws_cloudwatch_event_rule" "weekly_budget_spend" {
        id                  = "weeklyBudgetSpend"
        name                = "weeklyBudgetSpend"
        tags                = {
            "CostCentre" = "notification-canada-ca-staging"
            "Terraform"  = "true"
        }
        # (6 unchanged attributes hidden)
    }

  # module.budget_notifier.aws_cloudwatch_event_target.daily_budget_spend has moved to module.budget_notifier.aws_cloudwatch_event_target.daily_budget_spend[0]
    resource "aws_cloudwatch_event_target" "daily_budget_spend" {
        id             = "dailyBudgetSpend-terraform-20240327132210976400000004"
        # (5 unchanged attributes hidden)
    }

  # module.budget_notifier.aws_cloudwatch_event_target.weekly_budget_spend has moved to module.budget_notifier.aws_cloudwatch_event_target.weekly_budget_spend[0]
    resource "aws_cloudwatch_event_target" "weekly_budget_spend" {
        id             = "weeklyBudgetSpend-terraform-20240327132210976100000003"
        # (5 unchanged attributes hidden)
    }

  # module.budget_notifier.aws_lambda_function.spend_notifier will be updated in-place
  ~ resource "aws_lambda_function" "spend_notifier" {
        id                             = "spend_notifier"
      ~ last_modified                  = "2024-03-27T13:22:11.207+0000" -> (known after apply)
      ~ runtime                        = "nodejs16.x" -> "nodejs20.x"
      ~ source_code_hash               = "KqgaQgrKH72tPtzVxEXFeT0UIdVJmB8W7Q3/O5onycQ=" -> "1vH83BDA1sIoBtTcwyvC2n+w932l6mJkelGZEWjy0pU="
        tags                           = {
            "CostCentre" = "notification-canada-ca-staging"
            "Terraform"  = "true"
        }
        # (19 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.budget_notifier.aws_lambda_permission.allow_daily_budget has moved to module.budget_notifier.aws_lambda_permission.allow_daily_budget[0]
    resource "aws_lambda_permission" "allow_daily_budget" {
        id            = "AllowDailyBudget"
        # (5 unchanged attributes hidden)
    }

  # module.budget_notifier.aws_lambda_permission.allow_weekly_budget has moved to module.budget_notifier.aws_lambda_permission.allow_weekly_budget[0]
    resource "aws_lambda_permission" "allow_weekly_budget" {
        id            = "AllowWeeklyBudget"
        # (5 unchanged attributes hidden)
    }

  # module.notify_slack_critical.aws_sns_topic_subscription.sns_notify_slack[0] must be replaced
-/+ resource "aws_sns_topic_subscription" "sns_notify_slack" {
      ~ arn                             = "arn:aws:sns:ca-central-1:239043911459:alert-critical:6c7d5de1-8e32-40e5-9076-9756a5dbe28a" -> (known after apply)
      ~ confirmation_was_authenticated  = true -> (known after apply)
      ~ endpoint                        = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-critical" # forces replacement -> (known after apply) # forces replacement
      + filter_policy_scope             = (known after apply)
      ~ id                              = "arn:aws:sns:ca-central-1:239043911459:alert-critical:6c7d5de1-8e32-40e5-9076-9756a5dbe28a" -> (known after apply)
      ~ owner_id                        = "239043911459" -> (known after apply)
      ~ pending_confirmation            = false -> (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.notify_slack_general.aws_sns_topic_subscription.sns_notify_slack[0] must be replaced
-/+ resource "aws_sns_topic_subscription" "sns_notify_slack" {
      ~ arn                             = "arn:aws:sns:ca-central-1:239043911459:alert-general:8128f7d1-c66d-45f6-9141-ceeecd11ff16" -> (known after apply)
      ~ confirmation_was_authenticated  = true -> (known after apply)
      ~ endpoint                        = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-general" # forces replacement -> (known after apply) # forces replacement
      + filter_policy_scope             = (known after apply)
      ~ id                              = "arn:aws:sns:ca-central-1:239043911459:alert-general:8128f7d1-c66d-45f6-9141-ceeecd11ff16" -> (known after apply)
      ~ owner_id                        = "239043911459" -> (known after apply)
      ~ pending_confirmation            = false -> (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.notify_slack_ok.aws_sns_topic_subscription.sns_notify_slack[0] must be replaced
-/+ resource "aws_sns_topic_subscription" "sns_notify_slack" {
      ~ arn                             = "arn:aws:sns:ca-central-1:239043911459:alert-ok:cf13133b-532b-4f9a-a2ab-ecfb8e15eba1" -> (known after apply)
      ~ confirmation_was_authenticated  = true -> (known after apply)
      ~ endpoint                        = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-ok" # forces replacement -> (known after apply) # forces replacement
      + filter_policy_scope             = (known after apply)
      ~ id                              = "arn:aws:sns:ca-central-1:239043911459:alert-ok:cf13133b-532b-4f9a-a2ab-ecfb8e15eba1" -> (known after apply)
      ~ owner_id                        = "239043911459" -> (known after apply)
      ~ pending_confirmation            = false -> (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.notify_slack_warning.aws_sns_topic_subscription.sns_notify_slack[0] must be replaced
-/+ resource "aws_sns_topic_subscription" "sns_notify_slack" {
      ~ arn                             = "arn:aws:sns:ca-central-1:239043911459:alert-warning:8ebf5e3e-c9dc-4423-94e6-c3fa93d239d9" -> (known after apply)
      ~ confirmation_was_authenticated  = true -> (known after apply)
      ~ endpoint                        = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-warning" # forces replacement -> (known after apply) # forces replacement
      + filter_policy_scope             = (known after apply)
      ~ id                              = "arn:aws:sns:ca-central-1:239043911459:alert-warning:8ebf5e3e-c9dc-4423-94e6-c3fa93d239d9" -> (known after apply)
      ~ owner_id                        = "239043911459" -> (known after apply)
      ~ pending_confirmation            = false -> (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.notify_slack_critical.module.lambda.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
      ~ filename                       = "builds/18468d9b9b27e11ad9afde31a6a9771f5e726075d8792ba12d455202868bcc35.zip" -> "builds/1e622be40890679d302c03a6096c334d64151aab5aee3e073035598ee5e01db2.zip"
        id                             = "notify-slack-critical"
      ~ last_modified                  = "2023-10-17T15:16:39.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-critical:9" -> (known after apply)
      ~ qualified_invoke_arn           = "arn:aws:apigateway:ca-central-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-critical:9/invocations" -> (known after apply)
      ~ runtime                        = "python3.8" -> "python3.11"
        tags                           = {}
      ~ version                        = "9" -> (known after apply)
        # (16 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.notify_slack_critical.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
      ~ id                  = "AllowExecutionFromSNS" -> (known after apply)
      ~ qualifier           = "9" # forces replacement -> (known after apply) # forces replacement
      + statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.notify_slack_critical.module.lambda.local_file.archive_plan[0] will be created
  + resource "local_file" "archive_plan" {
      + content              = jsonencode(
            {
              + artifacts_dir = "builds"
              + build_plan    = [
                  + [
                      + "zip",
                      + ".terraform/modules/notify_slack_critical/functions/notify_slack.py",
                      + null,
                    ],
                ]
              + filename      = "builds/1e622be40890679d302c03a6096c334d64151aab5aee3e073035598ee5e01db2.zip"
              + runtime       = "python3.11"
            }
        )
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0755"
      + file_permission      = "0644"
      + filename             = "builds/1e622be40890679d302c03a6096c334d64151aab5aee3e073035598ee5e01db2.plan.json"
      + id                   = (known after apply)
    }

  # module.notify_slack_critical.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "2491829971522086453" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "filename"  = "builds/18468d9b9b27e11ad9afde31a6a9771f5e726075d8792ba12d455202868bcc35.zip" -> "builds/1e622be40890679d302c03a6096c334d64151aab5aee3e073035598ee5e01db2.zip"
            # (1 unchanged element hidden)
        }
    }

  # module.notify_slack_general.module.lambda.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
      ~ filename                       = "builds/e8b93d66dbf2c7ef2479acf0c5f9890c23c1fcd432e81da57f3f5b5ec1061753.zip" -> "builds/2c26292ef7673e1f67a17eeecb7e7e2729a987663fdec0eb8f3028fce40d5ab4.zip"
        id                             = "notify-slack-general"
      ~ last_modified                  = "2023-10-17T15:19:25.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-general:7" -> (known after apply)
      ~ qualified_invoke_arn           = "arn:aws:apigateway:ca-central-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-general:7/invocations" -> (known after apply)
      ~ runtime                        = "python3.8" -> "python3.11"
        tags                           = {}
      ~ version                        = "7" -> (known after apply)
        # (16 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.notify_slack_general.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
      ~ id                  = "AllowExecutionFromSNS" -> (known after apply)
      ~ qualifier           = "7" # forces replacement -> (known after apply) # forces replacement
      + statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.notify_slack_general.module.lambda.local_file.archive_plan[0] will be created
  + resource "local_file" "archive_plan" {
      + content              = jsonencode(
            {
              + artifacts_dir = "builds"
              + build_plan    = [
                  + [
                      + "zip",
                      + ".terraform/modules/notify_slack_general/functions/notify_slack.py",
                      + null,
                    ],
                ]
              + filename      = "builds/2c26292ef7673e1f67a17eeecb7e7e2729a987663fdec0eb8f3028fce40d5ab4.zip"
              + runtime       = "python3.11"
            }
        )
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0755"
      + file_permission      = "0644"
      + filename             = "builds/2c26292ef7673e1f67a17eeecb7e7e2729a987663fdec0eb8f3028fce40d5ab4.plan.json"
      + id                   = (known after apply)
    }

  # module.notify_slack_general.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "9152839017737369376" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "filename"  = "builds/e8b93d66dbf2c7ef2479acf0c5f9890c23c1fcd432e81da57f3f5b5ec1061753.zip" -> "builds/2c26292ef7673e1f67a17eeecb7e7e2729a987663fdec0eb8f3028fce40d5ab4.zip"
            # (1 unchanged element hidden)
        }
    }

  # module.notify_slack_ok.module.lambda.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
      ~ filename                       = "builds/7877f6dfc99e932437e08c1de7ba322bc1d72a6f3fe5b5c5e8b6eacee4f239eb.zip" -> "builds/c0bc8d02f0098b178b87a31e448515f17dfa6165f117bbeca9526aa66b9266f3.zip"
        id                             = "notify-slack-ok"
      ~ last_modified                  = "2023-10-17T15:19:36.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-ok:3" -> (known after apply)
      ~ qualified_invoke_arn           = "arn:aws:apigateway:ca-central-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-ok:3/invocations" -> (known after apply)
      ~ runtime                        = "python3.8" -> "python3.11"
        tags                           = {}
      ~ version                        = "3" -> (known after apply)
        # (16 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.notify_slack_ok.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
      ~ id                  = "AllowExecutionFromSNS" -> (known after apply)
      ~ qualifier           = "3" # forces replacement -> (known after apply) # forces replacement
      + statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.notify_slack_ok.module.lambda.local_file.archive_plan[0] will be created
  + resource "local_file" "archive_plan" {
      + content              = jsonencode(
            {
              + artifacts_dir = "builds"
              + build_plan    = [
                  + [
                      + "zip",
                      + ".terraform/modules/notify_slack_ok/functions/notify_slack.py",
                      + null,
                    ],
                ]
              + filename      = "builds/c0bc8d02f0098b178b87a31e448515f17dfa6165f117bbeca9526aa66b9266f3.zip"
              + runtime       = "python3.11"
            }
        )
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0755"
      + file_permission      = "0644"
      + filename             = "builds/c0bc8d02f0098b178b87a31e448515f17dfa6165f117bbeca9526aa66b9266f3.plan.json"
      + id                   = (known after apply)
    }

  # module.notify_slack_ok.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "7235087564732725810" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "filename"  = "builds/7877f6dfc99e932437e08c1de7ba322bc1d72a6f3fe5b5c5e8b6eacee4f239eb.zip" -> "builds/c0bc8d02f0098b178b87a31e448515f17dfa6165f117bbeca9526aa66b9266f3.zip"
            # (1 unchanged element hidden)
        }
    }

  # module.notify_slack_warning.module.lambda.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
      ~ filename                       = "builds/b02ab3a0ae7399c2cfa86e739b9fa00da6ec254197e68e97db7a6f04baae10d0.zip" -> "builds/19863096150fa1a6df6f86bf4faddd68a0875c2a3c199bd42c44f533dcd009d3.zip"
        id                             = "notify-slack-warning"
      ~ last_modified                  = "2023-10-17T15:19:31.000+0000" -> (known after apply)
      ~ qualified_arn                  = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-warning:9" -> (known after apply)
      ~ qualified_invoke_arn           = "arn:aws:apigateway:ca-central-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-warning:9/invocations" -> (known after apply)
      ~ runtime                        = "python3.8" -> "python3.11"
        tags                           = {}
      ~ version                        = "9" -> (known after apply)
        # (16 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.notify_slack_warning.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"] must be replaced
-/+ resource "aws_lambda_permission" "current_version_triggers" {
      ~ id                  = "AllowExecutionFromSNS" -> (known after apply)
      ~ qualifier           = "9" # forces replacement -> (known after apply) # forces replacement
      + statement_id_prefix = (known after apply)
        # (5 unchanged attributes hidden)
    }

  # module.notify_slack_warning.module.lambda.local_file.archive_plan[0] will be created
  + resource "local_file" "archive_plan" {
      + content              = jsonencode(
            {
              + artifacts_dir = "builds"
              + build_plan    = [
                  + [
                      + "zip",
                      + ".terraform/modules/notify_slack_warning/functions/notify_slack.py",
                      + null,
                    ],
                ]
              + filename      = "builds/19863096150fa1a6df6f86bf4faddd68a0875c2a3c199bd42c44f533dcd009d3.zip"
              + runtime       = "python3.11"
            }
        )
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0755"
      + file_permission      = "0644"
      + filename             = "builds/19863096150fa1a6df6f86bf4faddd68a0875c2a3c199bd42c44f533dcd009d3.plan.json"
      + id                   = (known after apply)
    }

  # module.notify_slack_warning.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "4481870494764080287" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "filename"  = "builds/b02ab3a0ae7399c2cfa86e739b9fa00da6ec254197e68e97db7a6f04baae10d0.zip" -> "builds/19863096150fa1a6df6f86bf4faddd68a0875c2a3c199bd42c44f533dcd009d3.zip"
            # (1 unchanged element hidden)
        }
    }

Plan: 16 to add, 5 to change, 12 to destroy.

Warning: Argument is deprecated

  with aws_s3_bucket.csv_bucket,
  on s3.tf line 5, in resource "aws_s3_bucket" "csv_bucket":
   5: resource "aws_s3_bucket" "csv_bucket" {

Use the aws_s3_bucket_server_side_encryption_configuration resource instead

(and 65 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_athena_workgroup.ad_hoc"]
WARN - plan.json - main - Missing Common Tags: ["aws_athena_workgroup.build_tables"]
WARN - plan.json - main - Missing Common Tags: ["aws_athena_workgroup.primary"]
WARN - plan.json - main - Missing Common Tags: ["aws_athena_workgroup.support"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.aws_health[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.route53_resolver_query_log[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.sns_deliveries[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.sns_deliveries_failures[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.sns_deliveries_failures_us_west_2[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.sns_deliveries_us_west_2[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-bulk-not-being-processed-critical[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-bulk-not-being-processed-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-inflights-not-being-processed-critical[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-inflights-not-being-processed-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-not-being-processed-critical[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.bulk-not-being-processed-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.contact-3-500-error-15-minutes-critical[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.document-download-bucket-size-warning[0]"]
WARN - plan.json - main - Missing Common Tags:...

Copy link
Contributor

@ben851 ben851 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

Copy link

Staging: eks

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

Plan: 0 to add, 1 to change, 0 to destroy
Show summary
CHANGE NAME
update aws_cloudwatch_metric_alarm.service-callback-too-many-failures-critical[0]
Show plan
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # aws_cloudwatch_metric_alarm.service-callback-too-many-failures-critical[0] will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "service-callback-too-many-failures-critical" {
      ~ alarm_actions             = [
          - "arn:aws:sns:ca-central-1:239043911459:alert-warning",
          + "arn:aws:sns:ca-central-1:239043911459:alert-critical",
        ]
      ~ alarm_description         = "Service reached the max number of callback retries 25 times in 5 minutes" -> "Service reached the max number of callback retries 100 times in 10 minutes"
        id                        = "service-callback-too-many-failures-warning"
      ~ period                    = 300 -> 600
        tags                      = {}
      ~ threshold                 = 25 -> 100
        # (14 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.client_vpn"]
WARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.notification-canada-ca"]
WARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.notification-canada-ca-alt[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_acmpca_certificate_authority.client_vpn"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb.notification-canada-ca"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_listener.internal_alb_tls"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_listener.notification-canada-ca"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.internal_nginx_http"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-admin"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-api"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-document"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-document-api"]
WARN - plan.json - main - Missing Common Tags: ["aws_alb_target_group.notification-canada-ca-documentation"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.notification-canada-ca-eks-application-logs[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.notification-canada-ca-eks-cluster-logs[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.notification-canada-ca-eks-prometheus-logs[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.admin-evicted-pods[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.admin-pods-high-cpu-warning[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.admin-pods-high-memory-warning[0]"]
WARN - plan.json - main - Missing Common Tags:...

@jzbahrai jzbahrai merged commit 29698d5 into main Sep 10, 2024
21 checks passed
@jzbahrai jzbahrai deleted the task/tf-module-updates branch September 10, 2024 18:25
Copy link

Staging: quicksight

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

Plan: 0 to add, 1 to change, 0 to destroy
Show summary
CHANGE NAME
update aws_s3_object.manifest_file
Show plan
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # aws_s3_object.manifest_file will be updated in-place
  ~ resource "aws_s3_object" "manifest_file" {
      ~ etag                   = "4f558e8d8cdbbf914a95755cbda61968" -> "221f592f333f2fc284626cfdb8c4bc80"
        id                     = "quicksight/s3-manifest-sms-usage.json"
        tags                   = {}
      + version_id             = (known after apply)
        # (11 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_cloudformation_stack.sms-usage-notifications"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.quicksight-rds"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.quicksight-s3-usage"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.quicksight_vpc_connection_ec2"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.quicksight_vpc_connection_iam"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.quicksight"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.vpc_connection_role"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.jobs"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.login_events"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.notifications"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.organisation"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.send_rate"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.services"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.sms_usage"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.template-category-history"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.templates"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_set.users"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_source.rds"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_data_source.s3_sms_usage"]
WARN - plan.json - main - Missing Common Tags: ["aws_quicksight_vpc_connection.rds"]
WARN - plan.json - main - Missing Common Tags: ["aws_s3_object.manifest_file"]

40 tests, 19 passed, 21 warnings, 0 failures, 0 exceptions

jzbahrai added a commit that referenced this pull request Sep 10, 2024
jzbahrai added a commit that referenced this pull request Sep 10, 2024
jzbahrai added a commit that referenced this pull request Sep 10, 2024
jzbahrai added a commit that referenced this pull request Sep 12, 2024
jzbahrai added a commit that referenced this pull request Sep 12, 2024
jzbahrai added a commit that referenced this pull request Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants