diff --git a/community/modules/compute/htcondor-execute-point/README.md b/community/modules/compute/htcondor-execute-point/README.md index fe1d49c4d8..4f65411ddf 100644 --- a/community/modules/compute/htcondor-execute-point/README.md +++ b/community/modules/compute/htcondor-execute-point/README.md @@ -199,12 +199,14 @@ limitations under the License. |------|---------| | [terraform](#requirement\_terraform) | >= 1.1 | | [google](#requirement\_google) | >= 4.0 | +| [null](#requirement\_null) | >= 3.0 | ## Providers | Name | Version | |------|---------| | [google](#provider\_google) | >= 4.0 | +| [null](#provider\_null) | >= 3.0 | ## Modules @@ -220,6 +222,7 @@ limitations under the License. | Name | Type | |------|------| | [google_storage_bucket_object.execute_config](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_object) | resource | +| [null_resource.execute_config](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | | [google_compute_image.compute_image](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/compute_image) | data source | | [google_compute_zones.available](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/compute_zones) | data source | diff --git a/community/modules/compute/htcondor-execute-point/main.tf b/community/modules/compute/htcondor-execute-point/main.tf index fb875f01e4..7b0df94987 100644 --- a/community/modules/compute/htcondor-execute-point/main.tf +++ b/community/modules/compute/htcondor-execute-point/main.tf @@ -122,8 +122,14 @@ data "google_compute_zones" "available" { region = var.region } +resource "null_resource" "execute_config" { + triggers = { + config = local.execute_config + } +} + resource "google_storage_bucket_object" "execute_config" { - name = "${local.name_prefix}-config-${substr(md5(local.execute_config), 0, 4)}" + name = "${local.name_prefix}-config-${substr(md5(null_resource.execute_config.id), 0, 4)}" content = local.execute_config bucket = var.htcondor_bucket_name } diff --git a/community/modules/compute/htcondor-execute-point/versions.tf b/community/modules/compute/htcondor-execute-point/versions.tf index 0008b29c1a..55a474e384 100644 --- a/community/modules/compute/htcondor-execute-point/versions.tf +++ b/community/modules/compute/htcondor-execute-point/versions.tf @@ -22,6 +22,10 @@ terraform { source = "hashicorp/google" version = ">= 4.0" } + null = { + source = "hashicorp/null" + version = ">= 3.0" + } } provider_meta "google" { diff --git a/community/modules/scheduler/htcondor-access-point/README.md b/community/modules/scheduler/htcondor-access-point/README.md index 05c24cb6e8..f85e672b2e 100644 --- a/community/modules/scheduler/htcondor-access-point/README.md +++ b/community/modules/scheduler/htcondor-access-point/README.md @@ -107,6 +107,7 @@ limitations under the License. |------|---------| | [terraform](#requirement\_terraform) | >= 1.1 | | [google](#requirement\_google) | >= 3.83 | +| [null](#requirement\_null) | >= 3.0 | | [random](#requirement\_random) | ~> 3.6 | ## Providers @@ -114,6 +115,7 @@ limitations under the License. | Name | Version | |------|---------| | [google](#provider\_google) | >= 3.83 | +| [null](#provider\_null) | >= 3.0 | | [random](#provider\_random) | ~> 3.6 | ## Modules @@ -131,6 +133,7 @@ limitations under the License. | [google_compute_disk.spool](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_disk) | resource | | [google_compute_region_disk.spool](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_region_disk) | resource | | [google_storage_bucket_object.ap_config](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_object) | resource | +| [null_resource.ap_config](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | | [random_shuffle.zones](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/shuffle) | resource | | [google_compute_image.htcondor](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/compute_image) | data source | | [google_compute_instance.ap](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/compute_instance) | data source | diff --git a/community/modules/scheduler/htcondor-access-point/main.tf b/community/modules/scheduler/htcondor-access-point/main.tf index 30a71679f7..658b2752c0 100644 --- a/community/modules/scheduler/htcondor-access-point/main.tf +++ b/community/modules/scheduler/htcondor-access-point/main.tf @@ -162,8 +162,14 @@ data "google_compute_instance" "ap" { self_link = data.google_compute_region_instance_group.ap.instances[0].instance } +resource "null_resource" "ap_config" { + triggers = { + config = local.ap_config + } +} + resource "google_storage_bucket_object" "ap_config" { - name = "${local.name_prefix}-config-${substr(md5(local.ap_config), 0, 4)}" + name = "${local.name_prefix}-config-${substr(md5(null_resource.ap_config.id), 0, 4)}" content = local.ap_config bucket = var.htcondor_bucket_name diff --git a/community/modules/scheduler/htcondor-access-point/versions.tf b/community/modules/scheduler/htcondor-access-point/versions.tf index db0a27f671..126c8bc01b 100644 --- a/community/modules/scheduler/htcondor-access-point/versions.tf +++ b/community/modules/scheduler/htcondor-access-point/versions.tf @@ -24,6 +24,10 @@ terraform { source = "hashicorp/random" version = "~> 3.6" } + null = { + source = "hashicorp/null" + version = ">= 3.0" + } } provider_meta "google" { module_name = "blueprints/terraform/hpc-toolkit:htcondor-access-point/v1.46.0" diff --git a/community/modules/scheduler/htcondor-central-manager/README.md b/community/modules/scheduler/htcondor-central-manager/README.md index 5a94c7bc5f..b6f2b0972c 100644 --- a/community/modules/scheduler/htcondor-central-manager/README.md +++ b/community/modules/scheduler/htcondor-central-manager/README.md @@ -93,12 +93,14 @@ limitations under the License. |------|---------| | [terraform](#requirement\_terraform) | >= 1.1.0 | | [google](#requirement\_google) | >= 3.83 | +| [null](#requirement\_null) | >= 3.0 | ## Providers | Name | Version | |------|---------| | [google](#provider\_google) | >= 3.83 | +| [null](#provider\_null) | >= 3.0 | ## Modules @@ -113,6 +115,7 @@ limitations under the License. | Name | Type | |------|------| | [google_storage_bucket_object.cm_config](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_object) | resource | +| [null_resource.cm_config](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | | [google_compute_image.htcondor](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/compute_image) | data source | | [google_compute_instance.cm](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/compute_instance) | data source | | [google_compute_region_instance_group.cm](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/compute_region_instance_group) | data source | diff --git a/community/modules/scheduler/htcondor-central-manager/main.tf b/community/modules/scheduler/htcondor-central-manager/main.tf index 35da433f5f..cc78f112c6 100644 --- a/community/modules/scheduler/htcondor-central-manager/main.tf +++ b/community/modules/scheduler/htcondor-central-manager/main.tf @@ -115,8 +115,14 @@ data "google_compute_instance" "cm" { self_link = data.google_compute_region_instance_group.cm.instances[0].instance } +resource "null_resource" "cm_config" { + triggers = { + config = local.cm_config + } +} + resource "google_storage_bucket_object" "cm_config" { - name = "${local.name_prefix}-config-${substr(md5(local.cm_config), 0, 4)}" + name = "${local.name_prefix}-config-${substr(md5(null_resource.cm_config.id), 0, 4)}" content = local.cm_config bucket = var.htcondor_bucket_name } diff --git a/community/modules/scheduler/htcondor-central-manager/versions.tf b/community/modules/scheduler/htcondor-central-manager/versions.tf index 9672ed1fd2..3fd815ee8a 100644 --- a/community/modules/scheduler/htcondor-central-manager/versions.tf +++ b/community/modules/scheduler/htcondor-central-manager/versions.tf @@ -20,6 +20,10 @@ terraform { source = "hashicorp/google" version = ">= 3.83" } + null = { + source = "hashicorp/null" + version = ">= 3.0" + } } provider_meta "google" { module_name = "blueprints/terraform/hpc-toolkit:htcondor-central-manager/v1.46.0"