Skip to content

Commit

Permalink
chore: update examples to use registry (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathkkb authored Dec 19, 2023
1 parent 255da72 commit ff4c17b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
3 changes: 3 additions & 0 deletions build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
6 changes: 4 additions & 2 deletions examples/automatic-labelling-folder/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ resource "random_pet" "main" {
}

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

filter = <<EOF
resource.type="project" AND
Expand All @@ -33,7 +34,8 @@ EOF
}

module "localhost_function" {
source = "../.."
source = "terraform-google-modules/event-function/google"
version = "~> 3.0"

description = "Labels resource with owner information."
entry_point = "labelResource"
Expand Down
6 changes: 4 additions & 2 deletions examples/automatic-labelling-from-localhost/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ resource "random_pet" "main" {
}

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

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

module "localhost_function" {
source = "../.."
source = "terraform-google-modules/event-function/google"
version = "~> 3.0"

description = "Labels resource with owner information."
entry_point = "labelResource"
Expand Down
6 changes: 4 additions & 2 deletions examples/automatic-labelling-from-repository/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ resource "null_resource" "configure_repository" {
}

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

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

module "repository_function" {
source = "../../modules/repository-function"
source = "terraform-google-modules/event-function/google//modules/repository-function"
version = "~> 3.0"

description = "Labels resource with owner information."
entry_point = "labelResource"
Expand Down
6 changes: 4 additions & 2 deletions examples/delete-vms-without-cmek/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@ resource "random_pet" "main" {
}

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

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

module "localhost_function" {
source = "../.."
source = "terraform-google-modules/event-function/google"
version = "~> 3.0"

description = "Deletes VMs created with disks not encrypted with CMEK"
entry_point = "ReceiveMessage"
Expand Down
3 changes: 2 additions & 1 deletion examples/dynamic-files/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ resource "local_file" "file" {
}

module "localhost_function" {
source = "../.."
source = "terraform-google-modules/event-function/google"
version = "~> 3.0"

description = "Returns back the random file content"
entry_point = "fileContent"
Expand Down

0 comments on commit ff4c17b

Please sign in to comment.