You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Advanced machine features can be configured via the `options.advanced_machine_features` variable.
621
+
622
+
```hcl
623
+
module "simple-vm-example" {
624
+
source = "./fabric/modules/compute-vm"
625
+
project_id = var.project_id
626
+
zone = "${var.region}-b"
627
+
name = "test"
628
+
network_interfaces = [{
629
+
network = var.vpc.self_link
630
+
subnetwork = var.subnet.self_link
631
+
}]
632
+
options = {
633
+
advanced_machine_features = {
634
+
enable_nested_virtualization = true
635
+
enable_turbo_mode = true
636
+
threads_per_core = 2
637
+
}
638
+
}
639
+
}
640
+
# tftest modules=1 resources=1
641
+
```
642
+
617
643
### Instance template
618
644
619
645
This example shows how to use the module to manage an instance template that defines an additional attached disk for each instance, and overrides defaults for the boot disk image and service account.
|[service_account](variables.tf#L339)| Service account email and scopes. If email is null, the default Compute service account will be used unless auto_create is true, in which case a service account will be created. Set the variable to null to avoid attaching a service account. | <codetitle="object({ auto_create = optional(bool, false) email = optional(string) scopes = optional(list(string)) })">object({…})</code> || <code>{}</code> |
913
-
|[shielded_config](variables.tf#L349)| Shielded VM configuration of the instances. | <codetitle="object({ enable_secure_boot = bool enable_vtpm = bool enable_integrity_monitoring = bool })">object({…})</code> || <code>null</code> |
|[tag_bindings](variables.tf#L402)| Resource manager tag bindings for this instance, in tag key => tag value format. | <code>map(string)</code> || <code>null</code> |
916
-
|[tag_bindings_firewall](variables.tf#L408)| Firewall (network scoped) tag bindings for this instance, in tag key => tag value format. | <code>map(string)</code> || <code>null</code> |
|[service_account](variables.tf#L362)| Service account email and scopes. If email is null, the default Compute service account will be used unless auto_create is true, in which case a service account will be created. Set the variable to null to avoid attaching a service account. | <codetitle="object({ auto_create = optional(bool, false) email = optional(string) scopes = optional(list(string)) })">object({…})</code> || <code>{}</code> |
939
+
|[shielded_config](variables.tf#L372)| Shielded VM configuration of the instances. | <codetitle="object({ enable_secure_boot = bool enable_vtpm = bool enable_integrity_monitoring = bool })">object({…})</code> || <code>null</code> |
|[tag_bindings](variables.tf#L425)| Resource manager tag bindings for this instance, in tag key => tag value format. | <code>map(string)</code> || <code>null</code> |
942
+
|[tag_bindings_firewall](variables.tf#L431)| Firewall (network scoped) tag bindings for this instance, in tag key => tag value format. | <code>map(string)</code> || <code>null</code> |
0 commit comments