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

r/aws_guardduty: Add argument finding_publishing_frequency to aws_guardduty_detector #6922

Merged
merged 3 commits into from
Dec 19, 2018
Merged

Conversation

olemathias
Copy link
Contributor

Changes proposed in this pull request:

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSGuardDuty'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccAWSGuardDuty -timeout 120m
=== RUN   TestAccAWSGuardDuty
=== RUN   TestAccAWSGuardDuty/Detector
=== RUN   TestAccAWSGuardDuty/Detector/import
=== RUN   TestAccAWSGuardDuty/Detector/basic
=== RUN   TestAccAWSGuardDuty/IPSet
=== RUN   TestAccAWSGuardDuty/IPSet/basic
=== RUN   TestAccAWSGuardDuty/IPSet/import
=== RUN   TestAccAWSGuardDuty/ThreatIntelSet
=== RUN   TestAccAWSGuardDuty/ThreatIntelSet/basic
=== RUN   TestAccAWSGuardDuty/ThreatIntelSet/import
=== RUN   TestAccAWSGuardDuty/Member
=== RUN   TestAccAWSGuardDuty/Member/basic
=== RUN   TestAccAWSGuardDuty/Member/inviteOnUpdate
=== RUN   TestAccAWSGuardDuty/Member/inviteDisassociate
=== RUN   TestAccAWSGuardDuty/Member/invitationMessage
--- PASS: TestAccAWSGuardDuty (290.22s)
    --- PASS: TestAccAWSGuardDuty/Detector (64.55s)
        --- PASS: TestAccAWSGuardDuty/Detector/import (16.73s)
        --- PASS: TestAccAWSGuardDuty/Detector/basic (47.83s)
    --- PASS: TestAccAWSGuardDuty/IPSet (104.54s)
        --- PASS: TestAccAWSGuardDuty/IPSet/basic (63.51s)
        --- PASS: TestAccAWSGuardDuty/IPSet/import (41.04s)
    --- PASS: TestAccAWSGuardDuty/ThreatIntelSet (101.92s)
        --- PASS: TestAccAWSGuardDuty/ThreatIntelSet/basic (63.08s)
        --- PASS: TestAccAWSGuardDuty/ThreatIntelSet/import (38.83s)
    --- PASS: TestAccAWSGuardDuty/Member (19.20s)
        --- PASS: TestAccAWSGuardDuty/Member/basic (19.20s)
        --- SKIP: TestAccAWSGuardDuty/Member/inviteOnUpdate (0.00s)
            resource_aws_guardduty_test.go:46: 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.
        --- SKIP: TestAccAWSGuardDuty/Member/inviteDisassociate (0.00s)
            resource_aws_guardduty_test.go:46: 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.
        --- SKIP: TestAccAWSGuardDuty/Member/invitationMessage (0.00s)
            resource_aws_guardduty_test.go:46: 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.
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	290.233s

@ghost ghost added size/XS 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. labels Dec 19, 2018
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 19, 2018
@bflad bflad added this to the v1.53.0 milestone Dec 19, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @olemathias! 🚀

"finding_publishing_frequency": {
Type: schema.TypeString,
Optional: true,
Default: "SIX_HOURS",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: We can use the AWS Go SDK provided constant here and add plan time validation for this attribute via:

Default: guardduty.FindingPublishingFrequencySixHours,
ValidateFunc: validation.StringInSlice([]string{
  guardduty.FindingPublishingFrequencyFifteenMinutes,
  guardduty.FindingPublishingFrequencyOneHour,
  guardduty.FindingPublishingFrequencySixHours
}, false),

@bflad bflad merged commit aa09edd into hashicorp:master Dec 19, 2018
bflad added a commit that referenced this pull request Dec 19, 2018
@bflad
Copy link
Contributor

bflad commented Dec 20, 2018

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

@ghost
Copy link

ghost commented Apr 1, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
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. enhancement Requests to existing resources that expand the functionality or scope. service/guardduty Issues and PRs that pertain to the guardduty service. size/XS 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.

2 participants