Skip to content

Commit

Permalink
remove region attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolnagpal committed Jan 5, 2022
1 parent 92acbe3 commit dfb0ac4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 0 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ resource "aws_s3_bucket" "s3_default" {

bucket = module.labels.id
force_destroy = var.force_destroy
region = var.region
acl = var.acl

versioning {
Expand Down Expand Up @@ -86,7 +85,6 @@ resource "aws_s3_bucket" "s3_website" {

bucket = module.labels.id
force_destroy = var.force_destroy
region = var.region
acl = var.acl

versioning {
Expand Down Expand Up @@ -154,7 +152,6 @@ resource "aws_s3_bucket" "s3_logging" {

bucket = module.labels.id
force_destroy = var.force_destroy
region = var.region
acl = var.acl

versioning {
Expand Down Expand Up @@ -220,7 +217,6 @@ resource "aws_s3_bucket" "s3_encryption" {

bucket = module.labels.id
force_destroy = var.force_destroy
region = var.region
acl = var.acl

versioning {
Expand Down
6 changes: 3 additions & 3 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
# Description : Terraform module to create default S3 bucket with logging and encryption
# type specific features.
output "id" {
value = var.bucket_enabled ? join("", aws_s3_bucket.s3_default.*.id) : (var.website_hosting_bucket ? join("", aws_s3_bucket.s3_website.*.id) : (var.bucket_logging_enabled ? join("", aws_s3_bucket.s3_logging.*.id) : join("", aws_s3_bucket.s3_encryption.*.id)))
value = var.bucket_enabled ? join("", aws_s3_bucket.s3_default.*.id) : (var.website_hosting_bucket ? join("", aws_s3_bucket.s3_website.*.id) : (var.bucket_logging_enabled ? join("", aws_s3_bucket.s3_logging.*.id) : join("", aws_s3_bucket.s3_encryption.*.id)))
description = "The ID of the s3 bucket."

}

output "arn" {
value = var.bucket_enabled ? join("", aws_s3_bucket.s3_default.*.arn) : (var.website_hosting_bucket ? join("", aws_s3_bucket.s3_website.*.arn) : (var.bucket_logging_enabled ? join("", aws_s3_bucket.s3_logging.*.arn) : join("", aws_s3_bucket.s3_encryption.*.arn)))
value = var.bucket_enabled ? join("", aws_s3_bucket.s3_default.*.arn) : (var.website_hosting_bucket ? join("", aws_s3_bucket.s3_website.*.arn) : (var.bucket_logging_enabled ? join("", aws_s3_bucket.s3_logging.*.arn) : join("", aws_s3_bucket.s3_encryption.*.arn)))
description = "The ARN of the s3 bucket."

}

output "bucket_domain_name" {
value = var.bucket_enabled ? join("", aws_s3_bucket.s3_default.*.bucket_domain_name) : (var.website_hosting_bucket ? join("", aws_s3_bucket.s3_website.*.bucket_domain_name) : (var.bucket_logging_enabled ? join("", aws_s3_bucket.s3_logging.*.bucket_domain_name) : join("", aws_s3_bucket.s3_encryption.*.bucket_domain_name)))
value = var.bucket_enabled ? join("", aws_s3_bucket.s3_default.*.bucket_domain_name) : (var.website_hosting_bucket ? join("", aws_s3_bucket.s3_website.*.bucket_domain_name) : (var.bucket_logging_enabled ? join("", aws_s3_bucket.s3_logging.*.bucket_domain_name) : join("", aws_s3_bucket.s3_encryption.*.bucket_domain_name)))
description = "The Domain of the s3 bucket."

}
Expand Down
6 changes: 3 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ variable "environment" {
}

variable "label_order" {
type = list
type = list(any)
default = []
description = "Label order, e.g. `name`,`application`."
}

variable "attributes" {
type = list
type = list(any)
default = []
description = "Additional attributes (e.g. `1`)."
}
Expand All @@ -37,7 +37,7 @@ variable "delimiter" {
}

variable "tags" {
type = map
type = map(any)
default = {}
description = "Additional tags (e.g. map(`BusinessUnit`,`XYZ`)."
}
Expand Down

0 comments on commit dfb0ac4

Please sign in to comment.