apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
  name: keda-auth-aws-{{ .NAME }}
  namespace: {{ .NAMESPACE }}
spec:
  podIdentity:
    provider: aws
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: {{ .NAME }}
  namespace: {{ .NAMESPACE }}
spec:
  scaleTargetRef:
    name: {{ .NAME }}
  minReplicaCount: {{ .MIN_REPLICAS }}
  maxReplicaCount: {{ .MAX_REPLICAS }}
  triggers:
  - type: {{ .SCALE_TYPE }}
    authenticationRef:
      name: keda-auth-aws-{{ .NAME }}
    metadata:
      awsRegion: {{ .SQS_AWS_REGION }}
      queueURL: {{ .PIPELINE_SQS_URL }}
      queueLength: {{ .SCALE_VALUE }}