Skip to content

Commit

Permalink
feat(pencil): disable public_acl for Gitlab backup s3 bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
vjdhama committed Jan 25, 2023
1 parent 473ebf9 commit f9c8a03
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backup.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ locals {
gitlab_backup_iam_policy_name = "${local.environment_prefix}-gitlab-backup"
gitlab_backup_iam_role_name = "${local.environment_prefix}-gitlab-backup"
}

resource "aws_s3_bucket" "gitlab_backup" {
count = var.enable_gitlab_backup_to_s3 ? 1 : 0
bucket = var.gitlab_backup_bucket_name

tags = merge(local.default_tags, var.additional_tags)

aws_s3_bucket_public_access_block = {
block_public_acls = true
}

lifecycle {
precondition {
condition = anytrue([
Expand Down

0 comments on commit f9c8a03

Please sign in to comment.