diff --git a/scaleway/resource_instance_placement_group.go b/scaleway/resource_instance_placement_group.go index 50844a349..f748632e0 100644 --- a/scaleway/resource_instance_placement_group.go +++ b/scaleway/resource_instance_placement_group.go @@ -26,7 +26,7 @@ func resourceScalewayInstancePlacementGroup() *schema.Resource { "policy_type": { Type: schema.TypeString, Optional: true, - Default: instance.PlacementGroupPolicyTypeLowLatency.String(), + Default: instance.PlacementGroupPolicyTypeMaxAvailability.String(), Description: "The operating mode is selected by a policy_type", ValidateFunc: validation.StringInSlice([]string{ instance.PlacementGroupPolicyTypeLowLatency.String(), diff --git a/scaleway/resource_instance_placement_group_test.go b/scaleway/resource_instance_placement_group_test.go index cd82f19a0..9a9f2245e 100644 --- a/scaleway/resource_instance_placement_group_test.go +++ b/scaleway/resource_instance_placement_group_test.go @@ -21,9 +21,9 @@ func TestAccScalewayInstancePlacementGroup(t *testing.T) { testAccCheckScalewayInstancePlacementGroupExists("scaleway_instance_placement_group.base"), testAccCheckScalewayInstancePlacementGroupExists("scaleway_instance_placement_group.scaleway"), resource.TestCheckResourceAttr("scaleway_instance_placement_group.base", "policy_mode", "optional"), - resource.TestCheckResourceAttr("scaleway_instance_placement_group.base", "policy_type", "low_latency"), + resource.TestCheckResourceAttr("scaleway_instance_placement_group.base", "policy_type", "max_availability"), resource.TestCheckResourceAttr("scaleway_instance_placement_group.scaleway", "policy_mode", "enforced"), - resource.TestCheckResourceAttr("scaleway_instance_placement_group.scaleway", "policy_type", "max_availability"), + resource.TestCheckResourceAttr("scaleway_instance_placement_group.scaleway", "policy_type", "low_latency"), resource.TestCheckResourceAttr("scaleway_instance_placement_group.scaleway", "policy_respected", "true"), ), }, @@ -33,10 +33,10 @@ func TestAccScalewayInstancePlacementGroup(t *testing.T) { testAccCheckScalewayInstancePlacementGroupExists("scaleway_instance_placement_group.base"), testAccCheckScalewayInstancePlacementGroupExists("scaleway_instance_placement_group.scaleway"), resource.TestCheckResourceAttr("scaleway_instance_placement_group.base", "policy_mode", "enforced"), - resource.TestCheckResourceAttr("scaleway_instance_placement_group.base", "policy_type", "max_availability"), + resource.TestCheckResourceAttr("scaleway_instance_placement_group.base", "policy_type", "low_latency"), resource.TestCheckResourceAttr("scaleway_instance_placement_group.base", "policy_respected", "true"), resource.TestCheckResourceAttr("scaleway_instance_placement_group.scaleway", "policy_mode", "optional"), - resource.TestCheckResourceAttr("scaleway_instance_placement_group.scaleway", "policy_type", "low_latency"), + resource.TestCheckResourceAttr("scaleway_instance_placement_group.scaleway", "policy_type", "max_availability"), ), }, }, @@ -104,13 +104,13 @@ var testAccScalewayInstancePlacementGroupConfig = []string{ resource "scaleway_instance_placement_group" "base" {} resource "scaleway_instance_placement_group" "scaleway" { policy_mode = "enforced" - policy_type = "max_availability" + policy_type = "low_latency" } `, ` resource "scaleway_instance_placement_group" "base" { policy_mode = "enforced" - policy_type = "max_availability" + policy_type = "low_latency" } resource "scaleway_instance_placement_group" "scaleway" {} `, diff --git a/website/docs/r/instance_placement_group.html.markdown b/website/docs/r/instance_placement_group.html.markdown index 22eb3ef36..3e6d8576c 100644 --- a/website/docs/r/instance_placement_group.html.markdown +++ b/website/docs/r/instance_placement_group.html.markdown @@ -20,7 +20,7 @@ resource "scaleway_instance_placement_group" "availability_group" {} The following arguments are supported: - `name` - (Optional) The name of the placement group. -- `policy_type` - (Defaults to `low_latency`) The [policy type](https://developers.scaleway.com/en/products/instance/api/#placement-groups-d8f653) of the placement group. Possible values are: `low_latency` or `max_availability`. +- `policy_type` - (Defaults to `max_availability`) The [policy type](https://developers.scaleway.com/en/products/instance/api/#placement-groups-d8f653) of the placement group. Possible values are: `low_latency` or `max_availability`. - `policy_mode` - (Defaults to `optional`) The [policy mode](https://developers.scaleway.com/en/products/instance/api/#placement-groups-d8f653) of the placement group. Possible values are: `optional` or `enforced`. - `zone` - (Defaults to [provider](../index.html#zone) `zone`) The [zone](../guides/regions_and_zones.html#zones) in which the placement group should be created. - `organization_id` - (Defaults to [provider](../index.html#organization_id) `organization_id`) The ID of the project the placement group is associated with.