-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/aws: Support S3 bucket notification #5473
Conversation
This may #4120 |
m := v.(map[string]interface{}) | ||
buf.WriteString(fmt.Sprintf("%t-", m["filter_prefix"].(string))) | ||
buf.WriteString(fmt.Sprintf("%t-", m["filter_suffix"].(string))) | ||
return hashcode.String(buf.String()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These Set
functions do not account for all the elements in the set, so changing anything outside of filter_prefix
or filter_suffix
will not be recognized, e.g. changing to another SNS Topic.
I believe it's safe to simply omit the Set
func entirely here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poking at this further, it seems that if omitted, the id
will get populated by the API. This is troublesome because we'll then see a diff in future plans if we don't have that populated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@catsby
I think id
parameter is good to change to auto generate by terraform when empty like AutoScaling Group name.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed to auto generate id
when not specific id
parameter.
This looks really promising, I'm excited to have it in! We need to touch up some things first though as I noted above, please let me know if you have any questions about them |
+1 to this, just found it while trying to set up S3 -> lambda notifications |
I'm digging into it a bit now, but when I use this with:
I get this:
|
Found the issue: if I add a filter_prefix of "*", it works:
I double checked what CloudTrail was catching for the error before:
So it looks like it should be tweaked to not provide a filter key to the API if no filter is provided to the resource definition |
It turns out that "*" is taken as the literal *, not a wildcard. In my specific case, I just updated it to be AWSLogs, but that's not quite the global workaround I'd thought it would be. |
057f003
to
e71b784
Compare
@akerl Thanks find bug. |
This is looking really nice. I hope it makes it into 0.6.14. |
What's the status on this PR? Will this make it to the next release? |
This looks now good that the initial fixes were made. I am going to merge and squash the commits test results are as follows:
|
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. |
Add S3 bucket notification resource.
The reason for creating a new resource is to avoid the circular reference.
Acceptance test