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

Revert - Update modules (the revert of the revert) #1534

Merged

Conversation

jzbahrai
Copy link
Contributor

Reverts #1526

The aws slack web hook is broking

@@ -44,12 +44,11 @@ resource "aws_s3_bucket_public_access_block" "csv_bucket" {
}

module "csv_bucket_logs" {
source = "github.com/cds-snc/terraform-modules//S3_log_bucket?ref=v6.1.5"
source = "github.com/cds-snc/terraform-modules//S3_log_bucket?ref=v6.0.3"

Choose a reason for hiding this comment

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

Reverting the module version from v6.1.5 to v6.0.3 might reintroduce bugs or remove features that were fixed or added in the newer version. Ensure that this change is intentional and that the older version meets all current requirements.


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"

Choose a reason for hiding this comment

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

The versioning_status parameter has been removed. If this was not intentional, please re-add it. If it was intentional, ensure that the bucket does not require versioning, as this could impact data recovery and retention policies.

@@ -219,12 +218,11 @@
}

module "document_download_logs" {
source = "github.com/cds-snc/terraform-modules//S3_log_bucket?ref=v6.1.5"
source = "github.com/cds-snc/terraform-modules//S3_log_bucket?ref=v6.0.3"

Choose a reason for hiding this comment

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

Reverting the module version from v6.1.5 to v6.0.3 might reintroduce bugs or remove features that were fixed or added in the newer version. Ensure that this change is intentional and that the older version meets all current requirements.


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"

Choose a reason for hiding this comment

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

The versioning_status attribute has been removed. If versioning is required for the S3 bucket, this change might cause issues. Verify if versioning is still needed and if it is managed elsewhere.

@@ -353,12 +351,11 @@
}

module "athena_logs_bucket" {
source = "github.com/cds-snc/terraform-modules//S3_log_bucket?ref=v6.1.5"
source = "github.com/cds-snc/terraform-modules//S3_log_bucket?ref=v6.0.3"

Choose a reason for hiding this comment

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

Reverting the module version from v6.1.5 to v6.0.3 may reintroduce bugs or remove features that were fixed or added in v6.1.5. Ensure that this change is intentional and that the older version meets all current requirements.

@@ -386,7 +382,7 @@
}

module "sns_sms_usage_report_bucket" {
source = "github.com/cds-snc/terraform-modules//S3?ref=v9.6.4"
source = "github.com/cds-snc/terraform-modules//S3?ref=v9.2.3"

Choose a reason for hiding this comment

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

Reverting the module version from v9.6.4 to v9.2.3 may reintroduce bugs or remove features that were fixed or added in the newer version. Ensure that this change is intentional and that the older version meets all current requirements.

@@ -466,7 +462,7 @@
aws = aws.us-west-2
}

source = "github.com/cds-snc/terraform-modules//S3?ref=v9.6.4"
source = "github.com/cds-snc/terraform-modules//S3?ref=v9.2.3"

Choose a reason for hiding this comment

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

Reverting the module version from v9.6.4 to v9.2.3 might reintroduce bugs or remove features that were fixed or added in the newer version. Ensure that this change is intentional and that any potential impacts are understood.

