Skip to content

Commit fdca7fe

Browse files
committed
refactoring the try block for null check
1 parent 02be1d9 commit fdca7fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • modules/management/kubectl-apply

modules/management/kubectl-apply/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ locals {
2929
# 2. Identify URL-based manifests
3030
url_manifests = {
3131
for index, manifest in local.enabled_manifests : index => manifest
32-
if startswith(try(manifest.source, ""), "http://") || startswith(try(manifest.source, ""), "https://")
32+
if try(manifest.source, null) != null && (startswith(manifest.source, "http://") || startswith(manifest.source, "https://"))
3333
}
3434

3535
# 3. Rebuild the map by populating the 'content' field for URLs based manifest

0 commit comments

Comments
 (0)