Skip to content

Commit 740e2c8

Browse files
committed
feat: Remove region parameter for 3.0 aws provider
The 3.0 aws provider does not allow a region parameter to the aws_s3_bucket resource.
1 parent 0da340b commit 740e2c8

File tree

5 files changed

+1
-11
lines changed

5 files changed

+1
-11
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ module "s3_bucket" {
114114
| logging | Map containing access bucket logging configuration. | `map(string)` | `{}` | no |
115115
| object\_lock\_configuration | Map containing S3 object locking configuration. | `any` | `{}` | no |
116116
| 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 |
117-
| region | (Optional) If specified, the AWS region this bucket should reside in. Otherwise, the region used by the callee. | `string` | `null` | no |
118117
| replication\_configuration | Map containing cross-region replication configuration. | `any` | `{}` | no |
119118
| request\_payer | (Optional) Specifies who should bear the cost of Amazon S3 data transfer. Can be either BucketOwner or Requester. By default, the owner of the S3 bucket would incur the costs of any data transfer. See Requester Pays Buckets developer guide for more information. | `string` | `null` | no |
120119
| restrict\_public\_buckets | Whether Amazon S3 should restrict public bucket policies for this bucket. | `bool` | `false` | no |

examples/s3-replication/main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ module "replica_bucket" {
3636
}
3737

3838
bucket = local.destination_bucket_name
39-
region = local.replica_region
4039
acl = "private"
4140

4241
versioning = {
@@ -48,7 +47,6 @@ module "s3_bucket" {
4847
source = "../../"
4948

5049
bucket = local.bucket_name
51-
region = local.origin_region
5250
acl = "private"
5351

5452
versioning = {

main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ resource "aws_s3_bucket" "this" {
77
tags = var.tags
88
force_destroy = var.force_destroy
99
acceleration_status = var.acceleration_status
10-
region = var.region
1110
request_payer = var.request_payer
1211

1312
dynamic "website" {

variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ variable "acceleration_status" {
6464
default = null
6565
}
6666

67-
variable "region" {
68-
description = "(Optional) If specified, the AWS region this bucket should reside in. Otherwise, the region used by the callee."
69-
type = string
70-
default = null
71-
}
72-
7367
variable "request_payer" {
7468
description = "(Optional) Specifies who should bear the cost of Amazon S3 data transfer. Can be either BucketOwner or Requester. By default, the owner of the S3 bucket would incur the costs of any data transfer. See Requester Pays Buckets developer guide for more information."
7569
type = string

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ terraform {
22
required_version = ">= 0.12.6, < 0.14"
33

44
required_providers {
5-
aws = "~> 2.35"
5+
aws = "~> 3.0"
66
}
77
}

0 commit comments

Comments
 (0)