Skip to content

Commit

Permalink
Merge branch 'main' into helm-alarms
Browse files Browse the repository at this point in the history
  • Loading branch information
ben851 authored Dec 10, 2024
2 parents 76e562d + 7e5bdf7 commit 1089283
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/infrastructure_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.17.27
2.17.29
5 changes: 0 additions & 5 deletions aws/eks/cloudwatch_log.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
# AWS EKS Cloudwatch groups
###

import {
to = aws_cloudwatch_log_group.blazer[0]
id = "blazer"
}

resource "aws_cloudwatch_log_group" "notification-canada-ca-eks-cluster-logs" {
count = var.cloudwatch_enabled ? 1 : 0
name = "/aws/eks/${var.eks_cluster_name}/cluster"
Expand Down
94 changes: 94 additions & 0 deletions env/dev/manifest_secrets/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions env/dev/system_status_static_site/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions env/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,6 @@ variable "auth_tokens" {
sensitive = true
}

variable "dangerous_salt" {
type = string
sensitive = true
}

variable "ff_batch_insertion" {
type = string
}
Expand All @@ -506,15 +501,6 @@ variable "ff_redis_batch_saving" {
type = string
}

variable "redis_url" {
type = string
}

variable "secret_key" {
type = string
sensitive = true
}

variable "notify_sending_domain" {
type = string
}
Expand Down
23 changes: 15 additions & 8 deletions scripts/deleteEnvironment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,14 @@ aws kms delete-alias --alias-name alias/s3_scan_object_queue

aws iam delete-service-linked-role --role-name AWSServiceRoleForEC2Spot

aws logs delete-query-definition --query-definition-id $(aws logs describe-query-definitions --query 'queryDefinitions[?name==`Lambda Statistics / heartbeat`]'.queryDefinitionId --output text)
aws logs delete-query-definition --query-definition-id $(aws logs describe-query-definitions --query 'queryDefinitions[?name==`Lambda Statistics - pinpoint_to_sqs_sms_callbacks`]'.queryDefinitionId --output text)
aws logs delete-query-definition --query-definition-id $(aws logs describe-query-definitions --query 'queryDefinitions[?name==`Lambda Statistics - sns_to_sqs_sms_callbacks`]'.queryDefinitionId --output text)
aws logs delete-query-definition --query-definition-id $(aws logs describe-query-definitions --query 'queryDefinitions[?name==`Lambda Statistics / system_status`]'.queryDefinitionId --output text)
aws logs delete-query-definition --query-definition-id $(aws logs describe-query-definitions --query 'queryDefinitions[?name==`Lambda Statistics - ses_to_sqs_email_callbacks`]'.queryDefinitionId --output text)
aws logs delete-query-definition --query-definition-id $(aws logs describe-query-definitions --query 'queryDefinitions[?name==`Lambda Statistics - ses_receiving_emails`]'.queryDefinitionId --output text --region us-east-1) --region us-east-1
aws logs delete-query-definition --query-definition-id $(aws logs describe-query-definitions --query 'queryDefinitions[?name==`API / Services going over daily rate limits`]'.queryDefinitionId --output text)
aws logs delete-log-group --log-group-name '/aws/eks/notification-canada-ca-dev-eks-cluster/cluster'
aws logs delete-log-group --log-group-name '/aws/rds/cluster/notification-canada-ca-dev-cluster/postgresql'

QUERIES=$(aws logs describe-query-definitions --query 'queryDefinitions[].queryDefinitionId' --output text)
for query in $QUERIES; do
echo "Deleting cloudwatch query $query"
aws logs delete-query-definition --query-definition-id $query
done

aws iam delete-saml-provider --saml-provider-arn arn:aws:iam::$ACCOUNT_ID:saml-provider/client-vpn

Expand Down Expand Up @@ -138,5 +139,11 @@ for identity in $US_IDENTITIES; do
echo "Done."
done

QUERIES=$(aws logs describe-query-definitions --query 'queryDefinitions[].queryDefinitionId' --output text)
for query in $QUERIES; do
echo "Deleting cloudwatch query $query"
aws logs delete-query-definition --query-definition-id $query
done

echo "Done."
echo "Account $ACCOUNT_ID has been cleaned up."
echo "Account $ACCOUNT_ID has been cleaned up."

0 comments on commit 1089283

Please sign in to comment.