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

Documentation bug: aws_guardduty_filter should say that spaces are not allowed in name #19893

Closed
fzipi360 opened this issue Jun 18, 2021 · 2 comments · Fixed by #31463
Closed
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/guardduty Issues and PRs that pertain to the guardduty service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Milestone

Comments

@fzipi360
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

Terraform CLI and Terraform AWS Provider Version

Affected Resource(s)

  • aws_guardduty_filter

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

data "aws_guardduty_detector" "org" {}

resource "aws_guardduty_filter" "test_remove_from_tor" {
  name        = "Access using AWS Public keys from Tor IPs"
  action      = "ARCHIVE"
  detector_id = data.aws_guardduty_detector.org.id
  rank        = 1

  finding_criteria {
    criterion {
      field  = "type"
      equals = ["UnauthorizedAccess:S3/TorIPCaller"]
    }

    criterion {
      field  = "resource.s3BucketDetails.name"
      equals = ["we-dont-care-about-this-one"]
    }

    criterion {
      field                 = "severity"
      greater_than_or_equal = "4"
    }
  }
}

Debug Output

Panic Output

Expected Behavior

aws guardduty filter created.

Actual Behavior

Fails with:

❯ terraform apply "gd.plan"
...
│ Error: error creating GuardDuty Filter: InternalServerErrorException: The request is rejected because an invalid or out-of-range value is specified as an input parameter.
│ {
│   RespMetadata: {
│     StatusCode: 400,
│     RequestID: "70563976-046f-4840-a52a-57b247d83e25"
│   },
│   Message_: "The request is rejected because an invalid or out-of-range value is specified as an input parameter.",
│   Type: "InvalidInputException"
│ }
│
│   with aws_guardduty_filter.archive_public_keys_from_tor,
│   on guardduty.tf line 18, in resource "aws_guardduty_filter" "test_remove_from_tor":
│  18: resource "aws_guardduty_filter" "test_remove_from_tor" {

Didn't knew what the problem was until reviewing all the documentation and finding that spaces aren't allowed in the name :(

Steps to Reproduce

  1. terraform apply

Important Factoids

API documentation states that:

--name (string)

    The name of the filter. Minimum length of 3. Maximum length of 64. Valid characters include alphanumeric characters, dot (.), underscore (_), and dash (-). Spaces are not allowed.

References

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/guardduty Issues and PRs that pertain to the guardduty service. labels Jun 18, 2021
@ewbankkit ewbankkit added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 28, 2021
maxvt added a commit to maxvt/terraform-provider-aws that referenced this issue Sep 24, 2021
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Jun 18, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2023
@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 18, 2023
@github-actions github-actions bot added this to the v5.20.0 milestone Sep 29, 2023
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. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
2 participants