unable to use the aws_s3_bucket_notification in the aws s3 module
shettypriy opened this issue ยท comments
Is your request related to a new offering from AWS?
Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.
- No ๐: please wait to file a request until the functionality is available in the AWS provider
- Yes โ : please list the AWS provider version which introduced this functionality
Is your request related to a problem? Please describe.
I am trying to convert the resource "aws_s3_bucket_notification" to a module using the "terraform-aws-modules/s3-bucket/aws" , Therefore, I used the below code to replace the resource "aws_s3_bucket_notification" to a module. I tried to use the github link for the source path as shown below
module "test_bucket_notification" {
source = "git::https://github.com/terraform-aws-modules/terraform-aws-s3-bucket.git//modules/notification"
bucket = module.test_bucket.s3_bucket_id
sqs_notifications = {
test_bucket_sqs = {
queue_arn = module.test_queue.sqs_queue_arn
events = ["s3:ObjectCreated:*"]
filter_prefix = โtestโ
}
}
}
Describe the solution you'd like.
Is there anyway to use the s3 bucket notification without using the github link as shown above. I would like to use the source for s3 notification similar to "terraform-aws-modules/s3-bucket/aws//modules/notification"
Describe alternatives you've considered.
module "test_bucket_notification" {
source = "git::https://github.com/terraform-aws-modules/terraform-aws-s3-bucket.git//modules/notification"
bucket = module.test_bucket.s3_bucket_id
sqs_notifications = {
test_bucket_sqs = {
queue_arn = module.test_queue.sqs_queue_arn
events = ["s3:ObjectCreated:*"]
filter_prefix = โtestโ
}
}
}
Additional context
Please check this out - https://developer.hashicorp.com/terraform/language/modules/sources#modules-in-package-sub-directories
And ask generic Terraform questions on https://discuss.hashicorp.com
I'm going to lock this issue because it has been closed for 30 days โณ. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.