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
2 changes: 1 addition & 1 deletion docs/data-sources/baremetal_offer.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data "scaleway_baremetal_offer" "my_offer" {

- `offer_id` - (Optional) The offer id. Only one of `name` and `offer_id` should be specified.

- `allow_disabled` - (Optional, default `false`) Include disabled offers.
- `include_disabled` - (Optional, default `false`) Include disabled offers.

- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the offer should be created.

Expand Down
2 changes: 1 addition & 1 deletion internal/services/baremetal/offer_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func dataSourceOfferRead(ctx context.Context, d *schema.ResourceData, m any) dia
for _, offer := range res.Offers {
if offer.Name == d.Get("name") {
if !offer.Enable && !d.Get("include_disabled").(bool) {
return diag.FromErr(fmt.Errorf("%s offer %s (%s) found in zone %s but is disabled. Add allow_disabled=true in your terraform config to use it", offer.SubscriptionPeriod, offer.Name, offer.ID, zone))
return diag.FromErr(fmt.Errorf("%s offer %s (%s) found in zone %s but is disabled. Add include_disabled=true in your terraform config to use it", offer.SubscriptionPeriod, offer.Name, offer.ID, zone))
}

matches = append(matches, offer)
Expand Down
2 changes: 1 addition & 1 deletion templates/data-sources/baremetal_offer.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data "scaleway_baremetal_offer" "my_offer" {

- `offer_id` - (Optional) The offer id. Only one of `name` and `offer_id` should be specified.

- `allow_disabled` - (Optional, default `false`) Include disabled offers.
- `include_disabled` - (Optional, default `false`) Include disabled offers.

- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the offer should be created.

Expand Down
Loading