{{- $config_path := printf "%s%s.json" $.Values.lg_config_path "lg_px_communities_v2" -}}
---
kind: ConfigMap
apiVersion: v1
metadata:
    name: cfg-{{ $.Values.region }}-pxrs-lg-communities
data:
    "lg_px_communities_v2.json": |
{{ $.Files.Get $config_path | indent 8}}

{{- $config_path := printf "%s%s.json" $.Values.lg_config_path "lg_px_communities_v2" -}}
---
kind: ConfigMap
apiVersion: v1
metadata:
    name: cfg-{{ $.Values.region }}-pxrs-lg-communities
data:
    "lg_px_communities_v2.json": |
{{- if not ($.Files.Glob $config_path) -}}
{{- fail (printf "communities config file %s does not exist."  $config_path ) -}}
{{ $.Files.Get $config_path | indent 8}}

Add check if communities file exists
Add check if communities file exists
