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_configservice_config_rule: fix nil output handling #32439

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Jul 10, 2023

Description

Properly returns an error when the describe config rule API call returns a nil response.

Relations

Closes #31559

Output from Acceptance Testing

$ make testacc PKG=configservice TESTARGS='-run=TestAccConfigService_serial/Config'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/configservice/... -v -count 1 -parallel 20  -run=TestAccConfigService_serial/Config -timeout 180m

--- PASS: TestAccConfigService_serial (1763.38s)
    --- PASS: TestAccConfigService_serial/RemediationConfiguration (643.82s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/updates (98.11s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/values (86.53s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/basic (86.28s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/basicBackward (86.26s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/disappears (84.06s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/migrateParameters (102.08s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/recreates (100.49s)
    --- PASS: TestAccConfigService_serial/Config (850.48s)
        --- PASS: TestAccConfigService_serial/Config/basic (83.78s)
        --- PASS: TestAccConfigService_serial/Config/ownerAws (85.88s)
        --- PASS: TestAccConfigService_serial/Config/scopeTagValue (96.52s)
        --- PASS: TestAccConfigService_serial/Config/tags (113.23s)
        --- PASS: TestAccConfigService_serial/Config/disappears (83.18s)
        --- PASS: TestAccConfigService_serial/Config/customlambda (122.09s)
        --- PASS: TestAccConfigService_serial/Config/customPolicy (86.03s)
        --- PASS: TestAccConfigService_serial/Config/scopeTagKey (96.49s)
        --- PASS: TestAccConfigService_serial/Config/scopeTagKeyEmpty (83.28s)
    --- PASS: TestAccConfigService_serial/ConfigurationRecorderStatus (135.74s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorderStatus/basic (33.68s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorderStatus/startEnabled (65.33s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorderStatus/importBasic (36.72s)
    --- PASS: TestAccConfigService_serial/ConfigurationRecorder (133.34s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorder/basic (35.11s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorder/allParams (32.25s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorder/recordStrategy (32.91s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorder/disappears (33.07s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/configservice      1766.651s

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. service/configservice Issues and PRs that pertain to the configservice service. labels Jul 10, 2023
@jar-b jar-b marked this pull request as ready for review July 10, 2023 16:51
Copy link
Contributor

@johnsonaj johnsonaj 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 PKG=configservice TESTARGS='-run=TestAccConfigService_serial/Config'

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/configservice/... -v -count 1 -parallel 20  -run=TestAccConfigService_serial/Config -timeout 180m
--- PASS: TestAccConfigService_serial (1783.63s)
    --- PASS: TestAccConfigService_serial/ConfigurationRecorderStatus (126.33s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorderStatus/basic (32.48s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorderStatus/startEnabled (59.07s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorderStatus/importBasic (34.77s)
    --- PASS: TestAccConfigService_serial/RemediationConfiguration (651.87s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/recreates (98.33s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/updates (98.95s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/values (87.53s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/basic (88.52s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/basicBackward (88.07s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/disappears (85.83s)
        --- PASS: TestAccConfigService_serial/RemediationConfiguration/migrateParameters (104.63s)
    --- PASS: TestAccConfigService_serial/Config (871.04s)
        --- PASS: TestAccConfigService_serial/Config/basic (85.21s)
        --- PASS: TestAccConfigService_serial/Config/ownerAws (87.70s)
        --- PASS: TestAccConfigService_serial/Config/scopeTagValue (100.06s)
        --- PASS: TestAccConfigService_serial/Config/customlambda (123.31s)
        --- PASS: TestAccConfigService_serial/Config/customPolicy (87.52s)
        --- PASS: TestAccConfigService_serial/Config/scopeTagKey (99.68s)
        --- PASS: TestAccConfigService_serial/Config/scopeTagKeyEmpty (85.86s)
        --- PASS: TestAccConfigService_serial/Config/tags (117.42s)
        --- PASS: TestAccConfigService_serial/Config/disappears (84.28s)
    --- PASS: TestAccConfigService_serial/ConfigurationRecorder (134.39s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorder/disappears (34.42s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorder/basic (35.60s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorder/allParams (32.33s)
        --- PASS: TestAccConfigService_serial/ConfigurationRecorder/recordStrategy (32.05s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/configservice	1786.922s

@jar-b jar-b merged commit cfef98a into main Jul 10, 2023
@jar-b jar-b deleted the b-aws_configservice_config_rule-panic-fix branch July 10, 2023 19:03
@github-actions github-actions bot added this to the v5.8.0 milestone Jul 10, 2023
github-actions bot pushed a commit that referenced this pull request Jul 10, 2023
@github-actions
Copy link

This functionality has been released in v5.8.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 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/configservice Issues and PRs that pertain to the configservice service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
2 participants