Skip to content

Commit

Permalink
Correctly release visible_core_count (GoogleCloudPlatform#6860)
Browse files Browse the repository at this point in the history
* Correctly release visible_core_count

* Add test
  • Loading branch information
slevenick authored and kimihrr committed Dec 6, 2022
1 parent 004c1e4 commit cdfb923
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -677,14 +677,12 @@ func resourceComputeInstanceTemplate() *schema.Resource {
ForceNew: true,
Description: `The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.`,
},
<% unless version == 'ga' -%>
"visible_core_count": {
Type: schema.TypeInt,
Optional: true,
ForceNew: true,
Description: `The number of physical cores to expose to an instance. Multiply by the number of threads per core to compute the total number of virtual CPUs to expose to the instance. If unset, the number of cores is inferred from the instance\'s nominal CPU count and the underlying platform\'s SMT width.`,
},
<% end -%>
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2536,9 +2536,7 @@ resource "google_compute_instance_template" "foobar" {
advanced_machine_features {
threads_per_core = 1
enable_nested_virtualization = true
<% unless version == "ga" -%>
visible_core_count = 1
<% end -%>
}

scheduling {
Expand Down

0 comments on commit cdfb923

Please sign in to comment.