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

azurerm_capacity_reservation - update validation for capacity #25471

Merged
merged 1 commit into from
Apr 1, 2024
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 @@ -76,7 +76,7 @@ func resourceCapacityReservation() *pluginsdk.Resource {
"capacity": {
Type: pluginsdk.TypeInt,
Required: true,
ValidateFunc: validation.IntAtLeast(1),
ValidateFunc: validation.IntAtLeast(0),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ resource "azurerm_capacity_reservation" "test" {
capacity_reservation_group_id = azurerm_capacity_reservation_group.test.id
sku {
name = "Standard_F2"
capacity = 2
capacity = 0
}
}
`, template, data.RandomInteger)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/capacity_reservation.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ An `sku` block exports the following:

* `name` - (Required) Name of the sku, such as `Standard_F2`. Changing this forces a new resource to be created.

* `capacity` - (Required) Specifies the number of instances to be reserved. It must be a positive `integer` and not exceed the quota in the subscription.
* `capacity` - (Required) Specifies the number of instances to be reserved. It must be greater than or equal to `0` and not exceed the quota in the subscription.

## Attributes Reference

Expand Down
Loading