Skip to content

Commit

Permalink
Modify input variable correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
james03160927 committed Dec 28, 2024
1 parent 6db9c20 commit 065b228
Show file tree
Hide file tree
Showing 25 changed files with 28 additions and 511 deletions.
22 changes: 0 additions & 22 deletions infrastructure/environment/prod/.terraform.lock.hcl

This file was deleted.

23 changes: 0 additions & 23 deletions infrastructure/environment/prod/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions infrastructure/environment/prod/main.tf

This file was deleted.

10 changes: 0 additions & 10 deletions infrastructure/environment/prod/variable.tf

This file was deleted.

23 changes: 0 additions & 23 deletions infrastructure/environment/staging/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions infrastructure/environment/staging/main.tf

This file was deleted.

10 changes: 0 additions & 10 deletions infrastructure/environment/staging/variable.tf

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ module "node_pack_extract_trigger" {
cloud_build_service_account = google_service_account.service_account.email
topic_name = "${var.prefix}-comfy-registry-event"
trigger_name = "${var.prefix}-comfy-registry-event"
registry_backend_url = "https://stagingapi.comfy.org"
}

output "trigger_id" {
Expand Down
10 changes: 0 additions & 10 deletions infrastructure/module/node-pack-extract-trigger/README.md

This file was deleted.

67 changes: 0 additions & 67 deletions infrastructure/module/node-pack-extract-trigger/main.tf

This file was deleted.

49 changes: 0 additions & 49 deletions infrastructure/module/node-pack-extract-trigger/variable.tf

This file was deleted.

8 changes: 0 additions & 8 deletions infrastructure/module/node-pack-extract-trigger/version.tf

This file was deleted.

This file was deleted.

5 changes: 3 additions & 2 deletions infrastructure/modules/node-pack-extract-trigger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ Terraform modules to setup trigger for cloud build that will run [node-pack-extr
## Requirements

- Google Cloud Account
- Existing Google Cloud Storage bucket where the Registry backend store the comfy node packs.
- Existing Service Account with `Service Account Token Creator` Role plus the one that is whitelisted in [service_account_auth](../../../server/middleware/authentication/service_account_auth.go#65) middleware.
- Existing Google Cloud Storage public bucket where the Registry backend store the comfy node packs.
- Existing Service Account that is whitelisted in [service_account_auth](../../../server/middleware/authentication/service_account_auth.go#65) middleware and with `Service Account Token Creator` Role.
- [Connected repositories](https://cloud.google.com/build/docs/repositories) contains the [node-pack-extract](../../../node-pack-extract/) folder
8 changes: 4 additions & 4 deletions infrastructure/modules/node-pack-extract-trigger/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ data "google_service_account" "cloudbuild_service_account" {

# Create the cloud build trigger
resource "google_cloudbuild_trigger" "trigger" {
name = "comfy-registry-nodepack"
name = var.trigger_name
location = var.region
service_account = data.google_service_account.cloudbuild_service_account.id

Expand All @@ -60,8 +60,8 @@ resource "google_cloudbuild_trigger" "trigger" {
}

substitutions = {
_CUSTOM_NODE_NAME = "custom-node"
_CUSTOM_NODE_URL = "https://storage.googleapis.com/$(body.message.data.bucket)/$(body.message.data.name)"
_NODEPACK_HANDLER = var.registry_backend_url
_CUSTOM_NODE_NAME = "custom-node"
_CUSTOM_NODE_URL = "https://storage.googleapis.com/$(body.message.data.bucket)/$(body.message.data.name)"
_REGISTRY_BACKEND_URL = var.registry_backend_url
}
}
Loading

0 comments on commit 065b228

Please sign in to comment.