Skip to content

Tavasyag/watch types kub manifest#2851

Open
tavasyag wants to merge 5 commits intohashicorp:mainfrom
tavasyag:tavasyag/watch-types-kub-manifest
Open

Tavasyag/watch types kub manifest#2851
tavasyag wants to merge 5 commits intohashicorp:mainfrom
tavasyag:tavasyag/watch-types-kub-manifest

Conversation

@tavasyag
Copy link
Contributor

@tavasyag tavasyag commented Mar 3, 2026

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

No changes to security controls.

Description

This PR enhances the wait block in kubernetes_manifest to support combining multiple wait types (fields, condition, rollout) in a single configuration. Previously, only one wait type could be used at a time.

Changes:

  • Implemented CompositeWaiter to execute multiple waiters sequentially
  • Removed validation that prevented multiple wait types from being used together
  • Added test case demonstrating all three wait types working together
  • Updated documentation with examples and clarifications

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ cd manifest
$ make testacc TESTARGS='-run=TestKubernetesManifest_WaitForMultipleTypes'
go test -count=1 -tags acceptance "./test/acceptance" -v -run=TestKubernetesManifest_WaitMultipleTypes_Pod -timeout 120m
2026/03/03 11:49:18 Testing against Kubernetes API version: v1.35.0
=== RUN   TestKubernetesManifest_WaitMultipleTypes_Pod
2026-03-03T11:49:19.156-0600 [INFO]  [ApplyResourceChange][Wait] Starting composite wait...
2026-03-03T11:49:19.156-0600 [INFO]  [ApplyResourceChange][Wait] Executing waiter 1/2
2026-03-03T11:49:19.156-0600 [INFO]  [ApplyResourceChange][Wait] Waiting for conditions...

2026-03-03T11:49:31.248-0600 [INFO]  [ApplyResourceChange][Wait] All conditions met.

2026-03-03T11:49:31.248-0600 [INFO]  [ApplyResourceChange][Wait] Executing waiter 2/2
2026-03-03T11:49:31.248-0600 [INFO]  [ApplyResourceChange][Wait] Waiting until ready...

2026-03-03T11:49:31.255-0600 [INFO]  [ApplyResourceChange][Wait] Done waiting.

2026-03-03T11:49:31.255-0600 [INFO]  [ApplyResourceChange][Wait] All waiters completed successfully
--- PASS: TestKubernetesManifest_WaitMultipleTypes_Pod (13.81s)
PASS
ok      github.com/hashicorp/terraform-provider-kubernetes/manifest/test/acceptance     14.342s
➜  manifest git:(tavasyag/watch-types-kub-manifest) 

Release Note

Release note for CHANGELOG:

resource/kubernetes_manifest: Allow multiple wait types (fields, condition, rollout) to be used together in the wait block

References

Fixes #2798

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

@tavasyag tavasyag requested a review from a team as a code owner March 3, 2026 17:55
@github-actions github-actions bot added the size/L label Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow multiple watch types for kubernetes_manifest resources

1 participant