aws-health-aware
aws-health-aware copied to clipboard
Question: What is the reason for building the an S3 bucket for each region
Dear Folks,
I have a question regarding the following Terraform resources:
resource "aws_s3_bucket" "AHA-S3Bucket-PrimaryRegion" {
count = "${var.ExcludeAccountIDs != "" ? 1 : 0}"
bucket = "aha-bucket-${var.aha_primary_region}-${random_string.resource_code.result}"
tags = {
Name = "aha-bucket"
}
}
resource "aws_s3_bucket" "AHA-S3Bucket-SecondaryRegion" {
count = "${var.aha_secondary_region != "" && var.ExcludeAccountIDs != "" ? 1 : 0}"
provider = aws.secondary_region
bucket = "aha-bucket-${var.aha_secondary_region}-${random_string.resource_code.result}"
tags = {
Name = "aha-bucket"
}
}
I was not able to figure out what they are used for.
I think they are used for a CSV file holding data about excluded accounts if so I do not see a reason to create these buckets if I were just to pass the excluded accounts as a list in Terraform that is interpreted in python as a string and parsed.
If someone could tell me what these buckets are used for that would be great.
Many thanks.