GoogleCloudPlatform / GoogleCloudPlatform/deploymentmanager-samples
CFT GCE instance template should support turning vm off
Open
cloud-foundations
Feature Request
- Dominant language
- Jinja
- Stars
- 951
- Forks
- 700
- PR merge metrics
- No merged PRs in 30d
Description
Currently when a VM is created it automatically starts it. In some cases customers would like the VM to be turned off.
In our custom template we have code such as:
```
method = 'start' if vm['start_vm'] else 'stop'
resources.append({
'name': 'final-{}-{}'.format(method, vm_name),
'action': 'gcp-types/compute-v1:compute.instances.' + method,
'properties': {
'instance': vm_name,
'zone': zone,
},
'metadata': {
'dependsOn': [vm_name],
'runtimePolicy': ['UPDATE_ALWAYS'],
},
})
```
Contributor guide
Assessment
This issue has not been assessed yet.