Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of S3 bucket event notification resource and Addition of S3 directory optional resource #240

Merged
merged 6 commits into from
Aug 13, 2024

Conversation

mayank0202
Copy link
Contributor

@mayank0202 mayank0202 commented Aug 6, 2024

Issue - GH-239

what

This feature will make s3 event notifications which will have 3 options to trigger lambda or queue or topic so we can define a resource from this documentation.
aws_s3_bucket_notification

we also added s3 directory bucket which is a new feature in aws so addition of optional resource can be done if someone needs to use that with the help of terraform
aws_s3_directory_bucket

why

  • Enhanced Event-Driven Architecture: The introduction of S3 event notifications allows the S3 bucket to trigger Lambda functions, SQS queues, or SNS topics. This facilitates seamless integration with other AWS services and enables real-time processing of data, which is crucial for building event-driven architectures.

  • New AWS Feature Adoption: The addition of the aws_s3_directory_bucket resource reflects the latest AWS capabilities, ensuring that our infrastructure is up-to-date with current AWS offerings. This optional resource allows users to leverage new AWS features as they become available, promoting flexibility and future-proofing our Terraform configurations.

  • Improved Flexibility: By providing options to trigger different AWS services (Lambda, SQS, SNS), the solution becomes more versatile, catering to a wide range of use cases and workflows. This flexibility can lead to more efficient and effective data processing pipelines.

  • Reduced Operational Overhead: Automating responses to S3 events using Lambda functions, queues, or topics can significantly reduce manual intervention and operational overhead. This leads to improved efficiency and allows teams to focus on higher-value tasks.

references

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_notification
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_directory_bucket
https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html

@mayank0202 mayank0202 requested review from a team as code owners August 6, 2024 12:55
@mayank0202 mayank0202 requested review from hans-d and nitrocode August 6, 2024 12:55
@mergify mergify bot added the triage Needs triage label Aug 6, 2024
@aknysh aknysh added minor New features that do not break anything and removed triage Needs triage labels Aug 8, 2024
Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

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

please format terraform code

@mayank0202 mayank0202 requested a review from aknysh August 9, 2024 06:16
@aknysh
Copy link
Member

aknysh commented Aug 9, 2024

/terratest

variables.tf Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
main.tf Outdated Show resolved Hide resolved
Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

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

thanks @mayank0202
please see comments

also, format TF code terraform fmt again after you make the changes.

The PR looks good, thanks

@mayank0202 mayank0202 requested a review from aknysh August 12, 2024 17:59
@aknysh
Copy link
Member

aknysh commented Aug 12, 2024

/terratest

Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

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

thanks @mayank0202

@aknysh aknysh merged commit 3631fb5 into cloudposse:main Aug 13, 2024
15 checks passed
@mayank0202 mayank0202 deleted the GH-239 branch August 13, 2024 16:57
Copy link

These changes were released in v4.6.0.

}

variable "create_s3_directory_bucket" {
Copy link
Member

@nitrocode nitrocode Nov 13, 2024

Choose a reason for hiding this comment

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

Cloudposse has a convention of using a suffix for _enabled for booleans instead of the create_ prefix (which is usually the terraform-aws-modules org convention)

Suggested change
variable "create_s3_directory_bucket" {
variable "s3_directory_bucket_enabled" {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes done @nitrocode
#258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor New features that do not break anything
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants