-
Notifications
You must be signed in to change notification settings - Fork 994
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the wait conditions issue in the kubernetes_manifest resource (#2173
- Loading branch information
1 parent
cd4b91b
commit a24d5d9
Showing
6 changed files
with
143 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
`resource/kubernetes_manifest`: fix an issue with the `kubernetes_manifest` resource, where an object fails to update correctly when employing wait conditions and thus some attributes are not available for the reference after creation. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
manifest/test/acceptance/testdata/Wait/wait_for_fields_annotations.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
resource "kubernetes_manifest" "test" { | ||
manifest = { | ||
apiVersion = "v1" | ||
kind = "Secret" | ||
metadata = { | ||
name = var.name | ||
namespace = var.namespace | ||
|
||
annotations = { | ||
"kubernetes.io/service-account.name" = "default" | ||
} | ||
} | ||
type = "kubernetes.io/service-account-token" | ||
} | ||
wait { | ||
fields = { | ||
"metadata.annotations[\"kubernetes.io/service-account.uid\"]" = "^.*$", | ||
} | ||
} | ||
|
||
timeouts { | ||
create = "10s" | ||
} | ||
} | ||
|
||
output "test" { | ||
value = kubernetes_manifest.test.object.metadata.annotations["kubernetes.io/service-account.uid"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters