You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[aws_canonical_user_id.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/canonical_user_id)| data source |
133
145
|[aws_elb_service_account.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/elb_service_account)| data source |
134
146
|[aws_iam_policy_document.combined](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
135
147
|[aws_iam_policy_document.deny_insecure_transport](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
@@ -142,7 +154,7 @@ No modules.
142
154
| Name | Description | Type | Default | Required |
| <aname="input_acceleration_status"></a> [acceleration\_status](#input\_acceleration\_status)| (Optional) Sets the accelerate configuration of an existing bucket. Can be Enabled or Suspended. |`string`|`null`| no |
145
-
| <aname="input_acl"></a> [acl](#input\_acl)| (Optional) The canned ACL to apply. Defaults to 'private'. Conflicts with `grant`|`string`|`"private"`| no |
157
+
| <aname="input_acl"></a> [acl](#input\_acl)| (Optional) The canned ACL to apply. Conflicts with `grant`|`string`|`null`| no |
146
158
| <aname="input_attach_deny_insecure_transport_policy"></a> [attach\_deny\_insecure\_transport\_policy](#input\_attach\_deny\_insecure\_transport\_policy)| Controls if S3 bucket should have deny non-SSL transport policy attached |`bool`|`false`| no |
147
159
| <aname="input_attach_elb_log_delivery_policy"></a> [attach\_elb\_log\_delivery\_policy](#input\_attach\_elb\_log\_delivery\_policy)| Controls if S3 bucket should have ELB log delivery policy attached |`bool`|`false`| no |
148
160
| <aname="input_attach_lb_log_delivery_policy"></a> [attach\_lb\_log\_delivery\_policy](#input\_attach\_lb\_log\_delivery\_policy)| Controls if S3 bucket should have ALB/NLB log delivery policy attached |`bool`|`false`| no |
@@ -156,13 +168,15 @@ No modules.
156
168
| <aname="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 |
157
169
| <aname="input_cors_rule"></a> [cors\_rule](#input\_cors\_rule)| List of maps containing rules for Cross-Origin Resource Sharing. |`any`|`[]`| no |
158
170
| <aname="input_create_bucket"></a> [create\_bucket](#input\_create\_bucket)| Controls if S3 bucket should be created |`bool`|`true`| no |
171
+
| <aname="input_expected_bucket_owner"></a> [expected\_bucket\_owner](#input\_expected\_bucket\_owner)| The account ID of the expected bucket owner |`string`|`null`| no |
159
172
| <aname="input_force_destroy"></a> [force\_destroy](#input\_force\_destroy)| (Optional, Default:false ) A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. |`bool`|`false`| no |
160
173
| <aname="input_grant"></a> [grant](#input\_grant)| An ACL policy grant. Conflicts with `acl`|`any`|`[]`| no |
161
174
| <aname="input_ignore_public_acls"></a> [ignore\_public\_acls](#input\_ignore\_public\_acls)| Whether Amazon S3 should ignore public ACLs for this bucket. |`bool`|`false`| no |
162
175
| <aname="input_lifecycle_rule"></a> [lifecycle\_rule](#input\_lifecycle\_rule)| List of maps containing configuration of object lifecycle management. |`any`|`[]`| no |
| <aname="input_object_ownership"></a> [object\_ownership](#input\_object\_ownership)| Object ownership. Valid values: BucketOwnerEnforced, BucketOwnerPreferred or ObjectWriter. 'BucketOwnerEnforced': ACLs are disabled, and the bucket owner automatically owns and has full control over every object in the bucket. 'BucketOwnerPreferred': Objects uploaded to the bucket change ownership to the bucket owner if the objects are uploaded with the bucket-owner-full-control canned ACL. 'ObjectWriter': The uploading account will own the object if the object is uploaded with the bucket-owner-full-control canned ACL. |`string`|`"ObjectWriter"`| no |
179
+
| <aname="input_owner"></a> [owner](#input\_owner)| Bucket owner's display name and ID. Conflicts with `acl`|`map(string)`|`{}`| no |
166
180
| <aname="input_policy"></a> [policy](#input\_policy)| (Optional) A valid bucket policy JSON document. Note that if the policy document is not specific enough (but still valid), Terraform may view the policy as constantly changing in a terraform plan. In this case, please make sure you use the verbose/specific version of the policy. For more information about building AWS IAM policy documents with Terraform, see the AWS IAM Policy Document Guide. |`string`|`null`| no |
167
181
| <aname="input_putin_khuylo"></a> [putin\_khuylo](#input\_putin\_khuylo)| Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo!|`bool`|`true`| no |
If you have any questions regarding this upgrade process, please consult the [`examples/`](https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/tree/master/examples) projects:
4
+
5
+
If you find a bug, please open an issue with supporting configuration to reproduce.
6
+
7
+
## List of backwards incompatible changes
8
+
9
+
- Terraform AWS provider minimum version is now `v3.75.0` in order to have forward compatibility with Terraform AWS provider `v4.x`. Using the latest version of `v4` is highly recommended, if possible.
10
+
- Main group of changes is related to refactoring of `aws_s3_bucket` resource into several smaller resources. Read [`S3 bucket refactor` section in the official Terraform AWS Provider Version 4 Upgrade Guide](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/version-4-upgrade#s3-bucket-refactor) and [discussion around these changes](https://github.com/hashicorp/terraform-provider-aws/issues/23106) can help even when using AWS provider version 3.75 or newer.
11
+
-`modules/object`: Changed resource type from `aws_bucket_s3_object` to `aws_s3_object`. After upgrade, on the next apply, Terraform will recreate the object. If you prefer to not have Terraform recreate the object, import the object using `aws_s3_object`. [Read more](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_object#import).
12
+
13
+
## Additional changes
14
+
15
+
### Added
16
+
17
+
- None
18
+
19
+
### Modified
20
+
21
+
-`acl` variable is set to `null` by default
22
+
- In addition to pseudo-boolean values like "Enabled", "Disabled", "Suspended", it is now possible to specify `true` or `false` in all such arguments (e.g. `versioning = { enabled = true }`).
Where `log-delivery-write` is the value of `acl` argument in the module block above.
106
+
107
+
Read more about [import in the official documentation for `aws_s3_bucket_acl`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#import).
108
+
109
+
#### Import existing resources (required during the migration from v2.x of this module)
110
+
111
+
During the migration to v3.x of this module, several S3 resources will be created by this module. In order to guarantee the best experience and prevent data loss, you will need to import them into terraform state using commands like these:
Where `s3_bucket` is the name of your module definition, `bucket-name` is the name of the bucket, `acl` is the bucket ACL (e.g. `private`, `log-delivery-write`, etc), `<account-id>` is your AWS account number (required only if `expected_bucket_owner` is set in the code).
# Legacy - Complete S3 bucket with most of supported features enabled
2
+
3
+
Configuration in this directory creates S3 bucket using previous (2.x) version of this module to test upgrade process.
4
+
5
+
This configuration is similar to the code in [examples/complete](https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/tree/master/examples/complete) but not identical.
6
+
7
+
## Usage
8
+
9
+
Once this configuration is created, you need to use the newer version of this module (e.g. `~> 3.0`), review/update arguments (see code in [examples/complete](https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/tree/master/examples/complete)) and import existing resources (see [UPGRADE-3.0.md](https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/blob/master/UPGRADE-3.0.md) for more precise commands).
10
+
11
+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
|[aws_iam_policy_document.bucket_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
42
+
43
+
## Inputs
44
+
45
+
No inputs.
46
+
47
+
## Outputs
48
+
49
+
| Name | Description |
50
+
|------|-------------|
51
+
| <aname="output_s3_bucket_arn"></a> [s3\_bucket\_arn](#output\_s3\_bucket\_arn)| The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. |
52
+
| <aname="output_s3_bucket_bucket_domain_name"></a> [s3\_bucket\_bucket\_domain\_name](#output\_s3\_bucket\_bucket\_domain\_name)| The bucket domain name. Will be of format bucketname.s3.amazonaws.com. |
53
+
| <aname="output_s3_bucket_bucket_regional_domain_name"></a> [s3\_bucket\_bucket\_regional\_domain\_name](#output\_s3\_bucket\_bucket\_regional\_domain\_name)| The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL. |
54
+
| <aname="output_s3_bucket_hosted_zone_id"></a> [s3\_bucket\_hosted\_zone\_id](#output\_s3\_bucket\_hosted\_zone\_id)| The Route 53 Hosted Zone ID for this bucket's region. |
55
+
| <aname="output_s3_bucket_id"></a> [s3\_bucket\_id](#output\_s3\_bucket\_id)| The name of the bucket. |
56
+
| <aname="output_s3_bucket_region"></a> [s3\_bucket\_region](#output\_s3\_bucket\_region)| The AWS region this bucket resides in. |
57
+
| <aname="output_s3_bucket_website_domain"></a> [s3\_bucket\_website\_domain](#output\_s3\_bucket\_website\_domain)| The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records. |
58
+
| <aname="output_s3_bucket_website_endpoint"></a> [s3\_bucket\_website\_endpoint](#output\_s3\_bucket\_website\_endpoint)| The website endpoint, if the bucket is configured with a website. If not, this will be an empty string. |
0 commit comments