apiVersion: v1
data:
  application: |
    apiVersion: core.oam.dev/v1beta1
    kind: Application
    metadata:
      annotations:
        addons.oam.dev/description: Kubernetes Terraform Controller for AWS
        addons.oam.dev/name: terraform/provider-aws
      name: terraform-provider-aws
      namespace: vela-system
    spec:
      components:
      - name: aws-account-creds
        properties:
          apiVersion: v1
          kind: Secret
          metadata:
            name: aws-account-creds
            namespace: vela-system
          stringData:
            credentials: |
              awsAccessKeyID: [[ index .Args "AWS_ACCESS_KEY_ID" ]]
              awsSecretAccessKey: [[ index .Args "AWS_SECRET_ACCESS_KEY" ]]
              awsSessionToken: [[ index .Args "AWS_SESSION_TOKEN" ]]
          type: Opaque
        type: raw
      - name: aws
        properties:
          apiVersion: terraform.core.oam.dev/v1beta1
          kind: Provider
          metadata:
            name: aws
            namespace: default
          spec:
            credentials:
              secretRef:
                key: credentials
                name: aws-account-creds
                namespace: vela-system
              source: Secret
            provider: aws
            region: '[[ index .Args "AWS_DEFAULT_REGION" ]]'
        type: raw
    status:
      rollout:
        batchRollingState: ""
        currentBatch: 0
        lastTargetAppRevision: ""
        rollingState: ""
        upgradedReadyReplicas: 0
        upgradedReplicas: 0
kind: ConfigMap
metadata:
  annotations:
    addons.oam.dev/description: Kubernetes Terraform Controller for AWS
    addons.oam.dev/name: terraform/provider-aws
  labels:
    addons.oam.dev/type: terraform-provider-aws
  name: terraform-provider-aws
  namespace: {{.Values.systemDefinitionNamespace}}
