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

fix: Add skip_destroy to be present in diff. #30354

Merged
merged 3 commits into from
Dec 11, 2023
Merged

Conversation

grahamhar
Copy link
Contributor

Description

As reported in #30353 on some occasions a plan or apply fails with the following error

    │ aws_cloudwatch_log_group.log_group
    │ to include new values learned so far during apply, provider
    │ "registry.terraform.io/hashicorp/aws" produced an invalid new value for
    │ .skip_destroy: was cty.False, but now null.
    │
    │ This is a bug in the provider, which should be reported in the provider's
    │ own issue tracker.

The fix was inspired by #29812

Relations

Closes #30353

References

Output from Acceptance Testing

 make testacc TESTS="TestAccLogsGroup*" PKG=logs
    ==> Checking that code complies with gofmt requirements...
    TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 20 -run='TestAccLogsGroup*'  -timeout 180m
    === RUN   TestAccLogsGroupDataSource_basic
    === PAUSE TestAccLogsGroupDataSource_basic
    === RUN   TestAccLogsGroup_basic
    === PAUSE TestAccLogsGroup_basic
    === RUN   TestAccLogsGroup_nameGenerate
    === PAUSE TestAccLogsGroup_nameGenerate
    === RUN   TestAccLogsGroup_namePrefix
    === PAUSE TestAccLogsGroup_namePrefix
    === RUN   TestAccLogsGroup_disappears
    === PAUSE TestAccLogsGroup_disappears
    === RUN   TestAccLogsGroup_tags
    === PAUSE TestAccLogsGroup_tags
    === RUN   TestAccLogsGroup_kmsKey
    === PAUSE TestAccLogsGroup_kmsKey
    === RUN   TestAccLogsGroup_retentionPolicy
    === PAUSE TestAccLogsGroup_retentionPolicy
    === RUN   TestAccLogsGroup_multiple
    === PAUSE TestAccLogsGroup_multiple
    === RUN   TestAccLogsGroup_skipDestroy
    === PAUSE TestAccLogsGroup_skipDestroy
    === RUN   TestAccLogsGroup_skipDestroyInconsistentPlan
    === PAUSE TestAccLogsGroup_skipDestroyInconsistentPlan
    === RUN   TestAccLogsGroupsDataSource_basic
    === PAUSE TestAccLogsGroupsDataSource_basic
    === RUN   TestAccLogsGroupsDataSource_noPrefix
    === PAUSE TestAccLogsGroupsDataSource_noPrefix
    === CONT  TestAccLogsGroupDataSource_basic
    === CONT  TestAccLogsGroup_retentionPolicy
    === CONT  TestAccLogsGroup_nameGenerate
    === CONT  TestAccLogsGroup_multiple
    === CONT  TestAccLogsGroup_basic
    === CONT  TestAccLogsGroup_disappears
    === CONT  TestAccLogsGroup_kmsKey
    === CONT  TestAccLogsGroup_skipDestroyInconsistentPlan
    === CONT  TestAccLogsGroupsDataSource_noPrefix
    === CONT  TestAccLogsGroup_namePrefix
    === CONT  TestAccLogsGroup_tags
    === CONT  TestAccLogsGroupsDataSource_basic
    === CONT  TestAccLogsGroup_skipDestroy
    --- PASS: TestAccLogsGroup_disappears (94.05s)
    --- PASS: TestAccLogsGroupsDataSource_basic (96.80s)
    --- PASS: TestAccLogsGroup_multiple (99.32s)
    --- PASS: TestAccLogsGroup_skipDestroy (100.02s)
    --- PASS: TestAccLogsGroupDataSource_basic (100.12s)
    --- PASS: TestAccLogsGroupsDataSource_noPrefix (101.94s)
    --- PASS: TestAccLogsGroup_nameGenerate (119.04s)
    --- PASS: TestAccLogsGroup_namePrefix (119.61s)
    --- PASS: TestAccLogsGroup_basic (120.16s)
    --- PASS: TestAccLogsGroup_skipDestroyInconsistentPlan (138.36s)
    --- PASS: TestAccLogsGroup_retentionPolicy (194.55s)
    --- PASS: TestAccLogsGroup_tags (194.74s)
    --- PASS: TestAccLogsGroup_kmsKey (199.30s)
    PASS
    ok      github.com/hashicorp/terraform-provider-aws/internal/service/logs       202.631s

