Skip to content

Commit ff4c17b

Browse files
authored
chore: update examples to use registry (#208)
1 parent 255da72 commit ff4c17b

File tree

6 files changed

+21
-9
lines changed

6 files changed

+21
-9
lines changed

build/int.cloudbuild.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
timeout: 3600s
1616
steps:
17+
- id: swap-module-refs
18+
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
19+
args: ['module-swapper']
1720
- id: prepare
1821
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
1922
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment']

examples/automatic-labelling-folder/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ resource "random_pet" "main" {
2020
}
2121

2222
module "event_folder_log_entry" {
23-
source = "../../modules/event-folder-log-entry"
23+
source = "terraform-google-modules/event-function/google//modules/event-folder-log-entry"
24+
version = "~> 3.0"
2425

2526
filter = <<EOF
2627
resource.type="project" AND
@@ -33,7 +34,8 @@ EOF
3334
}
3435

3536
module "localhost_function" {
36-
source = "../.."
37+
source = "terraform-google-modules/event-function/google"
38+
version = "~> 3.0"
3739

3840
description = "Labels resource with owner information."
3941
entry_point = "labelResource"

examples/automatic-labelling-from-localhost/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@ resource "random_pet" "main" {
1919
}
2020

2121
module "event_project_log_entry" {
22-
source = "../../modules/event-project-log-entry"
22+
source = "terraform-google-modules/event-function/google//modules/event-project-log-entry"
23+
version = "~> 3.0"
2324

2425
filter = "protoPayload.@type=\"type.googleapis.com/google.cloud.audit.AuditLog\" protoPayload.methodName:insert operation.first=true"
2526
name = random_pet.main.id
2627
project_id = var.project_id
2728
}
2829

2930
module "localhost_function" {
30-
source = "../.."
31+
source = "terraform-google-modules/event-function/google"
32+
version = "~> 3.0"
3133

3234
description = "Labels resource with owner information."
3335
entry_point = "labelResource"

examples/automatic-labelling-from-repository/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,17 @@ resource "null_resource" "configure_repository" {
4040
}
4141

4242
module "event_project_log_entry" {
43-
source = "../../modules/event-project-log-entry"
43+
source = "terraform-google-modules/event-function/google//modules/event-project-log-entry"
44+
version = "~> 3.0"
4445

4546
filter = "protoPayload.@type=\"type.googleapis.com/google.cloud.audit.AuditLog\" protoPayload.methodName:insert operation.first=true"
4647
name = random_pet.main.id
4748
project_id = var.project_id
4849
}
4950

5051
module "repository_function" {
51-
source = "../../modules/repository-function"
52+
source = "terraform-google-modules/event-function/google//modules/repository-function"
53+
version = "~> 3.0"
5254

5355
description = "Labels resource with owner information."
5456
entry_point = "labelResource"

examples/delete-vms-without-cmek/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ resource "random_pet" "main" {
3232
}
3333

3434
module "event_project_log_entry" {
35-
source = "../../modules/event-project-log-entry"
35+
source = "terraform-google-modules/event-function/google//modules/event-project-log-entry"
36+
version = "~> 3.0"
3637

3738
filter = "resource.type=\"gce_instance\" jsonPayload.event_subtype=\"compute.instances.insert\" jsonPayload.event_type=\"GCE_OPERATION_DONE\""
3839
name = random_pet.main.id
3940
project_id = var.project_id
4041
}
4142

4243
module "localhost_function" {
43-
source = "../.."
44+
source = "terraform-google-modules/event-function/google"
45+
version = "~> 3.0"
4446

4547
description = "Deletes VMs created with disks not encrypted with CMEK"
4648
entry_point = "ReceiveMessage"

examples/dynamic-files/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ resource "local_file" "file" {
7373
}
7474

7575
module "localhost_function" {
76-
source = "../.."
76+
source = "terraform-google-modules/event-function/google"
77+
version = "~> 3.0"
7778

7879
description = "Returns back the random file content"
7980
entry_point = "fileContent"

0 commit comments

Comments
 (0)