Skip to content

Commit

Permalink
Add s3 buckets to store the GC Organisations datafile (#1731)
Browse files Browse the repository at this point in the history
* add s3 buckets

* Update aws/common/s3.tf

Co-authored-by: Ben Larabie <[email protected]>

---------

Co-authored-by: Ben Larabie <[email protected]>
  • Loading branch information
smcmurtry and ben851 authored Jan 21, 2025
1 parent 04a5025 commit 89450ba
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions aws/common/s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -571,3 +571,29 @@ module "sns_sms_usage_report_sanitized_bucket_us_west_2" {
CostCenter = "notification-canada-ca-${var.env}"
}
}

resource "aws_s3_bucket" "gc_organisations_bucket" {
bucket = "notification-canada-ca-${var.env}-gc-organisations"
force_destroy = var.force_destroy_s3

logging {
target_prefix = var.env
target_bucket = module.csv_bucket_logs.s3_bucket_id
}

tags = {
CostCenter = "notification-canada-ca-${var.env}"
}

#tfsec:ignore:AWS002 - No logging enabled
#tfsec:ignore:AWS077 - Versioning is not enabled
}

resource "aws_s3_bucket_public_access_block" "gc_organisations_bucket" {
bucket = aws_s3_bucket.gc_organisations_bucket.id

block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}
1 change: 1 addition & 0 deletions aws/lambda-api/secrets_manager.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ FRESH_DESK_ENABLED=False
GC_ARTICLES_API_AUTH_USERNAME=${var.manifest_gc_articles_api_auth_username}
GC_ARTICLES_API_AUTH_PASSWORD="${var.manifest_gc_articles_api_auth_password}"
GC_ARTICLES_API=articles.alpha.canada.ca/notification-gc-notify
GC_ORGANISATIONS_BUCKET_NAME=notification-canada-ca-${var.env}-gc-organisations
HC_EN_SERVICE_ID=c2fe9fac-2f28-40ca-b152-08ee41cd6843
HC_FR_SERVICE_ID=
Expand Down

0 comments on commit 89450ba

Please sign in to comment.