tree: dcc28e784705b5551a27a290487d5e2127b586d0 [path history] [tgz]
  1. .terraform.lock.hcl
  2. apache-beam-testing.tfbackend
  3. apache-beam-testing.tfvars
  4. bigquery.tf
  5. common.tfvars
  6. data.tf
  7. iam.tf
  8. provider.tf
  9. pubsub.tf
  10. README.md
  11. state.tf
  12. variables.tf
  13. workflow.tf
.test-infra/pipelines/infrastructure/03.io/dataflow-to-bigquery/README.md

Overview

This directory holds terraform code to provision resources that org.apache.beam.testinfra.pipelines.ReadDataflowApiWriteBigQuery reads from and writes to.

List of all provision GCP resources

The following lists all provisioned resources and their rationale categorized by GCP service.

resourcereason
Eventarc WorkflowIntended for listening to Dataflow Status Changes
Pub/Sub topicRequired for Eventarc Workflow
Pub/Sub subscriptionIntended as a source; subscribes to Eventarc Workflow
Google Cloud Storage BucketIntended for temporary storage
BigQuery DatasetsIntended as sink

Usage

Follow terraform workflow convention to apply this module. It assumes the working directory is at .test-infra/pipelines

Terraform Init

This module uses a Google Cloud Storage bucket backend.

Initialize the terraform workspace for the apache-beam-testing project:

DIR=infrastructure/03.io/dataflow-to-bigquery
terraform -chdir=$DIR init -backend-config=apache-beam-testing.tfbackend

or for your own Google Cloud project:

DIR=infrastructure/03.io/dataflow-to-bigquery
terraform init -backend-config=path/to/your/backend-config-file.tfbackend

where your backend-config-file.tfbackend contains:

bucket = <Google Cloud Storage Bucket Name>

Terraform Apply

Notice the -var-file flag referencing common.tfvars that provides opinionated variable defaults.

For apache-beam-testing:

DIR=infrastructure/03.io/dataflow-to-bigquery
terraform -chdir=$DIR apply -var-file=common.tfvars -var-file=apache-beam-testing.tfvars

or for your own Google Cloud project:

DIR=infrastructure/03.io/dataflow-to-bigquery
terraform -chdir=$DIR apply -var-file=common.tfvars