version: 1
kind: component
meta:
  name: dataflow-example

requires:
  - terraform

parameters:
  - name: projectId
    env: PROJECT_ID
  - name: cloud.region
    env: REGION
  - name: cloud.zone
    env: ZONE
  - name: dataflow
    parameters:
      - name: bigquery
        parameters:
          - name: datasetName
            value: average_weather
            env: TF_VAR_dataset_name
          - name: tableName
            value: average_weather
            env: TF_VAR_table_name
          - name: description
            empty: allow
            value: "Example Airflow DAG that creates a Cloud Dataflow workflow which takes a text file and adds the rows to a BigQuery table"
            env: TF_VAR_description
          - name: location
            value: US
            brief: US or EU
            env: TF_VAR_location
          - name: deleteContentsOnDestroy
            value: false
            env: TF_VAR_delete_contents_on_destroy
      - name: composer
        parameters:
        - name: envName
          env: COMPOSER_ENV_NAME
        - name: bucket
          env: COMPOSER_BUCKET
        - name: version
          env: COMPOSER_VERSION
