Skip to content

Commit e5b9b2b

Browse files
committed
lint
1 parent 0a94f11 commit e5b9b2b

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

docs/resources/autoscaling_instance_group.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ resource "scaleway_autoscaling_instance_policy" "down" {
137137
threshold = 40
138138
}
139139
}
140-
141140
```
142141

143142
## Argument Reference

docs/resources/autoscaling_instance_policy.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ The following arguments are supported:
5959
- `value` - (Required) The value representing the magnitude of the scaling action to take for the Instance group. Depending on the `type` parameter, this number could represent a total number of Instances in the group, a number of Instances to add, or a percentage to scale the group by.
6060
- `priority` - (Required) The priority of this policy compared to all other scaling policies. This determines the processing order. The lower the number, the higher the priority.
6161
- `metric` - (Optional) Cockpit metric to use when determining whether to trigger a scale up/down action.
62-
- `name` - Name or description of the metric policy.
63-
- `operator` - Operator used when comparing the threshold value of the chosen `metric` to the actual sampled and aggregated value.
64-
- `aggregate` - How the values sampled for the `metric` should be aggregated.
65-
- `managed_metric` - The managed metric to use for this policy. These are available by default in Cockpit without any configuration or `node_exporter`. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
66-
- `cockpit_metric_name` - The custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered
67-
- `sampling_range_min` - The Interval of time, in minutes, during which metric is sampled.
68-
- `threshold` - The threshold value to measure the aggregated sampled `metric` value against. Combined with the `operator` field, determines whether a scaling action should be triggered.
62+
- `name` - Name or description of the metric policy.
63+
- `operator` - Operator used when comparing the threshold value of the chosen `metric` to the actual sampled and aggregated value.
64+
- `aggregate` - How the values sampled for the `metric` should be aggregated.
65+
- `managed_metric` - The managed metric to use for this policy. These are available by default in Cockpit without any configuration or `node_exporter`. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
66+
- `cockpit_metric_name` - The custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered
67+
- `sampling_range_min` - The Interval of time, in minutes, during which metric is sampled.
68+
- `threshold` - The threshold value to measure the aggregated sampled `metric` value against. Combined with the `operator` field, determines whether a scaling action should be triggered.
6969
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the Instance policy exists.
7070
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the Project the Instance policy is associated with.
7171

internal/services/autoscaling/instance_policy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ func ResourceInstancePolicyRead(ctx context.Context, d *schema.ResourceData, m i
166166
_ = d.Set("name", policy.Name)
167167
_ = d.Set("action", policy.Action.String())
168168
_ = d.Set("type", policy.Type.String())
169-
_ = d.Set("value", policy.Value)
170-
_ = d.Set("priority", policy.Priority)
169+
_ = d.Set("value", int(policy.Value))
170+
_ = d.Set("priority", int(policy.Priority))
171171
_ = d.Set("metric", flattenPolicyMetric(policy.Metric))
172172
_ = d.Set("instance_group_id", zonal.NewIDString(zone, policy.InstanceGroupID))
173173
_ = d.Set("zone", zone)

0 commit comments

Comments
 (0)