A google_compute_node_template is used to test a Google NodeTemplate resource
This resource has beta fields available. To retrieve these fields, include beta: true in the constructor for the resource
describe google_compute_node_template(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'inspec-node-template') do
it { should exist }
its('node_affinity_labels') { should include('key' => 'value') }
end
describe google_compute_node_template(project: 'chef-gcp-inspec', region: 'europe-west2', name: 'nonexistent') do
it { should_not exist }
end
Properties that can be accessed from the google_compute_node_template resource:
creation_timestampdescriptionnamenode_affinity_labelsnode_typenode_type_flexibilitycpusmemorylocal_ssdserver_bindingtypeRESTART_NODE_ON_ANY_SERVER, nodes using this template will restart on any physical server following a maintenance event. If RESTART_NODE_ON_MINIMAL_SERVER, nodes using this template will restart on the same physical server following a maintenance event, instead of being live migrated to or restarted on a new physical server. This option may be useful if you are using software licenses tied to the underlying server characteristics such as physical sockets or cores, to avoid the need for additional licenses when maintenance occurs. However, VMs on such nodes will experience outages while maintenance is applied. Possible values:
regionEnsure the Compute Engine API is enabled for the current project.
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/google_compute_node_template/