GoogleCloudPlatform / GoogleCloudPlatform/deploymentmanager-samples

CFT GCE instance template should support turning vm off

Open
#423 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.