Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update azurerm_orchestrated_virtual_machine_scale_set - Remove the validation for single_placement_group #7821

Merged
merged 5 commits into from
Aug 11, 2020
Merged
Changes from 2 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 @@ -70,12 +70,11 @@ func resourceArmOrchestratedVirtualMachineScaleSet() *schema.Resource {
},

"single_placement_group": {
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
Default: false,
Deprecated: "Due to an upgrade of the compute API this preview property has now been deprecated and required to be false in the 2019-12-01 api versions for orchestrated VMSS - as it will always be false for the current and future API versions this property now defaults to false and will removed in version 3.0 of the provider.",
ValidateFunc: validateBoolIsFalse,
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
Default: false,
Deprecated: "Due to an upgrade of the compute API this preview property has now been deprecated and required to be false in the 2019-12-01 api versions for orchestrated VMSS - as it will always be false for the current and future API versions this property now defaults to false and will removed in version 3.0 of the provider.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THis deprecation message should be removed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and docs maybe updated?

},

// the VMO mode can only be deployed into one zone for now, and its zone will also be assigned to all its VM instances
Expand Down Expand Up @@ -214,17 +213,3 @@ func resourceArmOrchestratedVirtualMachineScaleSetDelete(d *schema.ResourceData,

return nil
}

func validateBoolIsFalse(i interface{}, k string) (warnings []string, errors []error) {
v, ok := i.(bool)
if !ok {
errors = append(errors, fmt.Errorf("expected type of %s to be boolean", k))
return
}

if v {
errors = append(errors, fmt.Errorf("%q can only be false", k))
}

return
}