@@ -1,7 +1,7 @@
# Doc: https://registry.terraform.io/modules/terraform-aws-modules/notify-slack/aws/
module "notify_slack_warning" {
source = "terraform-aws-modules/notify-slack/aws"
version = "6.4.1"
version = "6.0.0"

Choose a reason for hiding this comment

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

Reverting the version from 6.4.1 to 6.0.0 might reintroduce bugs or remove features that were fixed or added in the newer version. Ensure that this change is intentional and that the older version is compatible with the rest of your infrastructure.

@@ -37,7 +37,7 @@

module "notify_slack_critical" {
source = "terraform-aws-modules/notify-slack/aws"
version = "6.4.1"
version = "6.0.0"

Choose a reason for hiding this comment

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

Reverting the version from 6.4.1 to 6.0.0 might reintroduce bugs or remove features that were fixed or added in the newer version. Ensure that this change is intentional and that the older version is compatible with your current setup.

@@ -56,7 +56,7 @@
# Shared generic slack webhook & topic.
module "notify_slack_general" {
source = "terraform-aws-modules/notify-slack/aws"
version = "6.4.1"
version = "6.0.0"

Choose a reason for hiding this comment

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

Reverting the version from 6.4.1 to 6.0.0 might reintroduce bugs or remove features that were fixed or added in the newer version. Please ensure that this change is necessary and that any potential issues with the older version have been considered.

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, 4 to destroy
Show summary
CHANGE NAME
recreate module.notify_slack_critical.module.lambda.null_resource.archive[0]
module.notify_slack_general.module.lambda.null_resource.archive[0]
module.notify_slack_ok.module.lambda.null_resource.archive[0]
module.notify_slack_warning.module.lambda.null_resource.archive[0]
add 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.local_file.archive_plan[0]
module.notify_slack_general.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"]
module.notify_slack_general.module.lambda.local_file.archive_plan[0]
module.notify_slack_ok.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"]
module.notify_slack_ok.module.lambda.local_file.archive_plan[0]
module.notify_slack_warning.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"]
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]
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[0] has moved to module.budget_notifier.aws_cloudwatch_event_rule.daily_budget_spend
    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[0] has moved to module.budget_notifier.aws_cloudwatch_event_rule.weekly_budget_spend
    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[0] has moved to module.budget_notifier.aws_cloudwatch_event_target.daily_budget_spend
    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[0] has moved to module.budget_notifier.aws_cloudwatch_event_target.weekly_budget_spend
    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-09-12T17:20:56.000+0000" -> (known after apply)
      ~ runtime                        = "nodejs20.x" -> "nodejs16.x"
      ~ source_code_hash               = "1vH83BDA1sIoBtTcwyvC2n+w932l6mJkelGZEWjy0pU=" -> "KqgaQgrKH72tPtzVxEXFeT0UIdVJmB8W7Q3/O5onycQ="
        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[0] has moved to module.budget_notifier.aws_lambda_permission.allow_daily_budget
    resource "aws_lambda_permission" "allow_daily_budget" {
        id            = "AllowDailyBudget"
        # (5 unchanged attributes hidden)
    }

  # module.budget_notifier.aws_lambda_permission.allow_weekly_budget[0] has moved to module.budget_notifier.aws_lambda_permission.allow_weekly_budget
    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] will be created
  + resource "aws_sns_topic_subscription" "sns_notify_slack" {
      + arn                             = (known after apply)
      + confirmation_timeout_in_minutes = 1
      + confirmation_was_authenticated  = (known after apply)
      + endpoint                        = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-critical"
      + endpoint_auto_confirms          = false
      + filter_policy_scope             = (known after apply)
      + id                              = (known after apply)
      + owner_id                        = (known after apply)
      + pending_confirmation            = (known after apply)
      + protocol                        = "lambda"
      + raw_message_delivery            = false
      + topic_arn                       = "arn:aws:sns:ca-central-1:239043911459:alert-critical"
    }

  # module.notify_slack_general.aws_sns_topic_subscription.sns_notify_slack[0] will be created
  + resource "aws_sns_topic_subscription" "sns_notify_slack" {
      + arn                             = (known after apply)
      + confirmation_timeout_in_minutes = 1
      + confirmation_was_authenticated  = (known after apply)
      + endpoint                        = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-general"
      + endpoint_auto_confirms          = false
      + filter_policy_scope             = (known after apply)
      + id                              = (known after apply)
      + owner_id                        = (known after apply)
      + pending_confirmation            = (known after apply)
      + protocol                        = "lambda"
      + raw_message_delivery            = false
      + topic_arn                       = "arn:aws:sns:ca-central-1:239043911459:alert-general"
    }

  # module.notify_slack_ok.aws_sns_topic_subscription.sns_notify_slack[0] will be created
  + resource "aws_sns_topic_subscription" "sns_notify_slack" {
      + arn                             = (known after apply)
      + confirmation_timeout_in_minutes = 1
      + confirmation_was_authenticated  = (known after apply)
      + endpoint                        = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-ok"
      + endpoint_auto_confirms          = false
      + filter_policy_scope             = (known after apply)
      + id                              = (known after apply)
      + owner_id                        = (known after apply)
      + pending_confirmation            = (known after apply)
      + protocol                        = "lambda"
      + raw_message_delivery            = false
      + topic_arn                       = "arn:aws:sns:ca-central-1:239043911459:alert-ok"
    }

