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

aws_lb_trust_store: wait for status ACTIVE #38332

Merged
merged 5 commits into from
Jul 12, 2024

Conversation

szemek
Copy link
Contributor

@szemek szemek commented Jul 11, 2024

Description

Changes implement waitTrustStoreActive function to wait until Trust Store changes its status to ACTIVE.

Relations

Closes #36825

References

Output from Acceptance Testing

terraform-provider-aws git:(b-wait-for-active-trust-store) $ make testacc TESTS=TestAccELBV2TrustStore PKG=elbv2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.4 test ./internal/service/elbv2/... -v -count 1 -parallel 20 -run='TestAccELBV2TrustStore'  -timeout 360m
=== RUN   TestAccELBV2TrustStoreDataSource_basic
=== PAUSE TestAccELBV2TrustStoreDataSource_basic
=== RUN   TestAccELBV2TrustStoreRevocation_basic
=== PAUSE TestAccELBV2TrustStoreRevocation_basic
=== RUN   TestAccELBV2TrustStore_tags
=== PAUSE TestAccELBV2TrustStore_tags
=== RUN   TestAccELBV2TrustStore_tags_null
=== PAUSE TestAccELBV2TrustStore_tags_null
=== RUN   TestAccELBV2TrustStore_tags_AddOnUpdate
=== PAUSE TestAccELBV2TrustStore_tags_AddOnUpdate
=== RUN   TestAccELBV2TrustStore_tags_EmptyTag_OnCreate
=== PAUSE TestAccELBV2TrustStore_tags_EmptyTag_OnCreate
=== RUN   TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Add
=== PAUSE TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Add
=== RUN   TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Replace
=== PAUSE TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Replace
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_providerOnly
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_providerOnly
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_nonOverlapping
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_nonOverlapping
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_overlapping
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_overlapping
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_updateToProviderOnly
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_updateToProviderOnly
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_updateToResourceOnly
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_updateToResourceOnly
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_emptyResourceTag
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_emptyResourceTag
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_emptyProviderOnlyTag
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_emptyProviderOnlyTag
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_nullOverlappingResourceTag
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_nullOverlappingResourceTag
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_nullNonOverlappingResourceTag
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_nullNonOverlappingResourceTag
=== RUN   TestAccELBV2TrustStore_tags_ComputedTag_OnCreate
=== PAUSE TestAccELBV2TrustStore_tags_ComputedTag_OnCreate
=== RUN   TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Add
=== PAUSE TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Add
=== RUN   TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Replace
=== PAUSE TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Replace
=== RUN   TestAccELBV2TrustStore_basic
=== PAUSE TestAccELBV2TrustStore_basic
=== RUN   TestAccELBV2TrustStore_statusActive
=== PAUSE TestAccELBV2TrustStore_statusActive
=== RUN   TestAccELBV2TrustStore_disappears
=== PAUSE TestAccELBV2TrustStore_disappears
=== RUN   TestAccELBV2TrustStore_nameGenerated
=== PAUSE TestAccELBV2TrustStore_nameGenerated
=== RUN   TestAccELBV2TrustStore_namePrefix
=== PAUSE TestAccELBV2TrustStore_namePrefix
=== CONT  TestAccELBV2TrustStoreDataSource_basic
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_emptyResourceTag
=== CONT  TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Replace
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_nullNonOverlappingResourceTag
=== CONT  TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Replace
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_overlapping
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_nullOverlappingResourceTag
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_nonOverlapping
=== CONT  TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Add
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_emptyProviderOnlyTag
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_providerOnly
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_updateToResourceOnly
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_updateToProviderOnly
=== CONT  TestAccELBV2TrustStore_tags_ComputedTag_OnCreate
=== CONT  TestAccELBV2TrustStore_tags_AddOnUpdate
=== CONT  TestAccELBV2TrustStore_disappears
=== CONT  TestAccELBV2TrustStore_namePrefix
=== CONT  TestAccELBV2TrustStore_nameGenerated
=== CONT  TestAccELBV2TrustStore_statusActive
=== CONT  TestAccELBV2TrustStore_basic
=== NAME  TestAccELBV2TrustStore_disappears
    trust_store_test.go:89: Error running post-test destroy, there may be dangling resources: exit status 1

        Error: waiting for ELBV2 Trust Store (arn:aws:elasticloadbalancing:eu-west-1:717639722864:truststore/tf-acc-test-8792722715880727353/dac22452249175ef) associations delete: couldn't find resource

--- FAIL: TestAccELBV2TrustStore_disappears (77.08s)
=== CONT  TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Add
--- PASS: TestAccELBV2TrustStore_statusActive (81.38s)
=== CONT  TestAccELBV2TrustStore_tags_EmptyTag_OnCreate
--- PASS: TestAccELBV2TrustStore_namePrefix (85.95s)
=== CONT  TestAccELBV2TrustStore_tags
--- PASS: TestAccELBV2TrustStore_tags_ComputedTag_OnCreate (91.34s)
=== CONT  TestAccELBV2TrustStore_tags_null
--- PASS: TestAccELBV2TrustStore_nameGenerated (93.62s)
=== CONT  TestAccELBV2TrustStoreRevocation_basic
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_nullNonOverlappingResourceTag (95.94s)
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_nullOverlappingResourceTag (96.45s)
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_emptyProviderOnlyTag (96.53s)
--- PASS: TestAccELBV2TrustStore_basic (97.03s)
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_emptyResourceTag (97.43s)
--- PASS: TestAccELBV2TrustStoreDataSource_basic (100.84s)
--- PASS: TestAccELBV2TrustStore_tags_AddOnUpdate (124.57s)
--- PASS: TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Replace (128.21s)
--- PASS: TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Add (133.86s)
--- PASS: TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Replace (142.89s)
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_updateToProviderOnly (145.61s)
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_updateToResourceOnly (146.43s)
--- PASS: TestAccELBV2TrustStoreRevocation_basic (58.11s)
--- PASS: TestAccELBV2TrustStore_tags_null (66.95s)
--- PASS: TestAccELBV2TrustStore_tags_EmptyTag_OnCreate (85.58s)
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_providerOnly (169.13s)
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_overlapping (173.68s)
--- PASS: TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Add (97.39s)
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_nonOverlapping (178.17s)
--- PASS: TestAccELBV2TrustStore_tags (112.95s)
FAIL
FAIL  github.com/hashicorp/terraform-provider-aws/internal/service/elbv2  203.720s
FAIL
make: *** [testacc] Error 1

I got Error for TestAccELBV2TrustStore_disappears test on main branch, so it might be a problem with a test itself.

terraform-provider-aws git:(main) make testacc TESTS=TestAccELBV2TrustStore_disappears PKG=elbv2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.4 test ./internal/service/elbv2/... -v -count 1 -parallel 20 -run='TestAccELBV2TrustStore_disappears'  -timeout 360m
=== RUN   TestAccELBV2TrustStore_disappears
=== PAUSE TestAccELBV2TrustStore_disappears
=== CONT  TestAccELBV2TrustStore_disappears
    trust_store_test.go:60: Error running post-test destroy, there may be dangling resources: exit status 1

        Error: waiting for ELBV2 Trust Store (arn:aws:elasticloadbalancing:eu-west-1:717639722864:truststore/tf-acc-test-7584875247195058747/f314c78c27c11abe) associations delete: couldn't find resource

