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: add support for datasources and s3_logs #19954

Merged

Conversation

farhanangullia
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request

Closes #14607

Release note for CHANGELOG:

enhancement:

resource/aws_guardduty_detector: Add support for `datasources`, `s3_logs` and `enable` arguments

Affected Resource(s)

  • resource: aws_guardduty_detector

Terraform Configuration

resource "aws_guardduty_detector" "foo" {
  enable = true

  datasources {
    s3_logs {
      enable = true
    }
  }
}

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSGuardDuty_serial/Detector'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGuardDuty_serial/Detector -timeout 180m
=== RUN   TestAccAWSGuardDuty_serial
=== RUN   TestAccAWSGuardDuty_serial/Detector
=== RUN   TestAccAWSGuardDuty_serial/Detector/datasources_s3logs
=== RUN   TestAccAWSGuardDuty_serial/Detector/tags
=== RUN   TestAccAWSGuardDuty_serial/Detector/datasource_basic
=== RUN   TestAccAWSGuardDuty_serial/Detector/datasource_id
=== RUN   TestAccAWSGuardDuty_serial/Detector/basic
--- PASS: TestAccAWSGuardDuty_serial (598.48s)
    --- PASS: TestAccAWSGuardDuty_serial/Detector (598.48s)
        --- PASS: TestAccAWSGuardDuty_serial/Detector/datasources_s3logs (110.09s)
        --- PASS: TestAccAWSGuardDuty_serial/Detector/tags (146.95s)
        --- PASS: TestAccAWSGuardDuty_serial/Detector/datasource_basic (103.87s)
        --- PASS: TestAccAWSGuardDuty_serial/Detector/datasource_id (56.30s)
        --- PASS: TestAccAWSGuardDuty_serial/Detector/basic (181.27s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       599.752s

...

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/guardduty Issues and PRs that pertain to the guardduty service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. labels Jun 24, 2021
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jul 9, 2021
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TEST=./aws TESTARGS='-run=TestAccAWSGuardDuty_serial/Detector'                 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGuardDuty_serial/Detector -timeout 180m
=== RUN   TestAccAWSGuardDuty_serial
=== RUN   TestAccAWSGuardDuty_serial/Detector
=== RUN   TestAccAWSGuardDuty_serial/Detector/basic
=== RUN   TestAccAWSGuardDuty_serial/Detector/datasources_s3logs
=== RUN   TestAccAWSGuardDuty_serial/Detector/tags
=== RUN   TestAccAWSGuardDuty_serial/Detector/datasource_basic
=== RUN   TestAccAWSGuardDuty_serial/Detector/datasource_id
--- PASS: TestAccAWSGuardDuty_serial (163.23s)
    --- PASS: TestAccAWSGuardDuty_serial/Detector (163.23s)
        --- PASS: TestAccAWSGuardDuty_serial/Detector/basic (56.25s)
        --- PASS: TestAccAWSGuardDuty_serial/Detector/datasources_s3logs (27.60s)
        --- PASS: TestAccAWSGuardDuty_serial/Detector/tags (39.06s)
        --- PASS: TestAccAWSGuardDuty_serial/Detector/datasource_basic (25.15s)
        --- PASS: TestAccAWSGuardDuty_serial/Detector/datasource_id (15.16s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	166.269s

@ewbankkit
Copy link
Contributor

@farhanangullia Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 3670534 into hashicorp:main Jul 9, 2021
@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 pull request 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 related to this change, 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
documentation Introduces or discusses updates to documentation. service/guardduty Issues and PRs that pertain to the guardduty service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resource/aws_guardduty_detector: S3 events with GuardDuty
2 participants