diff --git a/Makefile b/Makefile
index 1cfc68f..f2f668e 100644
--- a/Makefile
+++ b/Makefile
@@ -7,4 +7,4 @@ export README_DEPS ?= docs/targets.md docs/terraform.md
## Lint terraform code
lint:
- $(SELF) terraform/install terraform/get-modules terraform/get-plugins terraform/lint terraform/validate
+ $(SELF) terraform/install terraform/lint terraform/validate
diff --git a/README.md b/README.md
index c43f083..1fabe6b 100644
--- a/README.md
+++ b/README.md
@@ -93,7 +93,7 @@ Available targets:
| Name | Version |
|------|---------|
-| [terraform](#requirement\_terraform) | >= 1.0 |
+| [terraform](#requirement\_terraform) | >= 1.3.0 |
| [aws](#requirement\_aws) | >= 4.0 |
## Providers
@@ -151,6 +151,7 @@ Available targets:
| [noncurrent\_version\_expiration\_days](#input\_noncurrent\_version\_expiration\_days) | (Deprecated, use `lifecycle_configuration_rules` instead)
Specifies when non-current object versions expire (in days) | `number` | `90` | no |
| [noncurrent\_version\_transition\_days](#input\_noncurrent\_version\_transition\_days) | (Deprecated, use `lifecycle_configuration_rules` instead)
Specifies (in days) when noncurrent object versions transition to Glacier Flexible Retrieval | `number` | `30` | no |
| [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
+| [s3\_object\_ownership](#input\_s3\_object\_ownership) | Specifies the S3 object ownership control. Valid values are `ObjectWriter`, `BucketOwnerPreferred`, and 'BucketOwnerEnforced'. | `string` | `"BucketOwnerPreferred"` | no |
| [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
| [standard\_transition\_days](#input\_standard\_transition\_days) | (Deprecated, use `lifecycle_configuration_rules` instead)
Number of days to persist in the standard storage tier before moving to the infrequent access tier | `number` | `30` | no |
| [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).
Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
diff --git a/docs/terraform.md b/docs/terraform.md
index ae6cbdb..bc76105 100644
--- a/docs/terraform.md
+++ b/docs/terraform.md
@@ -3,7 +3,7 @@
| Name | Version |
|------|---------|
-| [terraform](#requirement\_terraform) | >= 1.0 |
+| [terraform](#requirement\_terraform) | >= 1.3.0 |
| [aws](#requirement\_aws) | >= 4.0 |
## Providers
@@ -61,6 +61,7 @@
| [noncurrent\_version\_expiration\_days](#input\_noncurrent\_version\_expiration\_days) | (Deprecated, use `lifecycle_configuration_rules` instead)
Specifies when non-current object versions expire (in days) | `number` | `90` | no |
| [noncurrent\_version\_transition\_days](#input\_noncurrent\_version\_transition\_days) | (Deprecated, use `lifecycle_configuration_rules` instead)
Specifies (in days) when noncurrent object versions transition to Glacier Flexible Retrieval | `number` | `30` | no |
| [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
+| [s3\_object\_ownership](#input\_s3\_object\_ownership) | Specifies the S3 object ownership control. Valid values are `ObjectWriter`, `BucketOwnerPreferred`, and 'BucketOwnerEnforced'. | `string` | `"BucketOwnerPreferred"` | no |
| [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
| [standard\_transition\_days](#input\_standard\_transition\_days) | (Deprecated, use `lifecycle_configuration_rules` instead)
Number of days to persist in the standard storage tier before moving to the infrequent access tier | `number` | `30` | no |
| [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).
Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf
index ce68e92..4c8603d 100644
--- a/examples/complete/versions.tf
+++ b/examples/complete/versions.tf
@@ -1,5 +1,5 @@
terraform {
- required_version = ">= 1.0"
+ required_version = ">= 1.3.0"
required_providers {
aws = {
@@ -7,4 +7,4 @@ terraform {
version = ">= 4.0"
}
}
-}
\ No newline at end of file
+}
diff --git a/main.tf b/main.tf
index cdfa0e6..f887892 100644
--- a/main.tf
+++ b/main.tf
@@ -26,7 +26,7 @@ data "aws_iam_policy_document" "default" {
sid = ""
principals {
type = "AWS"
- identifiers = [join("", data.aws_elb_service_account.default.*.arn)]
+ identifiers = [join("", data.aws_elb_service_account.default[*].arn)]
}
effect = "Allow"
actions = [
@@ -77,17 +77,18 @@ data "aws_partition" "current" {}
module "s3_bucket" {
source = "cloudposse/s3-log-storage/aws"
- version = "1.4.2"
+ version = "1.4.3"
acl = var.acl
bucket_name = var.bucket_name
- source_policy_documents = [join("", data.aws_iam_policy_document.default.*.json)]
+ source_policy_documents = [join("", data.aws_iam_policy_document.default[*].json)]
force_destroy = var.force_destroy
versioning_enabled = var.versioning_enabled
allow_ssl_requests_only = var.allow_ssl_requests_only
access_log_bucket_name = var.access_log_bucket_name
access_log_bucket_prefix = var.access_log_bucket_prefix
lifecycle_configuration_rules = var.lifecycle_configuration_rules
+ s3_object_ownership = var.s3_object_ownership
# TODO: deprecate these inputs in favor of `lifecycle_configuration_rules`
lifecycle_rule_enabled = var.lifecycle_rule_enabled
diff --git a/variables.tf b/variables.tf
index e92414e..16bfc80 100644
--- a/variables.tf
+++ b/variables.tf
@@ -32,6 +32,12 @@ variable "access_log_bucket_prefix" {
default = null
}
+variable "s3_object_ownership" {
+ type = string
+ description = "Specifies the S3 object ownership control. Valid values are `ObjectWriter`, `BucketOwnerPreferred`, and 'BucketOwnerEnforced'."
+ default = "BucketOwnerPreferred"
+}
+
variable "allow_ssl_requests_only" {
type = bool
description = "Require requests to use Secure Socket Layer (HTTPS/SSL)."
diff --git a/versions.tf b/versions.tf
index ce68e92..4c8603d 100644
--- a/versions.tf
+++ b/versions.tf
@@ -1,5 +1,5 @@
terraform {
- required_version = ">= 1.0"
+ required_version = ">= 1.3.0"
required_providers {
aws = {
@@ -7,4 +7,4 @@ terraform {
version = ">= 4.0"
}
}
-}
\ No newline at end of file
+}