apiVersion: '2019-12-01'
location: westus2
identity:
  type: UserAssigned
  userAssignedIdentities:
    "${MANAGED_IDENTITY_RESOURCE_ID}": {}
properties:
  containers:
  - name: integration
    properties:
      image: ${IMAGE}
      resources: # Resource requirements of the instance
        requests:
          memoryInGB: 16
          cpu: 4
      volumeMounts:
      - mountPath: /aci/logs
        name: logs
      environmentVariables:
      - name: AZURE_CLIENT_SECRET
        secureValue: ${AZURE_CLIENT_SECRET}
      - name: AZURE_SUBSCRIPTION_ID
        value: ${AZURE_SUBSCRIPTION_ID}
      - name: AZURE_TENANT_ID
        value: ${AZURE_TENANT_ID}
      - name: AZURE_CLIENT_ID
        value: ${AZURE_CLIENT_ID}
      - name: SERVICEBUS_CONNECTION_STRING
        secureValue: ${SERVICEBUS_CONNECTION_STRING}
      - name: SERVICEBUS_NAMESPACE_NAME
        value: ${SERVICEBUS_NAMESPACE_NAME}
      - name: MANAGED_IDENTITY_CLIENT_ID
        value: ${MANAGED_IDENTITY_CLIENT_ID}
      - name: MANAGED_IDENTITY_RESOURCE_ID
        value: ${MANAGED_IDENTITY_RESOURCE_ID}
      - name: TEST_LOCATION
        value: ${TEST_LOCATION}
      - name: TEST_RESOURCE_GROUP
        value: ${TEST_RESOURCE_GROUP}
      - name: STORAGE_ACCOUNT_NAME
        value: ${STORAGE_ACCOUNT_NAME}
      - name: LOG_DIRECTORY
        value: ${LOG_DIRECTORY}
      - name: SUITE
        value: ${SUITE}
      - name: GOTESTSUM_JUNITFILE
        value: ${GOTESTSUM_JUNITFILE}
      - name: START_SLEEP
        value: 90
  imageRegistryCredentials: # Credentials to pull a private image
  - server: ${REGISTRY}
    username: ${REGISTRY_USER}
    password: ${REGISTRY_PASSWORD}
  restartPolicy: Never
  osType: Linux
  volumes:
  - name: logs
    azureFile:
      sharename: acilogs
      storageAccountName: ${STORAGE_ACCOUNT_NAME}
      storageAccountKey: ${STORAGE_ACCOUNT_KEY}