Skip to content
Merged
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ Users of Terragrunt can achieve similar results by using modules provided in the
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |

## Modules

Expand Down Expand Up @@ -244,6 +244,7 @@ No modules.
| <a name="input_block_public_acls"></a> [block\_public\_acls](#input\_block\_public\_acls) | Whether Amazon S3 should block public ACLs for this bucket. | `bool` | `true` | no |
| <a name="input_block_public_policy"></a> [block\_public\_policy](#input\_block\_public\_policy) | Whether Amazon S3 should block public bucket policies for this bucket. | `bool` | `true` | no |
| <a name="input_bucket"></a> [bucket](#input\_bucket) | (Optional, Forces new resource) The name of the bucket. If omitted, Terraform will assign a random, unique name. | `string` | `null` | no |
| <a name="input_bucket_namespace"></a> [bucket\_namespace](#input\_bucket\_namespace) | Namespace for the bucket. Determines bucket naming scope. Valid values: account-regional, global. Defaults to global (AWS) | `string` | `null` | no |
| <a name="input_bucket_prefix"></a> [bucket\_prefix](#input\_bucket\_prefix) | (Optional, Forces new resource) Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket. | `string` | `null` | no |
| <a name="input_control_object_ownership"></a> [control\_object\_ownership](#input\_control\_object\_ownership) | Whether to manage S3 Bucket Ownership Controls on this bucket. | `bool` | `false` | no |
| <a name="input_cors_rule"></a> [cors\_rule](#input\_cors\_rule) | List of maps containing rules for Cross-Origin Resource Sharing. | `any` | `[]` | no |
Expand Down
2 changes: 1 addition & 1 deletion examples/account-public-access/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.10 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers
Expand Down
2 changes: 1 addition & 1 deletion examples/account-public-access/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
random = {
source = "hashicorp/random"
Expand Down
6 changes: 4 additions & 2 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand All @@ -48,6 +48,7 @@ Note that this example may create resources which cost money. Run `terraform des
| <a name="module_disabled"></a> [disabled](#module\_disabled) | ../../ | n/a |
| <a name="module_log_bucket"></a> [log\_bucket](#module\_log\_bucket) | ../../ | n/a |
| <a name="module_s3_bucket"></a> [s3\_bucket](#module\_s3\_bucket) | ../../ | n/a |
| <a name="module_simple_account_regional_bucket"></a> [simple\_account\_regional\_bucket](#module\_simple\_account\_regional\_bucket) | ../../ | n/a |
| <a name="module_simple_bucket"></a> [simple\_bucket](#module\_simple\_bucket) | ../../ | n/a |

## Resources
Expand All @@ -61,6 +62,7 @@ Note that this example may create resources which cost money. Run `terraform des
| [aws_canonical_user_id.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/canonical_user_id) | data source |
| [aws_cloudfront_log_delivery_canonical_user_id.cloudfront](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/cloudfront_log_delivery_canonical_user_id) | data source |
| [aws_iam_policy_document.bucket_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |

## Inputs

Expand Down
11 changes: 11 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ data "aws_canonical_user_id" "current" {}

data "aws_cloudfront_log_delivery_canonical_user_id" "cloudfront" {}

data "aws_region" "current" {}

resource "random_pet" "this" {
length = 2
}
Expand Down Expand Up @@ -138,6 +140,15 @@ module "simple_bucket" {
force_destroy = true
}

module "simple_account_regional_bucket" {
source = "../../"

bucket = format("simple-%s-%s-an", data.aws_caller_identity.current.account_id, data.aws_region.current.name)
bucket_namespace = "account-regional"

force_destroy = true
}

module "s3_bucket" {
source = "../../"

Expand Down
2 changes: 1 addition & 1 deletion examples/complete/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/directory-bucket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/directory-bucket/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/notification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

Expand Down
2 changes: 1 addition & 1 deletion examples/notification/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/object/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/object/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/s3-analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Please check [complete example](https://github.com/terraform-aws-modules/terrafo
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/s3-analytics/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/s3-inventory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Please check [complete example](https://github.com/terraform-aws-modules/terrafo
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/s3-inventory/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
random = {
source = "hashicorp/random"
Expand Down
6 changes: 3 additions & 3 deletions examples/s3-replication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws.replica"></a> [aws.replica](#provider\_aws.replica) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |
| <a name="provider_aws.replica"></a> [aws.replica](#provider\_aws.replica) | >= 6.37 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/s3-replication/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/table-bucket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/table-bucket/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
random = {
source = "hashicorp/random"
Expand Down
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ resource "aws_s3_bucket" "this" {

region = var.region

bucket = var.bucket
bucket_prefix = var.bucket_prefix
bucket = var.bucket
bucket_prefix = var.bucket_prefix
bucket_namespace = var.bucket_namespace

force_destroy = var.force_destroy
object_lock_enabled = var.object_lock_enabled
Expand Down
4 changes: 2 additions & 2 deletions modules/account-public-access/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Each AWS account may only have one S3 Public Access Block configuration.
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/account-public-access/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/notification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Creates S3 bucket notification resource with all supported types of deliveries:
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/notification/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/object/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Creates S3 bucket objects with different configurations.
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/object/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.37"
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/table-bucket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Creates S3 Table Bucket and Tables with various configurations.
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.37 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.37 |

## Modules

Expand Down
Loading
Loading