Skip to content

docs(baremetal): use UUID for offer instead of label name #2937

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

Merged
merged 2 commits into from
Feb 26, 2025
Merged
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
17 changes: 14 additions & 3 deletions docs/resources/baremetal_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ data "scaleway_iam_ssh_key" "main" {
name = "main"
}

data "scaleway_baremetal_offer" "my_offer" {
zone = "fr-par-2"
name = "EM-I220E-NVME"
}

resource "scaleway_baremetal_server" "base" {
zone = "fr-par-2"
offer = "GP-BM1-S"
offer = data.scaleway_baremetal_offer.my_offer.offer_id
os = "d17d6872-0412-45d9-a198-af82c34d3c5c"
ssh_key_ids = [data.scaleway_account_ssh_key.main.id]
}
Expand Down Expand Up @@ -201,11 +206,17 @@ resource "scaleway_iam_ssh_key" "main" {
name = "main"
}

data "scaleway_baremetal_offer" "my_offer" {
zone = "fr-par-1"
name = "EM-B220E-NVME"
subscription_period = "hourly"
}

resource "scaleway_baremetal_server" "base" {
name = "%s"
zone = "fr-par-1"
description = "test a description"
offer = "EM-B220E-NVME"
offer = data.scaleway_baremetal_offer.my_offer.offer_id
os = data.scaleway_baremetal_os.my_os.os_id
partitioning = var.configCustomPartitioning

Expand All @@ -219,7 +230,7 @@ resource "scaleway_baremetal_server" "base" {

The following arguments are supported:

- `offer` - (Required) The offer name or UUID of the baremetal server.
- `offer` - (Required) The offer UUID of the baremetal server.
Use [this endpoint](https://www.scaleway.com/en/developers/api/elastic-metal/#path-servers-get-a-specific-elastic-metal-server) to find the right offer.

~> **Important:** Updates to `offer` will recreate the server.
Expand Down
Loading