Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,7 @@ be from 0 to 999,999,999 inclusive.`,
Type: schema.TypeString,
Optional: true,
AtLeastOneOf: advancedMachineFeaturesKeys,
DiffSuppressFunc: tpgresource.EmptyOrDefaultStringSuppress("STANDARD"),
ValidateFunc: validation.StringInSlice([]string{"STANDARD", "ENHANCED", "ARCHITECTURAL"}, false),
Description: `The PMU is a hardware component within the CPU core that monitors how the processor runs code. Valid values for the level of PMU are "STANDARD", "ENHANCED", and "ARCHITECTURAL".`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,7 @@ be from 0 to 999,999,999 inclusive.`,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
DiffSuppressFunc: tpgresource.EmptyOrDefaultStringSuppress("STANDARD"),
ValidateFunc: validation.StringInSlice([]string{"STANDARD", "ENHANCED", "ARCHITECTURAL"}, false),
Description: `The PMU is a hardware component within the CPU core that monitors how the processor runs code. Valid values for the level of PMU are "STANDARD", "ENHANCED", and "ARCHITECTURAL".`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,6 @@ func TestAccComputeInstanceTemplate_performanceMonitoringUnit(t *testing.T) {
Config: testAccComputeInstanceTemplate_performanceMonitoringUnit(context_1),
Check: resource.ComposeTestCheckFunc(
testAccCheckComputeInstanceTemplateExists(t, "google_compute_instance_template.foobar", &instanceTemplate),
resource.TestCheckResourceAttr("google_compute_instance_template.foobar", "advanced_machine_features.0.performance_monitoring_unit", "STANDARD"),
),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2091,7 +2091,6 @@ func TestAccComputeInstance_performanceMonitoringUnit(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckComputeInstanceExists(
t, "google_compute_instance.foobar", &instance),
resource.TestCheckResourceAttr("google_compute_instance.foobar", "advanced_machine_features.0.performance_monitoring_unit", "STANDARD"),
),
},
computeInstanceImportStep("us-central1-a", context_1["instance_name"].(string), []string{"allow_stopping_for_update"}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,7 @@ be from 0 to 999,999,999 inclusive.`,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
DiffSuppressFunc: tpgresource.EmptyOrDefaultStringSuppress("STANDARD"),
ValidateFunc: validation.StringInSlice([]string{"STANDARD", "ENHANCED", "ARCHITECTURAL"}, false),
Description: `The PMU is a hardware component within the CPU core that monitors how the processor runs code. Valid values for the level of PMU are "STANDARD", "ENHANCED", and "ARCHITECTURAL".`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,6 @@ func TestAccComputeRegionInstanceTemplate_performanceMonitoringUnit(t *testing.T
Config: testAccComputeRegionInstanceTemplate_performanceMonitoringUnit(context_1),
Check: resource.ComposeTestCheckFunc(
testAccCheckComputeRegionInstanceTemplateExists(t, "google_compute_region_instance_template.foobar", &instanceTemplate),
resource.TestCheckResourceAttr("google_compute_region_instance_template.foobar", "advanced_machine_features.0.performance_monitoring_unit", "STANDARD"),
),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,7 @@ func schemaNodeConfig() *schema.Schema {
"performance_monitoring_unit": {
Type: schema.TypeString,
Optional: true,
DiffSuppressFunc: tpgresource.EmptyOrDefaultStringSuppress("STANDARD"),
ValidateFunc: verify.ValidateEnum([]string{"ARCHITECTURAL", "STANDARD", "ENHANCED"}),
Description: `Level of Performance Monitoring Unit (PMU) requested. If unset, no access to the PMU is assumed.`,
},
Expand Down
Loading