From f55392e0b33f60e979f9cee99df1dc22a0a576e7 Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Mon, 18 Dec 2023 20:19:08 +0000 Subject: [PATCH] chore: update examples to use registry --- build/int.cloudbuild.yaml | 3 +++ examples/dlp_api_example/main.tf | 8 ++++++-- examples/simple_example/main.tf | 11 ++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/build/int.cloudbuild.yaml b/build/int.cloudbuild.yaml index 57fb638..09da2fa 100644 --- a/build/int.cloudbuild.yaml +++ b/build/int.cloudbuild.yaml @@ -14,6 +14,9 @@ timeout: 3600s steps: + - id: swap-module-refs + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' + args: ['module-swapper'] - id: prepare name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment'] diff --git a/examples/dlp_api_example/main.tf b/examples/dlp_api_example/main.tf index 6d405ee..290a62e 100644 --- a/examples/dlp_api_example/main.tf +++ b/examples/dlp_api_example/main.tf @@ -27,7 +27,9 @@ locals { } module "dataflow-bucket" { - source = "../../modules/dataflow_bucket" + source = "terraform-google-modules/dataflow/google//modules/dataflow_bucket" + version = "~> 2.0" + name = local.gcs_bucket_name region = var.region project_id = var.project_id @@ -107,7 +109,9 @@ EOF } module "dataflow-job" { - source = "../../" + source = "terraform-google-modules/dataflow/google" + version = "~> 2.0" + project_id = var.project_id name = "dlp_example_${null_resource.download_sample_cc_into_gcs.id}_${null_resource.deinspection_template_setup.id}" on_delete = "cancel" diff --git a/examples/simple_example/main.tf b/examples/simple_example/main.tf index 23ea52e..0e03bcf 100644 --- a/examples/simple_example/main.tf +++ b/examples/simple_example/main.tf @@ -51,7 +51,9 @@ module "vpc" { } module "dataflow-bucket" { - source = "../../modules/dataflow_bucket" + source = "terraform-google-modules/dataflow/google//modules/dataflow_bucket" + version = "~> 2.0" + name = local.gcs_bucket_name region = var.region project_id = var.project_id @@ -59,7 +61,9 @@ module "dataflow-bucket" { } module "dataflow-job" { - source = "../../" + source = "terraform-google-modules/dataflow/google" + version = "~> 2.0" + project_id = var.project_id name = "wordcount-terraform-example" on_delete = "cancel" @@ -80,7 +84,8 @@ module "dataflow-job" { } module "dataflow-job-2" { - source = "../../" + source = "terraform-google-modules/dataflow/google" + version = "~> 2.0" project_id = var.project_id name = "wordcount-terraform-example-2" on_delete = "cancel"