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

Support for features in GuardDuty Detector #31463

Merged
merged 33 commits into from
Sep 29, 2023
Merged

Support for features in GuardDuty Detector #31463

merged 33 commits into from
Sep 29, 2023

Commits on Sep 24, 2021

  1. fix: add validation of GuardDuty filter name

    This addresses issue #19893.
    maxvt authored and maxvt-tonal committed Sep 24, 2021
    Configuration menu
    Copy the full SHA
    931f43f View commit details
    Browse the repository at this point in the history

Commits on May 18, 2023

  1. Configuration menu
    Copy the full SHA
    399a612 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2023

  1. Configuration menu
    Copy the full SHA
    835f068 View commit details
    Browse the repository at this point in the history
  2. Fix test expectations

    ringods committed May 23, 2023
    Configuration menu
    Copy the full SHA
    50676ad View commit details
    Browse the repository at this point in the history

Commits on May 24, 2023

  1. Configuration menu
    Copy the full SHA
    af620be View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8ae9a49 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2023

  1. Revert "fix: add validation of GuardDuty filter name"

    This reverts commit 931f43f.
    ewbankkit committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    4d0b83f View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' into HEAD

    # Conflicts:
    #	website/docs/r/guardduty_detector.html.markdown
    ewbankkit committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    ed33675 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    67e3d65 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ef26485 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0c57c34 View commit details
    Browse the repository at this point in the history
  6. Acceptance test output:

    % make testacc TESTARGS='-run=TestAccGuardDuty_serial/Filter' PKG=guardduty
    ==> Checking that code complies with gofmt requirements...
    TF_ACC=1 go test ./internal/service/guardduty/... -v -count 1 -parallel 20  -run=TestAccGuardDuty_serial/Filter -timeout 360m
    === RUN   TestAccGuardDuty_serial
    === PAUSE TestAccGuardDuty_serial
    === CONT  TestAccGuardDuty_serial
    === RUN   TestAccGuardDuty_serial/Filter
    === RUN   TestAccGuardDuty_serial/Filter/basic
    === RUN   TestAccGuardDuty_serial/Filter/update
    === RUN   TestAccGuardDuty_serial/Filter/tags
    === RUN   TestAccGuardDuty_serial/Filter/disappears
    --- PASS: TestAccGuardDuty_serial (172.71s)
        --- PASS: TestAccGuardDuty_serial/Filter (172.71s)
            --- PASS: TestAccGuardDuty_serial/Filter/basic (49.88s)
            --- PASS: TestAccGuardDuty_serial/Filter/update (38.80s)
            --- PASS: TestAccGuardDuty_serial/Filter/tags (58.11s)
            --- PASS: TestAccGuardDuty_serial/Filter/disappears (25.92s)
    PASS
    ok  	github.com/hashicorp/terraform-provider-aws/internal/service/guardduty	177.788s
    ewbankkit committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    2178e6f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    774d374 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2023

  1. Configuration menu
    Copy the full SHA
    c3c684b View commit details
    Browse the repository at this point in the history
  2. Acceptance test output:

    % make testacc TESTARGS='-run=TestAccGuardDuty_serial' PKG=guardduty
    ==> Checking that code complies with gofmt requirements...
    TF_ACC=1 go test ./internal/service/guardduty/... -v -count 1 -parallel 20  -run=TestAccGuardDuty_serial -timeout 360m
    === RUN   TestAccGuardDuty_serial
    === PAUSE TestAccGuardDuty_serial
    === CONT  TestAccGuardDuty_serial
    === RUN   TestAccGuardDuty_serial/InviteAccepter
    === RUN   TestAccGuardDuty_serial/InviteAccepter/basic
        guardduty_test.go:84: Environment variable AWS_GUARDDUTY_MEMBER_ACCOUNT_ID is not set. To properly test inviting GuardDuty member accounts, a valid AWS account ID must be provided.
    === RUN   TestAccGuardDuty_serial/IPSet
    === RUN   TestAccGuardDuty_serial/IPSet/basic
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/IPSet/tags
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/OrganizationConfiguration
    === RUN   TestAccGuardDuty_serial/OrganizationConfiguration/s3Logs
        acctest.go:926: skipping tests; this AWS account must not be an existing member of an AWS Organization
    === RUN   TestAccGuardDuty_serial/OrganizationConfiguration/kubernetes
        acctest.go:926: skipping tests; this AWS account must not be an existing member of an AWS Organization
    === RUN   TestAccGuardDuty_serial/OrganizationConfiguration/malwareProtection
        acctest.go:926: skipping tests; this AWS account must not be an existing member of an AWS Organization
    === RUN   TestAccGuardDuty_serial/OrganizationConfiguration/basic
        acctest.go:926: skipping tests; this AWS account must not be an existing member of an AWS Organization
    === RUN   TestAccGuardDuty_serial/OrganizationConfiguration/autoEnableOrganizationMembers
        acctest.go:926: skipping tests; this AWS account must not be an existing member of an AWS Organization
    === RUN   TestAccGuardDuty_serial/Detector
    === RUN   TestAccGuardDuty_serial/Detector/features_ebs_malware_protection
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/features_rds_login_events
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/features_eks_runtime_monitoring
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/datasource_basic
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/datasource_id
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/datasources_malware_protection
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/datasources_all
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/features_eks_audit_logs
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/features_s3_data_events
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/tags
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/basic
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/datasources_s3logs
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Detector/datasources_kubernetes_audit_logs
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Filter
    === RUN   TestAccGuardDuty_serial/Filter/basic
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Filter/update
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Filter/tags
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Filter/disappears
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/FindingIDs
    === RUN   TestAccGuardDuty_serial/FindingIDs/datasource_basic
    === RUN   TestAccGuardDuty_serial/OrganizationAdminAccount
    === RUN   TestAccGuardDuty_serial/OrganizationAdminAccount/basic
        acctest.go:926: skipping tests; this AWS account must not be an existing member of an AWS Organization
    === RUN   TestAccGuardDuty_serial/ThreatIntelSet
    === RUN   TestAccGuardDuty_serial/ThreatIntelSet/basic
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/ThreatIntelSet/tags
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Member
    === RUN   TestAccGuardDuty_serial/Member/basic
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/Member/inviteOnUpdate
        guardduty_test.go:84: Environment variable AWS_GUARDDUTY_MEMBER_ACCOUNT_ID is not set. To properly test inviting GuardDuty member accounts, a valid AWS account ID must be provided.
    === RUN   TestAccGuardDuty_serial/Member/inviteDisassociate
        guardduty_test.go:84: Environment variable AWS_GUARDDUTY_MEMBER_ACCOUNT_ID is not set. To properly test inviting GuardDuty member accounts, a valid AWS account ID must be provided.
    === RUN   TestAccGuardDuty_serial/Member/invitationMessage
        guardduty_test.go:84: Environment variable AWS_GUARDDUTY_MEMBER_ACCOUNT_ID is not set. To properly test inviting GuardDuty member accounts, a valid AWS account ID must be provided.
    === RUN   TestAccGuardDuty_serial/PublishingDestination
    === RUN   TestAccGuardDuty_serial/PublishingDestination/basic
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    === RUN   TestAccGuardDuty_serial/PublishingDestination/disappears
        guardduty_test.go:128: this AWS account has a GuardDuty Detector
    --- PASS: TestAccGuardDuty_serial (72.79s)
        --- PASS: TestAccGuardDuty_serial/InviteAccepter (0.00s)
            --- SKIP: TestAccGuardDuty_serial/InviteAccepter/basic (0.00s)
        --- PASS: TestAccGuardDuty_serial/IPSet (1.15s)
            --- SKIP: TestAccGuardDuty_serial/IPSet/basic (1.03s)
            --- SKIP: TestAccGuardDuty_serial/IPSet/tags (0.12s)
        --- PASS: TestAccGuardDuty_serial/OrganizationConfiguration (5.03s)
            --- SKIP: TestAccGuardDuty_serial/OrganizationConfiguration/s3Logs (0.21s)
            --- SKIP: TestAccGuardDuty_serial/OrganizationConfiguration/kubernetes (0.11s)
            --- SKIP: TestAccGuardDuty_serial/OrganizationConfiguration/malwareProtection (1.96s)
            --- SKIP: TestAccGuardDuty_serial/OrganizationConfiguration/basic (0.11s)
            --- SKIP: TestAccGuardDuty_serial/OrganizationConfiguration/autoEnableOrganizationMembers (2.64s)
        --- PASS: TestAccGuardDuty_serial/Detector (1.45s)
            --- SKIP: TestAccGuardDuty_serial/Detector/features_ebs_malware_protection (0.11s)
            --- SKIP: TestAccGuardDuty_serial/Detector/features_rds_login_events (0.11s)
            --- SKIP: TestAccGuardDuty_serial/Detector/features_eks_runtime_monitoring (0.12s)
            --- SKIP: TestAccGuardDuty_serial/Detector/datasource_basic (0.11s)
            --- SKIP: TestAccGuardDuty_serial/Detector/datasource_id (0.11s)
            --- SKIP: TestAccGuardDuty_serial/Detector/datasources_malware_protection (0.11s)
            --- SKIP: TestAccGuardDuty_serial/Detector/datasources_all (0.12s)
            --- SKIP: TestAccGuardDuty_serial/Detector/features_eks_audit_logs (0.11s)
            --- SKIP: TestAccGuardDuty_serial/Detector/features_s3_data_events (0.11s)
            --- SKIP: TestAccGuardDuty_serial/Detector/tags (0.12s)
            --- SKIP: TestAccGuardDuty_serial/Detector/basic (0.11s)
            --- SKIP: TestAccGuardDuty_serial/Detector/datasources_s3logs (0.11s)
            --- SKIP: TestAccGuardDuty_serial/Detector/datasources_kubernetes_audit_logs (0.10s)
        --- PASS: TestAccGuardDuty_serial/Filter (0.47s)
            --- SKIP: TestAccGuardDuty_serial/Filter/basic (0.12s)
            --- SKIP: TestAccGuardDuty_serial/Filter/update (0.11s)
            --- SKIP: TestAccGuardDuty_serial/Filter/tags (0.12s)
            --- SKIP: TestAccGuardDuty_serial/Filter/disappears (0.11s)
        --- PASS: TestAccGuardDuty_serial/FindingIDs (63.93s)
            --- PASS: TestAccGuardDuty_serial/FindingIDs/datasource_basic (63.93s)
        --- PASS: TestAccGuardDuty_serial/OrganizationAdminAccount (0.21s)
            --- SKIP: TestAccGuardDuty_serial/OrganizationAdminAccount/basic (0.21s)
        --- PASS: TestAccGuardDuty_serial/ThreatIntelSet (0.22s)
            --- SKIP: TestAccGuardDuty_serial/ThreatIntelSet/basic (0.11s)
            --- SKIP: TestAccGuardDuty_serial/ThreatIntelSet/tags (0.11s)
        --- PASS: TestAccGuardDuty_serial/Member (0.13s)
            --- SKIP: TestAccGuardDuty_serial/Member/basic (0.13s)
            --- SKIP: TestAccGuardDuty_serial/Member/inviteOnUpdate (0.00s)
            --- SKIP: TestAccGuardDuty_serial/Member/inviteDisassociate (0.00s)
            --- SKIP: TestAccGuardDuty_serial/Member/invitationMessage (0.00s)
        --- PASS: TestAccGuardDuty_serial/PublishingDestination (0.21s)
            --- SKIP: TestAccGuardDuty_serial/PublishingDestination/basic (0.11s)
            --- SKIP: TestAccGuardDuty_serial/PublishingDestination/disappears (0.11s)
    PASS
    ok  	github.com/hashicorp/terraform-provider-aws/internal/service/guardduty	78.326s
    ewbankkit committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    c892dba View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    84b6b3c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c56ee3d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3d5208f View commit details
    Browse the repository at this point in the history
  6. Add CHANGELOG entry.

    ewbankkit committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    bce6c0c View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2023

  1. Replace 'aws_guardduty_detector.feature' attribute with new resource …

    …'aws_guardduty_detector_feature'.
    ewbankkit committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    1324027 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f85835e View commit details
    Browse the repository at this point in the history
  3. Acceptance test output:

    % make testacc TESTARGS='-run=TestAccGuardDuty_serial/DetectorFeature' PKG=guardduty
    ==> Checking that code complies with gofmt requirements...
    TF_ACC=1 go test ./internal/service/guardduty/... -v -count 1 -parallel 20  -run=TestAccGuardDuty_serial/DetectorFeature -timeout 360m
    === RUN   TestAccGuardDuty_serial
    === PAUSE TestAccGuardDuty_serial
    === CONT  TestAccGuardDuty_serial
    === RUN   TestAccGuardDuty_serial/DetectorFeature
    === RUN   TestAccGuardDuty_serial/DetectorFeature/basic
    --- PASS: TestAccGuardDuty_serial (26.71s)
        --- PASS: TestAccGuardDuty_serial/DetectorFeature (26.71s)
            --- PASS: TestAccGuardDuty_serial/DetectorFeature/basic (26.71s)
    PASS
    ok  	github.com/hashicorp/terraform-provider-aws/internal/service/guardduty	32.307s
    ewbankkit committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    497fd2f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0f6f312 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    caddb58 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    10be4c2 View commit details
    Browse the repository at this point in the history
  7. Acceptance test output:

    % make testacc TESTARGS='-run=TestAccGuardDuty_serial/DetectorFeature/multiple' PKG=guardduty
    ==> Checking that code complies with gofmt requirements...
    TF_ACC=1 go test ./internal/service/guardduty/... -v -count 1 -parallel 20  -run=TestAccGuardDuty_serial/DetectorFeature/multiple -timeout 360m
    === RUN   TestAccGuardDuty_serial
    === PAUSE TestAccGuardDuty_serial
    === CONT  TestAccGuardDuty_serial
    === RUN   TestAccGuardDuty_serial/DetectorFeature
    === RUN   TestAccGuardDuty_serial/DetectorFeature/multiple
    --- PASS: TestAccGuardDuty_serial (62.34s)
        --- PASS: TestAccGuardDuty_serial/DetectorFeature (62.34s)
            --- PASS: TestAccGuardDuty_serial/DetectorFeature/multiple (62.34s)
    PASS
    ok  	github.com/hashicorp/terraform-provider-aws/internal/service/guardduty	67.776s
    ewbankkit committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    5b42786 View commit details
    Browse the repository at this point in the history
  8. Revert "r/aws_guardduty_detector_feature: Serialize calls to UpdateDe…

    …tector."
    
    This reverts commit 10be4c2.
    ewbankkit committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    f48dc59 View commit details
    Browse the repository at this point in the history
  9. Acceptance test output:

    % make testacc TESTARGS='-run=TestAccGuardDuty_serial/DetectorFeature/multiple' PKG=guardduty
    ==> Checking that code complies with gofmt requirements...
    TF_ACC=1 go test ./internal/service/guardduty/... -v -count 1 -parallel 20  -run=TestAccGuardDuty_serial/DetectorFeature/multiple -timeout 360m
    === RUN   TestAccGuardDuty_serial
    === PAUSE TestAccGuardDuty_serial
    === CONT  TestAccGuardDuty_serial
    === RUN   TestAccGuardDuty_serial/DetectorFeature
    === RUN   TestAccGuardDuty_serial/DetectorFeature/multiple
    --- PASS: TestAccGuardDuty_serial (57.49s)
        --- PASS: TestAccGuardDuty_serial/DetectorFeature (57.49s)
            --- PASS: TestAccGuardDuty_serial/DetectorFeature/multiple (57.49s)
    PASS
    ok  	github.com/hashicorp/terraform-provider-aws/internal/service/guardduty	62.908s
    ewbankkit committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    b470735 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5577fe9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    cb9532f View commit details
    Browse the repository at this point in the history
  12. Acceptance test output:

    % make testacc TESTARGS='-run=TestAccGuardDuty_serial/^Detector$$/datasource_' PKG=guardduty
    ==> Checking that code complies with gofmt requirements...
    TF_ACC=1 go test ./internal/service/guardduty/... -v -count 1 -parallel 20  -run=TestAccGuardDuty_serial/^Detector$/datasource_ -timeout 360m
    === RUN   TestAccGuardDuty_serial
    === PAUSE TestAccGuardDuty_serial
    === CONT  TestAccGuardDuty_serial
    === RUN   TestAccGuardDuty_serial/Detector
    === RUN   TestAccGuardDuty_serial/Detector/datasource_basic
    === RUN   TestAccGuardDuty_serial/Detector/datasource_id
    --- PASS: TestAccGuardDuty_serial (43.59s)
        --- PASS: TestAccGuardDuty_serial/Detector (43.59s)
            --- PASS: TestAccGuardDuty_serial/Detector/datasource_basic (22.86s)
            --- PASS: TestAccGuardDuty_serial/Detector/datasource_id (20.73s)
    PASS
    ok  	github.com/hashicorp/terraform-provider-aws/internal/service/guardduty	48.907s
    ewbankkit committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    c720554 View commit details
    Browse the repository at this point in the history
  13. Fix markdownlint 'MD047/single-trailing-newline Files should end with…

    … a single newline character'.
    ewbankkit committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    5a114e4 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2023

  1. Configuration menu
    Copy the full SHA
    1eaf3c5 View commit details
    Browse the repository at this point in the history