This module will insert a dependency on the completion of the startup script for one or more specified compute VMs and report back if it fails. This can be useful when running post-boot installation scripts that require the startup script to finish setting up a node.
WARNING:: this module is experimental and not fully supported.
- gcloud must be present in the path
of the machine where
terraform apply
is run.
- id: workstation
source: modules/compute/vm-instance
use:
- network1
- my-startup-script
settings:
instance_count: 4
# Wait for all instances of the above VM to finish running startup scripts.
- id: wait
source: community/modules/scripts/wait-for-startup
settings:
instance_names: $(workstation.name)
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Name | Version |
---|---|
terraform | >= 0.14.0 |
null | ~> 3.0 |
Name | Version |
---|---|
null | ~> 3.0 |
No modules.
Name | Type |
---|---|
null_resource.validate_instance_names | resource |
null_resource.wait_for_startup | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
gcloud_path_override | Directory of the gcloud executable to be used during cleanup | string |
"" |
no |
instance_name | Name of the instance we are waiting for (can be null if 'instance_names' is not empty) | string |
null |
no |
instance_names | A list of instance names we are waiting for, in addition to the one mentioned in 'instance_name' (if any) | list(string) |
[] |
no |
project_id | Project in which the HPC deployment will be created | string |
n/a | yes |
timeout | Timeout in seconds | number |
1200 |
no |
zone | The GCP zone where the instance is running | string |
n/a | yes |
No outputs.