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

Update aws_s3_bucket.tf #10

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ File a GitHub [issue](https://github.com/osodevops/aws-terraform-module-s3/issue

## The legals

Copyright © 2017-2022 [OSO](https://oso.sh) | See [LICENCE](LICENSE) for full details.
Copyright © 2017-2024 [OSO](https://oso.sh) | See [LICENCE](LICENSE) for full details.

[<img src="https://oso-public-resources.s3.eu-west-1.amazonaws.com/oso-logo-green.png" alt="OSO who we are" width="250"/>](https://oso.sh/who-we-are/)

Expand Down
3 changes: 2 additions & 1 deletion aws_s3_bucket.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resource "aws_s3_bucket" "bucket" {
}

resource "aws_s3_bucket_acl" "bucket-acl" {
count = var.acl_enabled ? 1 : 0
bucket = aws_s3_bucket.bucket.id
acl = var.s3_bucket_acl
}
Expand Down Expand Up @@ -108,4 +109,4 @@ data "aws_iam_policy_document" "bucket-tls-policy-document" {
one(aws_s3_bucket.bucket[*].arn),
]
}
}
}
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,10 @@ variable "tls_enabled" {
description = "If TLS on the bucket should be enabled."
type = bool
default = true
}
}


variable "acl_enabled" {
description = "Either enable or disable acl on the bucket"
default = false
}
Loading