--- FAIL: TestAccELBV2TrustStore_disappears (17.78s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/elbv2	22.889s
FAIL
make: *** [testacc] Error 1

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.

@terraform-aws-provider terraform-aws-provider bot added service/elbv2 Issues and PRs that pertain to the elbv2 service. size/S Managed by automation to categorize the size of a PR. labels Jul 11, 2024
@szemek szemek force-pushed the b-wait-for-active-trust-store branch from e38ef73 to c5216d4 Compare July 11, 2024 09:07
@terraform-aws-provider terraform-aws-provider bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Jul 11, 2024
@szemek szemek marked this pull request as ready for review July 11, 2024 10:00
@szemek szemek requested a review from a team as a code owner July 11, 2024 10:00
@ewbankkit ewbankkit self-assigned this Jul 12, 2024
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=TestAccELBV2TrustStore_' PKG=elbv2 ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/elbv2/... -v -count 1 -parallel 3  -run=TestAccELBV2TrustStore_ -timeout 360m
=== RUN   TestAccELBV2TrustStore_tags
=== PAUSE TestAccELBV2TrustStore_tags
=== RUN   TestAccELBV2TrustStore_tags_null
=== PAUSE TestAccELBV2TrustStore_tags_null
=== RUN   TestAccELBV2TrustStore_tags_AddOnUpdate
=== PAUSE TestAccELBV2TrustStore_tags_AddOnUpdate
=== RUN   TestAccELBV2TrustStore_tags_EmptyTag_OnCreate
=== PAUSE TestAccELBV2TrustStore_tags_EmptyTag_OnCreate
=== RUN   TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Add
=== PAUSE TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Add
=== RUN   TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Replace
=== PAUSE TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Replace
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_providerOnly
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_providerOnly
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_nonOverlapping
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_nonOverlapping
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_overlapping
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_overlapping
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_updateToProviderOnly
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_updateToProviderOnly
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_updateToResourceOnly
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_updateToResourceOnly
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_emptyResourceTag
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_emptyResourceTag
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_emptyProviderOnlyTag
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_emptyProviderOnlyTag
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_nullOverlappingResourceTag
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_nullOverlappingResourceTag
=== RUN   TestAccELBV2TrustStore_tags_DefaultTags_nullNonOverlappingResourceTag
=== PAUSE TestAccELBV2TrustStore_tags_DefaultTags_nullNonOverlappingResourceTag
=== RUN   TestAccELBV2TrustStore_tags_ComputedTag_OnCreate
=== PAUSE TestAccELBV2TrustStore_tags_ComputedTag_OnCreate
=== RUN   TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Add
=== PAUSE TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Add
=== RUN   TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Replace
=== PAUSE TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Replace
=== RUN   TestAccELBV2TrustStore_basic
=== PAUSE TestAccELBV2TrustStore_basic
=== RUN   TestAccELBV2TrustStore_statusActive
=== PAUSE TestAccELBV2TrustStore_statusActive
=== RUN   TestAccELBV2TrustStore_disappears
=== PAUSE TestAccELBV2TrustStore_disappears
=== RUN   TestAccELBV2TrustStore_nameGenerated
=== PAUSE TestAccELBV2TrustStore_nameGenerated
=== RUN   TestAccELBV2TrustStore_namePrefix
=== PAUSE TestAccELBV2TrustStore_namePrefix
=== CONT  TestAccELBV2TrustStore_tags
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_emptyProviderOnlyTag
=== CONT  TestAccELBV2TrustStore_basic
--- PASS: TestAccELBV2TrustStore_basic (50.54s)
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_providerOnly
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_emptyProviderOnlyTag (51.14s)
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_emptyResourceTag
--- PASS: TestAccELBV2TrustStore_tags (98.52s)
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_updateToResourceOnly
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_emptyResourceTag (50.76s)
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_updateToProviderOnly
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_providerOnly (103.87s)
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_overlapping
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_updateToResourceOnly (64.19s)
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_nonOverlapping
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_updateToProviderOnly (64.95s)
=== CONT  TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Replace
--- PASS: TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Replace (63.33s)
=== CONT  TestAccELBV2TrustStore_tags_AddOnUpdate
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_overlapping (87.11s)
=== CONT  TestAccELBV2TrustStore_nameGenerated
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_nonOverlapping (87.62s)
=== CONT  TestAccELBV2TrustStore_namePrefix
--- PASS: TestAccELBV2TrustStore_nameGenerated (49.08s)
=== CONT  TestAccELBV2TrustStore_tags_EmptyTag_OnCreate
--- PASS: TestAccELBV2TrustStore_tags_AddOnUpdate (63.70s)
=== CONT  TestAccELBV2TrustStore_tags_ComputedTag_OnCreate
--- PASS: TestAccELBV2TrustStore_namePrefix (49.09s)
=== CONT  TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Add
--- PASS: TestAccELBV2TrustStore_tags_ComputedTag_OnCreate (52.47s)
=== CONT  TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Replace
--- PASS: TestAccELBV2TrustStore_tags_EmptyTag_OnCreate (65.63s)
=== CONT  TestAccELBV2TrustStore_disappears
--- PASS: TestAccELBV2TrustStore_tags_EmptyTag_OnUpdate_Add (76.91s)
=== CONT  TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Add
--- PASS: TestAccELBV2TrustStore_disappears (46.68s)
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_nullNonOverlappingResourceTag
--- PASS: TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Replace (65.58s)
--- PASS: TestAccELBV2TrustStore_tags_ComputedTag_OnUpdate_Add (66.01s)
=== CONT  TestAccELBV2TrustStore_tags_null
=== CONT  TestAccELBV2TrustStore_tags_DefaultTags_nullOverlappingResourceTag
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_nullNonOverlappingResourceTag (49.73s)
--- PASS: TestAccELBV2TrustStore_tags_null (54.99s)
--- PASS: TestAccELBV2TrustStore_tags_DefaultTags_nullOverlappingResourceTag (50.07s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elbv2	506.092s

@ewbankkit
Copy link
Contributor

@szemek Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit d7ab117 into hashicorp:main Jul 12, 2024
36 checks passed
@github-actions github-actions bot added this to the v5.59.0 milestone Jul 12, 2024
@szemek szemek deleted the b-wait-for-active-trust-store branch July 12, 2024 19:20
Copy link

This functionality has been released in v5.59.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 Aug 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/elbv2 Issues and PRs that pertain to the elbv2 service. size/M 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_lb_trust_store not waiting for state active
2 participants