{{- if .Values.aws -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "atlantis.fullname" . }}-aws
  labels:
    app: {{ template "atlantis.name" . }}
    chart: {{ template "atlantis.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
data:
{{- if .Values.aws.credentials }}
  credentials: {{ .Values.aws.credentials | b64enc }}
{{- end }}
  config: {{ .Values.aws.config | b64enc }}
{{- end -}}