  # module.notify_slack_warning.aws_sns_topic_subscription.sns_notify_slack[0] will be created
  + resource "aws_sns_topic_subscription" "sns_notify_slack" {
      + arn                             = (known after apply)
      + confirmation_timeout_in_minutes = 1
      + confirmation_was_authenticated  = (known after apply)
      + endpoint                        = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-warning"
      + endpoint_auto_confirms          = false
      + filter_policy_scope             = (known after apply)
      + id                              = (known after apply)
      + owner_id                        = (known after apply)
      + pending_confirmation            = (known after apply)
      + protocol                        = "lambda"
      + raw_message_delivery            = false
      + topic_arn                       = "arn:aws:sns:ca-central-1:239043911459:alert-warning"
    }

  # module.notify_slack_critical.module.lambda.aws_lambda_function.this[0] will be updated in-place
  ~ resource "aws_lambda_function" "this" {
        id                             = "notify-slack-critical"
      ~ qualified_arn                  = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-critical:10" -> (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:10/invocations" -> (known after apply)
      ~ runtime                        = "python3.11" -> "python3.8"
        tags                           = {}
      ~ version                        = "10" -> (known after apply)
        # (18 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.notify_slack_critical.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"] will be created
  + resource "aws_lambda_permission" "current_version_triggers" {
      + action              = "lambda:InvokeFunction"
      + function_name       = "notify-slack-critical"
      + id                  = (known after apply)
      + principal           = "sns.amazonaws.com"
      + qualifier           = (known after apply)
      + source_arn          = "arn:aws:sns:ca-central-1:239043911459:alert-critical"
      + statement_id        = "AllowExecutionFromSNS"
      + statement_id_prefix = (known after apply)
    }

  # 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/18468d9b9b27e11ad9afde31a6a9771f5e726075d8792ba12d455202868bcc35.zip"
              + runtime       = "python3.8"
            }
        )
      + 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/18468d9b9b27e11ad9afde31a6a9771f5e726075d8792ba12d455202868bcc35.plan.json"
      + id                   = (known after apply)
    }

  # module.notify_slack_critical.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "7533743913943756388" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "filename"  = "builds/1e622be40890679d302c03a6096c334d64151aab5aee3e073035598ee5e01db2.zip" -> "builds/18468d9b9b27e11ad9afde31a6a9771f5e726075d8792ba12d455202868bcc35.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" {
        id                             = "notify-slack-general"
      ~ qualified_arn                  = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-general:8" -> (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:8/invocations" -> (known after apply)
      ~ runtime                        = "python3.11" -> "python3.8"
        tags                           = {}
      ~ version                        = "8" -> (known after apply)
        # (18 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.notify_slack_general.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"] will be created
  + resource "aws_lambda_permission" "current_version_triggers" {
      + action              = "lambda:InvokeFunction"
      + function_name       = "notify-slack-general"
      + id                  = (known after apply)
      + principal           = "sns.amazonaws.com"
      + qualifier           = (known after apply)
      + source_arn          = "arn:aws:sns:ca-central-1:239043911459:alert-general"
      + statement_id        = "AllowExecutionFromSNS"
      + statement_id_prefix = (known after apply)
    }

  # 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/e8b93d66dbf2c7ef2479acf0c5f9890c23c1fcd432e81da57f3f5b5ec1061753.zip"
              + runtime       = "python3.8"
            }
        )
      + 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/e8b93d66dbf2c7ef2479acf0c5f9890c23c1fcd432e81da57f3f5b5ec1061753.plan.json"
      + id                   = (known after apply)
    }

  # module.notify_slack_general.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "1724043044147037235" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "filename"  = "builds/2c26292ef7673e1f67a17eeecb7e7e2729a987663fdec0eb8f3028fce40d5ab4.zip" -> "builds/e8b93d66dbf2c7ef2479acf0c5f9890c23c1fcd432e81da57f3f5b5ec1061753.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" {
        id                             = "notify-slack-ok"
      ~ qualified_arn                  = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-ok:4" -> (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:4/invocations" -> (known after apply)
      ~ runtime                        = "python3.11" -> "python3.8"
        tags                           = {}
      ~ version                        = "4" -> (known after apply)
        # (18 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.notify_slack_ok.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"] will be created
  + resource "aws_lambda_permission" "current_version_triggers" {
      + action              = "lambda:InvokeFunction"
      + function_name       = "notify-slack-ok"
      + id                  = (known after apply)
      + principal           = "sns.amazonaws.com"
      + qualifier           = (known after apply)
      + source_arn          = "arn:aws:sns:ca-central-1:239043911459:alert-ok"
      + statement_id        = "AllowExecutionFromSNS"
      + statement_id_prefix = (known after apply)
    }

  # 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/7877f6dfc99e932437e08c1de7ba322bc1d72a6f3fe5b5c5e8b6eacee4f239eb.zip"
              + runtime       = "python3.8"
            }
        )
      + 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/7877f6dfc99e932437e08c1de7ba322bc1d72a6f3fe5b5c5e8b6eacee4f239eb.plan.json"
      + id                   = (known after apply)
    }

  # module.notify_slack_ok.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "4872499417064595275" -> (known after apply)
      ~ triggers = { # forces replacement
          ~ "filename"  = "builds/c0bc8d02f0098b178b87a31e448515f17dfa6165f117bbeca9526aa66b9266f3.zip" -> "builds/7877f6dfc99e932437e08c1de7ba322bc1d72a6f3fe5b5c5e8b6eacee4f239eb.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" {
        id                             = "notify-slack-warning"
      ~ qualified_arn                  = "arn:aws:lambda:ca-central-1:239043911459:function:notify-slack-warning:10" -> (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:10/invocations" -> (known after apply)
      ~ runtime                        = "python3.11" -> "python3.8"
        tags                           = {}
      ~ version                        = "10" -> (known after apply)
        # (18 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.notify_slack_warning.module.lambda.aws_lambda_permission.current_version_triggers["AllowExecutionFromSNS"] will be created
  + resource "aws_lambda_permission" "current_version_triggers" {
      + action              = "lambda:InvokeFunction"
      + function_name       = "notify-slack-warning"
      + id                  = (known after apply)
      + principal           = "sns.amazonaws.com"
      + qualifier           = (known after apply)
      + source_arn          = "arn:aws:sns:ca-central-1:239043911459:alert-warning"
      + statement_id        = "AllowExecutionFromSNS"
      + statement_id_prefix = (known after apply)
    }

  # 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/b02ab3a0ae7399c2cfa86e739b9fa00da6ec254197e68e97db7a6f04baae10d0.zip"
              + runtime       = "python3.8"
            }
        )
      + 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/b02ab3a0ae7399c2cfa86e739b9fa00da6ec254197e68e97db7a6f04baae10d0.plan.json"
      + id                   = (known after apply)
    }

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

Plan: 16 to add, 5 to change, 4 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 69 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:...

@jzbahrai jzbahrai enabled auto-merge (squash) September 12, 2024 18:03
@P0NDER0SA P0NDER0SA self-requested a review September 12, 2024 18:04
Copy link
Contributor

@P0NDER0SA P0NDER0SA left a comment

Choose a reason for hiding this comment

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

Finally we fixed it! :)

@jzbahrai jzbahrai merged commit ea1e628 into main Sep 12, 2024
26 checks passed
@jzbahrai jzbahrai deleted the revert-1526-revert-1525-revert-1524-task/tf-module-updates branch September 12, 2024 18:05
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 - Cloudwatch log metric pattern is invalid: ["aws_cloudwatch_log_metric_filter.celery-error[0]"]
WARN - plan.json - main - Cloudwatch log metric pattern is invalid: ["aws_cloudwatch_log_metric_filter.scanfiles-timeout[0]"]
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...

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.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"]

39 tests, 19 passed, 20 warnings, 0 failures, 0 exceptions

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