Skip to content

Commit 48c4ced

Browse files
12345ieeedevoncrouse
authored andcommitted
Correct eviction grace duration in case of 0 (or default) timeout
The OCI prvider (4.114.0) wants a value of 0 timeout to be formatted as PT0S instead of PT0M, and would give plan residuals against PT0M, even though they are clearly equivalent. So special case 0 minutes to be formatted as PT0S. No functional change. Fixes: #688 Signed-off-by: Andrea Stacchiotti <[email protected]>
1 parent 3a29896 commit 48c4ced

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/oke/nodepools.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ resource "oci_containerengine_node_pool" "nodepools" {
6666

6767
node_eviction_node_pool_settings {
6868
#Optional
69-
eviction_grace_duration = format("PT%sM", lookup(each.value, "eviction_grace_duration", 0))
69+
eviction_grace_duration = lookup(each.value, "eviction_grace_duration", 0) == 0 ? "PT0S" : format("PT%sM", each.value.eviction_grace_duration)
7070
is_force_delete_after_grace_duration = tobool(lookup(each.value, "force_node_delete", true))
7171
}
7272

0 commit comments

Comments
 (0)