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

fix: opsgenie integration healthcheck #379

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Conversation

patheard
Copy link
Member

@patheard patheard commented Jan 24, 2024

Summary

Update to an API entpoint that the bot's Team API key can access.

Move the API call into the try block so that a request failure is
properly identified as a failed healthcheck.

Update the CloudWatch alarms to trigger more generically for errors, warnings
and exceptions.

Related

Update to an API entpoint that the bot's Team API key can access.

Move the API call into the try block so that a request failure is
properly identified as a failed healthcheck.
@patheard patheard self-assigned this Jan 24, 2024
@patheard patheard requested a review from a team January 24, 2024 20:44
Make the alarms trigger for all `ERROR`, `Exception` and `WARNING` strings.
Copy link

Production: terraform

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

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

Plan: 1 to add, 38 to change, 1 to destroy
Show summary
CHANGE NAME
update aws_cloudwatch_log_group.sre-bot_group
aws_cloudwatch_log_metric_filter.sre_bot_error
aws_cloudwatch_log_metric_filter.sre_bot_warning
aws_cloudwatch_metric_alarm.sre_bot_error
aws_cloudwatch_metric_alarm.sre_bot_warning
aws_ecr_repository.sre-bot
aws_ecs_cluster.sre-bot
aws_ecs_service.main
aws_iam_policy.sre-bot_secrets_manager
aws_lb.sre_bot
aws_lb_listener.sre_bot_listener
aws_lb_target_group.sre_bot
aws_security_group.ecs_tasks
aws_security_group.sre_bot_load_balancer
aws_sns_topic.cloudwatch_warning
aws_ssm_parameter.google_oauth_pickle_string
module.vpc.aws_default_network_acl.default
module.vpc.aws_default_route_table.default
module.vpc.aws_default_security_group.default
module.vpc.aws_eip.nat[0]
module.vpc.aws_eip.nat[1]
module.vpc.aws_eip.nat[2]
module.vpc.aws_internet_gateway.gw
module.vpc.aws_nat_gateway.nat_gw[0]
module.vpc.aws_nat_gateway.nat_gw[1]
module.vpc.aws_nat_gateway.nat_gw[2]
module.vpc.aws_network_acl.main
module.vpc.aws_route_table.private[0]
module.vpc.aws_route_table.private[1]
module.vpc.aws_route_table.private[2]
module.vpc.aws_route_table.public
module.vpc.aws_subnet.private[0]
module.vpc.aws_subnet.private[1]
module.vpc.aws_subnet.private[2]
module.vpc.aws_subnet.public[0]
module.vpc.aws_subnet.public[1]
module.vpc.aws_subnet.public[2]
module.vpc.aws_vpc.main
recreate aws_ecs_task_definition.sre-bot

✂   Warning: plan has been truncated! See the full plan in the logs.

Show plan
Resource actions are indicated with the following symbols:
  ~ update in-place
-/+ destroy and then create replacement
 <= read (data resources)

Terraform will perform the following actions:

  # data.aws_iam_policy_document.sre-bot_secrets_manager will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "aws_iam_policy_document" "sre-bot_secrets_manager" {
      + id   = (known after apply)
      + json = (known after apply)

      + statement {
          + actions   = [
              + "sts:AssumeRole",
            ]
          + effect    = "Allow"
          + resources = [
              + "arn:aws:iam::274536870005:role/sre_bot_role",
              + "arn:aws:iam::659087519042:role/sre_bot_role",
              + "arn:aws:iam::886481071419:role/sre_bot_role",
            ]
        }
      + statement {
          + actions   = [
              + "ssm:GetParameters",
            ]
          + effect    = "Allow"
          + resources = [
              + "arn:aws:ssm:ca-central-1:283582579564:parameter/google_oauth_pickle_string",
              + "arn:aws:ssm:ca-central-1:283582579564:parameter/sre-bot-config",
            ]
        }
      + statement {
          + actions   = [
              + "dynamodb:DeleteItem",
              + "dynamodb:GetItem",
              + "dynamodb:PutItem",
              + "dynamodb:Query",
              + "dynamodb:Scan",
              + "dynamodb:UpdateItem",
            ]
          + effect    = "Allow"
          + resources = [
              + "arn:aws:dynamodb:ca-central-1:283582579564:table/aws_access_requests",
              + "arn:aws:dynamodb:ca-central-1:283582579564:table/webhooks",
            ]
        }
    }

  # data.template_file.sre-bot will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "template_file" "sre-bot" {
      + id       = (known after apply)
      + rendered = (known after apply)
      + template = jsonencode(
            [
              + {
                  + image            = "${image}"
                  + linuxParameters  = {
                      + capabilities = {
                          + drop = [
                              + "ALL",
                            ]
                        }
                    }
                  + logConfiguration = {
                      + logDriver = "awslogs"
                      + options   = {
                          + awslogs-group         = "${awslogs-group}"
                          + awslogs-region        = "${awslogs-region}"
                          + awslogs-stream-prefix = "${awslogs-stream-prefix}"
                        }
                    }
                  + name             = "sre-bot"
                  + portMappings     = [
                      + {
                          + containerPort = 8000
                        },
                    ]
                  + secrets          = [
                      + {
                          + name      = "PICKLE_STRING"
                          + valueFrom = "${PICKLE_STRING}"
                        },
                    ]
                  + ulimits          = [
                      + {
                          + hardLimit = 1000000
                          + name      = "nofile"
                          + softLimit = 1000000
                        },
                    ]
                },
            ]
        )
      + vars     = {
          + "PICKLE_STRING"         = "arn:aws:ssm:ca-central-1:283582579564:parameter/google_oauth_pickle_string"
          + "aws_region"            = "ca-central-1"
          + "awslogs-group"         = "/ecs/sre-bot-app"
          + "awslogs-region"        = "ca-central-1"
          + "awslogs-stream-prefix" = "ecs-sre-bot"
          + "fargate_cpu"           = "256"
          + "fargate_memory"        = "512"
          + "image"                 = "283582579564.dkr.ecr.ca-central-1.amazonaws.com/sre-bot:latest"
        }
    }

  # aws_cloudwatch_log_group.sre-bot_group will be updated in-place
  ~ resource "aws_cloudwatch_log_group" "sre-bot_group" {
        id                = "/ecs/sre-bot-app"
        name              = "/ecs/sre-bot-app"
      ~ tags              = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
      ~ tags_all          = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
        # (4 unchanged attributes hidden)
    }

  # aws_cloudwatch_log_metric_filter.sre_bot_error will be updated in-place
  ~ resource "aws_cloudwatch_log_metric_filter" "sre_bot_error" {
        id             = "SREBotErrorLogged"
        name           = "SREBotErrorLogged"
      ~ pattern        = "\"ERROR:slack_bolt.App\"" -> "?ERROR ?Exception"
        # (1 unchanged attribute hidden)

        # (1 unchanged block hidden)
    }

  # aws_cloudwatch_log_metric_filter.sre_bot_warning will be updated in-place
  ~ resource "aws_cloudwatch_log_metric_filter" "sre_bot_warning" {
        id             = "SREBotWarningLogged"
        name           = "SREBotWarningLogged"
      ~ pattern        = "\"WARNING:slack_bolt.App\"" -> "WARNING"
        # (1 unchanged attribute hidden)

        # (1 unchanged block hidden)
    }

  # aws_cloudwatch_metric_alarm.sre_bot_error will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "sre_bot_error" {
        id                        = "SRE Bot Errors"
      ~ tags                      = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
        }
      ~ tags_all                  = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6"
        } -> (known after apply)
        # (17 unchanged attributes hidden)
    }

  # aws_cloudwatch_metric_alarm.sre_bot_warning will be updated in-place
  ~ resource "aws_cloudwatch_metric_alarm" "sre_bot_warning" {
        id                        = "SRE Bot Warnings"
      ~ tags                      = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
        }
      ~ tags_all                  = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6"
        } -> (known after apply)
        # (17 unchanged attributes hidden)
    }

  # aws_ecr_repository.sre-bot will be updated in-place
  ~ resource "aws_ecr_repository" "sre-bot" {
        id                   = "sre-bot"
        name                 = "sre-bot"
      ~ tags                 = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
        }
      ~ tags_all             = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6"
        } -> (known after apply)
        # (4 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # aws_ecs_cluster.sre-bot will be updated in-place
  ~ resource "aws_ecs_cluster" "sre-bot" {
        id       = "arn:aws:ecs:ca-central-1:283582579564:cluster/sre-bot-cluster"
        name     = "sre-bot-cluster"
      ~ tags     = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
        }
      ~ tags_all = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6"
        } -> (known after apply)
        # (1 unchanged attribute hidden)

        # (1 unchanged block hidden)
    }

  # aws_ecs_service.main will be updated in-place
  ~ resource "aws_ecs_service" "main" {
        id                                 = "arn:aws:ecs:ca-central-1:283582579564:service/sre-bot-cluster/sre-bot-service"
        name                               = "sre-bot-service"
      ~ tags                               = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
      ~ tags_all                           = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
      ~ task_definition                    = "arn:aws:ecs:ca-central-1:283582579564:task-definition/sre-bot-task:15" -> (known after apply)
        # (14 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.sre-bot must be replaced
-/+ resource "aws_ecs_task_definition" "sre-bot" {
      ~ arn                      = "arn:aws:ecs:ca-central-1:283582579564:task-definition/sre-bot-task:15" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:ca-central-1:283582579564:task-definition/sre-bot-task" -> (known after apply)
      ~ container_definitions    = jsonencode(
            [
              - {
                  - cpu              = 0
                  - environment      = []
                  - essential        = true
                  - image            = "283582579564.dkr.ecr.ca-central-1.amazonaws.com/sre-bot:latest"
                  - linuxParameters  = {
                      - capabilities = {
                          - drop = [
                              - "ALL",
                            ]
                        }
                    }
                  - logConfiguration = {
                      - logDriver = "awslogs"
                      - options   = {
                          - awslogs-group         = "/ecs/sre-bot-app"
                          - awslogs-region        = "ca-central-1"
                          - awslogs-stream-prefix = "ecs-sre-bot"
                        }
                    }
                  - mountPoints      = []
                  - name             = "sre-bot"
                  - portMappings     = [
                      - {
                          - containerPort = 8000
                          - hostPort      = 8000
                          - protocol      = "tcp"
                        },
                    ]
                  - secrets          = [
                      - {
                          - name      = "PICKLE_STRING"
                          - valueFrom = "arn:aws:ssm:ca-central-1:283582579564:parameter/google_oauth_pickle_string"
                        },
                    ]
                  - ulimits          = [
                      - {
                          - hardLimit = 1000000
                          - name      = "nofile"
                          - softLimit = 1000000
                        },
                    ]
                  - volumesFrom      = []
                },
            ]
        ) -> (known after apply) # forces replacement
      ~ id                       = "sre-bot-task" -> (known after apply)
      ~ revision                 = 15 -> (known after apply)
      - tags                     = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6"
        } -> null
      ~ tags_all                 = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6"
        } -> (known after apply)
        # (8 unchanged attributes hidden)
    }

  # aws_iam_policy.sre-bot_secrets_manager will be updated in-place
  ~ resource "aws_iam_policy" "sre-bot_secrets_manager" {
        id        = "arn:aws:iam::283582579564:policy/sre-botSecretsManagerKeyRetrieval"
        name      = "sre-botSecretsManagerKeyRetrieval"
      ~ policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "sts:AssumeRole"
                      - Effect   = "Allow"
                      - Resource = [
                          - "arn:aws:iam::886481071419:role/sre_bot_role",
                          - "arn:aws:iam::659087519042:role/sre_bot_role",
                          - "arn:aws:iam::274536870005:role/sre_bot_role",
                        ]
                    },
                  - {
                      - Action   = "ssm:GetParameters"
                      - Effect   = "Allow"
                      - Resource = [
                          - "arn:aws:ssm:ca-central-1:283582579564:parameter/sre-bot-config",
                          - "arn:aws:ssm:ca-central-1:283582579564:parameter/google_oauth_pickle_string",
                        ]
                    },
                  - {
                      - Action   = [
                          - "dynamodb:UpdateItem",
                          - "dynamodb:Scan",
                          - "dynamodb:Query",
                          - "dynamodb:PutItem",
                          - "dynamodb:GetItem",
                          - "dynamodb:DeleteItem",
                        ]
                      - Effect   = "Allow"
                      - Resource = [
                          - "arn:aws:dynamodb:ca-central-1:283582579564:table/webhooks",
                          - "arn:aws:dynamodb:ca-central-1:283582579564:table/aws_access_requests",
                        ]
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> (known after apply)
      ~ tags      = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
        }
      ~ tags_all  = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6"
        } -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # aws_lb.sre_bot will be updated in-place
  ~ resource "aws_lb" "sre_bot" {
        id                                          = "arn:aws:elasticloadbalancing:ca-central-1:283582579564:loadbalancer/app/sre-bot/ffb0cf10e879efc8"
        name                                        = "sre-bot"
      ~ tags                                        = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
      ~ tags_all                                    = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
        # (21 unchanged attributes hidden)

        # (5 unchanged blocks hidden)
    }

  # aws_lb_listener.sre_bot_listener will be updated in-place
  ~ resource "aws_lb_listener" "sre_bot_listener" {
        id                = "arn:aws:elasticloadbalancing:ca-central-1:283582579564:listener/app/sre-bot/ffb0cf10e879efc8/0fb3dc3ef78c3383"
      ~ tags              = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
        }
      ~ tags_all          = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6"
        } -> (known after apply)
        # (6 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # aws_lb_target_group.sre_bot will be updated in-place
  ~ resource "aws_lb_target_group" "sre_bot" {
        id                                 = "arn:aws:elasticloadbalancing:ca-central-1:283582579564:targetgroup/sre-bot/e80fba0f7a33fd0a"
        name                               = "sre-bot"
      ~ tags                               = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
      ~ tags_all                           = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
        # (16 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # aws_security_group.ecs_tasks will be updated in-place
  ~ resource "aws_security_group" "ecs_tasks" {
        id                     = "sg-0a1f948a7bae7d732"
        name                   = "sre-bot-security-group"
      ~ tags                   = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
      ~ tags_all               = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
        # (7 unchanged attributes hidden)
    }

  # aws_security_group.sre_bot_load_balancer will be updated in-place
  ~ resource "aws_security_group" "sre_bot_load_balancer" {
        id                     = "sg-06bad58c956021774"
        name                   = "SRE Bot load balancer"
      ~ tags                   = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
      ~ tags_all               = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (1 unchanged element hidden)
        }
        # (7 unchanged attributes hidden)
    }

  # aws_sns_topic.cloudwatch_warning will be updated in-place
  ~ resource "aws_sns_topic" "cloudwatch_warning" {
        id                                       = "arn:aws:sns:ca-central-1:283582579564:sre-bot-cloudwatch-alarms-warning"
        name                                     = "sre-bot-cloudwatch-alarms-warning"
      ~ tags                                     = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (2 unchanged elements hidden)
        }
      ~ tags_all                                 = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (2 unchanged elements hidden)
        }
        # (11 unchanged attributes hidden)
    }

  # aws_ssm_parameter.google_oauth_pickle_string will be updated in-place
  ~ resource "aws_ssm_parameter" "google_oauth_pickle_string" {
        id              = "google_oauth_pickle_string"
        name            = "google_oauth_pickle_string"
      ~ tags            = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (2 unchanged elements hidden)
        }
      ~ tags_all        = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (2 unchanged elements hidden)
        }
        # (9 unchanged attributes hidden)
    }

  # module.vpc.aws_default_network_acl.default will be updated in-place
  ~ resource "aws_default_network_acl" "default" {
        id                     = "acl-01bdccdc7b72d3084"
      ~ tags                   = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all               = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (5 unchanged attributes hidden)
    }

  # module.vpc.aws_default_route_table.default will be updated in-place
  ~ resource "aws_default_route_table" "default" {
        id                     = "rtb-0583322158b188399"
      ~ tags                   = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all               = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (6 unchanged attributes hidden)
    }

  # module.vpc.aws_default_security_group.default will be updated in-place
  ~ resource "aws_default_security_group" "default" {
        id                     = "sg-0e1bc3503ee4122ea"
        name                   = "default"
      ~ tags                   = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all               = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (7 unchanged attributes hidden)
    }

  # module.vpc.aws_eip.nat[0] will be updated in-place
  ~ resource "aws_eip" "nat" {
        id                   = "eipalloc-070ffb860fe177aca"
      ~ tags                 = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all             = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (11 unchanged attributes hidden)
    }

  # module.vpc.aws_eip.nat[1] will be updated in-place
  ~ resource "aws_eip" "nat" {
        id                   = "eipalloc-01914de6180060278"
      ~ tags                 = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all             = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (11 unchanged attributes hidden)
    }

  # module.vpc.aws_eip.nat[2] will be updated in-place
  ~ resource "aws_eip" "nat" {
        id                   = "eipalloc-0523e930cc55a7e58"
      ~ tags                 = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all             = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (11 unchanged attributes hidden)
    }

  # module.vpc.aws_internet_gateway.gw will be updated in-place
  ~ resource "aws_internet_gateway" "gw" {
        id       = "igw-0e53f05aa969fbf36"
      ~ tags     = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (3 unchanged attributes hidden)
    }

  # module.vpc.aws_nat_gateway.nat_gw[0] will be updated in-place
  ~ resource "aws_nat_gateway" "nat_gw" {
        id                                 = "nat-0e391b5e2302b362e"
      ~ tags                               = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all                           = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (10 unchanged attributes hidden)
    }

  # module.vpc.aws_nat_gateway.nat_gw[1] will be updated in-place
  ~ resource "aws_nat_gateway" "nat_gw" {
        id                                 = "nat-0a6ae9ec174a0ff21"
      ~ tags                               = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all                           = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (10 unchanged attributes hidden)
    }

  # module.vpc.aws_nat_gateway.nat_gw[2] will be updated in-place
  ~ resource "aws_nat_gateway" "nat_gw" {
        id                                 = "nat-03d11fcf192a3acc6"
      ~ tags                               = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all                           = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (10 unchanged attributes hidden)
    }

  # module.vpc.aws_network_acl.main will be updated in-place
  ~ resource "aws_network_acl" "main" {
        id         = "acl-0a967fedfac4a3059"
      ~ tags       = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all   = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (6 unchanged attributes hidden)
    }

  # module.vpc.aws_route_table.private[0] will be updated in-place
  ~ resource "aws_route_table" "private" {
        id               = "rtb-0c16c63ac89aee498"
      ~ tags             = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all         = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (5 unchanged attributes hidden)
    }

  # module.vpc.aws_route_table.private[1] will be updated in-place
  ~ resource "aws_route_table" "private" {
        id               = "rtb-0b3b508aa3bba8614"
      ~ tags             = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all         = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (5 unchanged attributes hidden)
    }

  # module.vpc.aws_route_table.private[2] will be updated in-place
  ~ resource "aws_route_table" "private" {
        id               = "rtb-0964192d93a273896"
      ~ tags             = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all         = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (5 unchanged attributes hidden)
    }

  # module.vpc.aws_route_table.public will be updated in-place
  ~ resource "aws_route_table" "public" {
        id               = "rtb-02eb6b271800ac8be"
      ~ tags             = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
      ~ tags_all         = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (3 unchanged elements hidden)
        }
        # (5 unchanged attributes hidden)
    }

  # module.vpc.aws_subnet.private[0] will be updated in-place
  ~ resource "aws_subnet" "private" {
        id                                             = "subnet-05d4a09303619cedd"
      ~ tags                                           = {
          - "awsApplication" = "arn:aws:resource-groups:ca-central-1:283582579564:group/SRE-Bot/0e3jdepc1mmpn7i4zoaibgofr6" -> null
            # (4 unchanged elements hidden)
        }
      ~ tags_all                                       = {
          - "awsApplication" =...
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_acm_certificate.sre_bot"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.sre-bot_group"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.sre_bot_dns"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.sre_bot_error"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.sre_bot_warning"]
WARN - plan.json - main - Missing Common Tags: ["aws_dynamodb_table.aws_access_requests_table"]
WARN - plan.json - main - Missing Common Tags: ["aws_dynamodb_table.sre_bot_data"]
WARN - plan.json - main - Missing Common Tags: ["aws_dynamodb_table.webhooks_table"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecr_repository.sre-bot"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_cluster.sre-bot"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_service.main"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_task_definition.sre-bot"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.sre-bot_secrets_manager"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.sre-bot"]
WARN - plan.json - main - Missing Common Tags: ["aws_lb.sre_bot"]
WARN - plan.json - main - Missing Common Tags: ["aws_lb_listener.sre_bot_listener"]
WARN - plan.json - main - Missing Common Tags: ["aws_lb_target_group.sre_bot"]
WARN - plan.json - main - Missing Common Tags: ["aws_route53_health_check.sre_bot_healthcheck"]
WARN - plan.json - main - Missing Common Tags: ["aws_route53_resolver_query_log_config.sre_bot"]
WARN - plan.json - main - Missing Common Tags: ["aws_route53_zone.sre_bot"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.ecs_tasks"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.sre_bot_load_balancer"]
WARN - plan.json - main - Cloudwatch log metric pattern is invalid: ["aws_cloudwatch_log_metric_filter.sre_bot_error"]

41 tests, 18 passed, 23...

Copy link
Member

@CalvinRodo CalvinRodo left a comment

Choose a reason for hiding this comment

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

🌮🐱

@patheard patheard merged commit 50274ae into main Jan 24, 2024
5 checks passed
@patheard patheard deleted the fix/opsgenie-integration-test branch January 24, 2024 21:14
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