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

resource/aws_guardduty_detector: S3 events with GuardDuty #14607

Closed
vaishnavmurthy opened this issue Aug 12, 2020 · 9 comments · Fixed by #19954
Closed

resource/aws_guardduty_detector: S3 events with GuardDuty #14607

vaishnavmurthy opened this issue Aug 12, 2020 · 9 comments · Fixed by #19954
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/guardduty Issues and PRs that pertain to the guardduty service.
Milestone

Comments

@vaishnavmurthy
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Could you create a Terraform resource to enable S3 events with GuardDuty?

New or Affected Resource(s)

Details / documentation here: https://docs.aws.amazon.com/guardduty/latest/ug/s3_detection.html

Relevant AWS CLI command:
aws guardduty update-member-detectors --detector-id 12abc34d567e8fa901bc2d34e56789f0 --account-ids 123456789012 --data-sources '{"S3Logs":{"Enable":true}}'

  • aws_XXXXX

Potential Terraform Configuration

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

References

  • #0000
@vaishnavmurthy vaishnavmurthy added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 12, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 12, 2020
@ewbankkit ewbankkit added service/guardduty Issues and PRs that pertain to the guardduty service. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 13, 2020
@ewbankkit
Copy link
Contributor

@pietro
Copy link
Contributor

pietro commented Aug 20, 2020

I'm willing to implement this myself.

The AWS API and corresponding AWS Go SDK methods have a DataSources parameter for the create and update requests. That parameter has one S3Logs parameter with one boolean field for enabling/disabling S3 detection.

IMHO, the most straight forward way to add this feature would be to add a boolean parameter called something like enable_s3_detection and construct DataSources and S3Logs structs from that.

For better provider resource/AWS API parity we might want to add a data_sources block with the enable_s3_detection parameter in it.

What's the preferred way to add this feature to this resource?

@bflad
Copy link
Contributor

bflad commented Aug 20, 2020

Hi @pietro 👋 Thank you for reaching out and for your interest in implementing this! We typically prefer following the API structures for consistency with other AWS tooling (CLI, etc.) and to prevent future maintenance/deprecation issues with our own abstractions. 👍

Briefly looking at the API reference, the equivalent Terraform configuration we would expect here would be something like:

resource "aws_guardduty_detector" "example" {
  # ... other configuration ...

  datasources {
    s3_logs {
      enable = true
    }
  }
}

@bflad bflad changed the title S3 events with GuardDuty resource/aws_guardduty_detector: S3 events with GuardDuty Sep 10, 2020
@michaelm-88
Copy link

@ewbankkit any update on this

@jacoor
Copy link
Contributor

jacoor commented Apr 19, 2021

Any update, please?

@dimisjim
Copy link
Contributor

hi @pietro

Willing to resume or should someone else pick this up?

@m-stojanovic
Copy link

any news about when this is going to be implemented? @pietro @bflad

@github-actions github-actions bot added this to the v3.50.0 milestone Jul 9, 2021
@github-actions
Copy link

This functionality has been released in v3.50.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/guardduty Issues and PRs that pertain to the guardduty service.
Projects
None yet
8 participants