{{- if and .Values.buildPlane.dynamic.provider.aws.enabled ( not .Values.buildPlane.dynamic.provider.aws.existingSecret ) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "pipelines.fullname" . }}-dynamic-buildplane-creds-aws
  labels:
    {{- include "pipelines.labels" . | nindent 4 }}
type: Opaque
data:
  accessKey: {{ .Values.buildPlane.dynamic.provider.aws.accessKey | b64enc | quote }}
  secretKey: {{ .Values.buildPlane.dynamic.provider.aws.secretKey | b64enc | quote }}
{{- end }}
