Skip to content

fix(aws-s3): update issue with vars - #1300

Open
kastras wants to merge 8 commits into
mainfrom
update/aws-s3_0.1.2
Open

fix(aws-s3): update issue with vars#1300
kastras wants to merge 8 commits into
mainfrom
update/aws-s3_0.1.2

Conversation

@kastras

@kastras kastras commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@kastras kastras self-assigned this Jun 15, 2026
@kastras
kastras requested a review from a team as a code owner June 15, 2026 14:21
@kastras
kastras requested a review from Copilot June 16, 2026 06:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the modules/aws-s3 Terraform module documentation/examples and attempts to adjust validation around replication-related variables.

Changes:

  • Removes the s3_replication_destination variable validation that required bucket versioning to be "Enabled".
  • Adds a locals-based “validation” expression for replication/versioning, and updates lifecycle rule locals formatting.
  • Updates module usage snippets (git source + tag) and placeholder AWS account IDs in docs and examples.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
modules/aws-s3/variables.tf Removes cross-variable validation for replication + versioning.
modules/aws-s3/local.tf Adds a locals-based replication/versioning “validation” expression.
modules/aws-s3/README.md Updates module source usage to git:: URL + tag; adjusts example account IDs / provider docs output.
modules/aws-s3/docs/header.md Updates module source usage to git:: URL + tag; adjusts example account IDs.
modules/aws-s3/_examples/minimal_source/main.tf Updates example destination account ID to 12 digits.
modules/aws-s3/_examples/minimal_replication/main.tf Updates example destination account ID to 12 digits.
modules/aws-s3/_examples/minimal_destination_source_and_destination/main.tf Updates example destination account ID to 12 digits (source account remains inconsistent).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 183 to 185
})
default = null

validation {
condition = var.s3_replication_destination == null || var.s3_bucket_versioning == "Enabled"
error_message = "When configuring s3_replication_destination, s3_bucket_versioning must be set to \"Enabled\"."
}
}
Comment thread modules/aws-s3/local.tf Outdated
Comment on lines +2 to +6
# Validate that if s3_replication_destination is configured, versioning must be enabled
validate_replication_versioning = (
var.s3_replication_destination == null || var.s3_bucket_versioning == "Enabled"
) ? true : file("ERROR: When configuring s3_replication_destination, s3_bucket_versioning must be set to \"Enabled\".")

Comment on lines 23 to 26
s3_replication_source = {
account = "1122334455"
role_arn = "arn:aws:iam::1122334455:role/o-a-d-replication"
}

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread modules/aws-s3/README.md Outdated
Comment thread modules/aws-s3/docs/header.md Outdated
kastras and others added 2 commits June 16, 2026 09:48
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread modules/aws-s3/README.md
| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 6.2 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | 6.30.0 |
Comment on lines 24 to +28
account = "1122334455"
role_arn = "arn:aws:iam::1122334455:role/o-a-d-replication"
}
s3_replication_destination = {
account = "1122334455"
account = "112233445566"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants