yu-iskw / terraform-google-copy-bq-datasets

A terraform module to copy BigQuery datasets across regions
https://registry.terraform.io/modules/yu-iskw/copy-bq-datasets/google/latest
Apache License 2.0
1 stars 1 forks source link
bigquery data-engineering google-cloud terraform

terraform-google-copy-bq-datasets

Lint terraform files

This is a terraform module to copy BigQuery datasets across regions.

How to use

module "copy_dataset" {
  source = "git::git@github.com:yu-iskw/terraform-google-copy-bq-datasets.git?ref=v0.2.0"

  source_dataset = {
    project_id = "source-project"
    dataset_id = "source_dataset"
    location   = "US"
  }

  destination_dataset = {
    project_id = "destination-project"
    dataset_id = "destination_dataset"
    location   = "asia-northeast1"
  }

  # The service account has to have permissions to run Data Transfer jobs and create
  # datasets in the destination project and permissions to read the source dataset.
  service_account = "coping-bq-datasets@destination-project.iam.gserviceaccount.com"
}