@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 needs-triage Waiting for first response or review from a maintainer. service/logs Issues and PRs that pertain to the logs service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/S Managed by automation to categorize the size of a PR. and removed tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. service/logs Issues and PRs that pertain to the logs service. labels Mar 30, 2023
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. service/logs Issues and PRs that pertain to the logs service. labels Mar 30, 2023
@SizZiKe
Copy link

SizZiKe commented May 9, 2023

@justinretzolk what's blocking this from being merged? We're being affected by this provider bug.

@justinretzolk
Copy link
Member

Hey @SizZiKe 👋 Thank you for checking in on this! Unfortunately I can't provide an ETA on when this will be reviewed/merged due to the potential of shifting priorities. We prioritize by count of 👍 reactions and a few other things (more information on our prioritization guide if you're interested).

@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label May 29, 2023
# Conflicts:
#	internal/service/logs/group_test.go
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=TestAccLogsGroup_' PKG=logs ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 2  -run=TestAccLogsGroup_ -timeout 360m
=== RUN   TestAccLogsGroup_basic
=== PAUSE TestAccLogsGroup_basic
=== RUN   TestAccLogsGroup_nameGenerate
=== PAUSE TestAccLogsGroup_nameGenerate
=== RUN   TestAccLogsGroup_namePrefix
=== PAUSE TestAccLogsGroup_namePrefix
=== RUN   TestAccLogsGroup_disappears
=== PAUSE TestAccLogsGroup_disappears
=== RUN   TestAccLogsGroup_tags
=== PAUSE TestAccLogsGroup_tags
=== RUN   TestAccLogsGroup_kmsKey
=== PAUSE TestAccLogsGroup_kmsKey
=== RUN   TestAccLogsGroup_logGroupClass
=== PAUSE TestAccLogsGroup_logGroupClass
=== RUN   TestAccLogsGroup_retentionPolicy
=== PAUSE TestAccLogsGroup_retentionPolicy
=== RUN   TestAccLogsGroup_multiple
=== PAUSE TestAccLogsGroup_multiple
=== RUN   TestAccLogsGroup_skipDestroy
=== PAUSE TestAccLogsGroup_skipDestroy
=== RUN   TestAccLogsGroup_skipDestroyInconsistentPlan
=== PAUSE TestAccLogsGroup_skipDestroyInconsistentPlan
=== CONT  TestAccLogsGroup_basic
=== CONT  TestAccLogsGroup_logGroupClass
--- PASS: TestAccLogsGroup_logGroupClass (16.73s)
=== CONT  TestAccLogsGroup_skipDestroy
--- PASS: TestAccLogsGroup_basic (20.15s)
=== CONT  TestAccLogsGroup_skipDestroyInconsistentPlan
--- PASS: TestAccLogsGroup_skipDestroy (15.15s)
=== CONT  TestAccLogsGroup_disappears
--- PASS: TestAccLogsGroup_skipDestroyInconsistentPlan (25.85s)
=== CONT  TestAccLogsGroup_kmsKey
--- PASS: TestAccLogsGroup_disappears (16.79s)
=== CONT  TestAccLogsGroup_tags
--- PASS: TestAccLogsGroup_tags (42.56s)
=== CONT  TestAccLogsGroup_multiple
--- PASS: TestAccLogsGroup_kmsKey (50.15s)
=== CONT  TestAccLogsGroup_namePrefix
--- PASS: TestAccLogsGroup_multiple (15.53s)
=== CONT  TestAccLogsGroup_retentionPolicy
--- PASS: TestAccLogsGroup_namePrefix (18.59s)
=== CONT  TestAccLogsGroup_nameGenerate
--- PASS: TestAccLogsGroup_nameGenerate (19.00s)
--- PASS: TestAccLogsGroup_retentionPolicy (41.40s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/logs	153.417s

@ewbankkit
Copy link
Contributor

@grahamhar Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit e5494a2 into hashicorp:main Dec 11, 2023
36 checks passed
@github-actions github-actions bot added this to the v5.31.0 milestone Dec 11, 2023
Copy link

This functionality has been released in v5.31.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!

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 Jan 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/logs Issues and PRs that pertain to the logs service. size/S 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.

[Bug]: aws_cloudwatch_log_group invalid value for skip_destroy
4 participants