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

Macie Macie2 Classification Results - Export Configuration #19856 #26105

Conversation

nickolivera
Copy link
Contributor

@nickolivera nickolivera commented Aug 3, 2022

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 #19856

Two things:

  • Import doesn't care about IDs, there's only one resource, the API takes care of not found, etc. Documentation has a dummy value
  • Objects returned from the API are not nil (at least the first Configuration property) but empty structs,
string=(*macie2.GetClassificationExportConfigurationOutput)(0x140002091e8)({
│   Configuration: {
│ 
│   }
│ })

so my comparison might be unorthodox to check if the object are empty or if the resource already exists. Can I get some feedback for this approach? I could go checking if output.Configuration.SetS3Destination != nil if that makes more sense.

Output from acceptance testing:

nick@nick1 terraform-provider-aws % make testacc TESTARGS='-run=TestAccMacie2_serial/ClassificationExportConfiguration' PKG=macie2 ACCTEST_PARALLELISM=1
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/macie2/... -v -count 1 -parallel 1  -run=TestAccMacie2_serial/ClassificationExportConfiguration -timeout 180m
=== RUN   TestAccMacie2_serial
=== RUN   TestAccMacie2_serial/ClassificationExportConfiguration
=== RUN   TestAccMacie2_serial/ClassificationExportConfiguration/basic
--- PASS: TestAccMacie2_serial (37.65s)
    --- PASS: TestAccMacie2_serial/ClassificationExportConfiguration (37.65s)
        --- PASS: TestAccMacie2_serial/ClassificationExportConfiguration/basic (37.65s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/macie2     39.333s


...

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/macie2 Issues and PRs that pertain to the macie2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. and removed documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. provider Pertains to the provider itself, rather than any interaction with AWS. service/macie2 Issues and PRs that pertain to the macie2 service. labels Aug 3, 2022
@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/macie2 Issues and PRs that pertain to the macie2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 3, 2022
@ewbankkit ewbankkit added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 3, 2022
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 TESTARGS='-run=TestAccMacie2_serial/ClassificationExportConfiguration' PKG=macie2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/macie2/... -v -count 1 -parallel 20  -run=TestAccMacie2_serial/ClassificationExportConfiguration -timeout 180m
=== RUN   TestAccMacie2_serial
=== RUN   TestAccMacie2_serial/ClassificationExportConfiguration
=== RUN   TestAccMacie2_serial/ClassificationExportConfiguration/basic
--- PASS: TestAccMacie2_serial (49.57s)
    --- PASS: TestAccMacie2_serial/ClassificationExportConfiguration (49.57s)
        --- PASS: TestAccMacie2_serial/ClassificationExportConfiguration/basic (49.57s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/macie2	55.719s

@ewbankkit
Copy link
Contributor

@nickyamanaka Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 404fb60 into hashicorp:main Aug 3, 2022
@github-actions github-actions bot added this to the v4.25.0 milestone Aug 3, 2022
@github-actions
Copy link

github-actions bot commented Aug 4, 2022

This functionality has been released in v4.25.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

github-actions bot commented Sep 4, 2022

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 Sep 4, 2022
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. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/macie2 Issues and PRs that pertain to the macie2 service. size/XL 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.

Macie 2 Classification Export Configuration Support
2 participants