Skip to content

Commit 7c032a4

Browse files
committed
add documentation migration
1 parent 738d57b commit 7c032a4

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

docs/resources/baremetal_server.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,47 @@ resource "scaleway_baremetal_server" "base" {
226226
227227
```
228228

229+
### Migrate from hourly to monthly plan
230+
231+
To migrate from an hourly to a monthly subscription for a Scaleway Baremetal server, it is important to understand that the migration can only be done by using the data source.
232+
You cannot directly modify the subscription_period of an existing scaleway_baremetal_offer resource. Instead, you must define the monthly offer using the data source and then update the server configuration accordingly.
233+
234+
#### Hourly Plan Example
235+
236+
```terraform
237+
data "scaleway_baremetal_offer" "my_offer" {
238+
zone = "fr-par-1"
239+
name = "EM-B220E-NVME"
240+
subscription_period = "hourly"
241+
}
242+
243+
resource "scaleway_baremetal_server" "server01" {
244+
name = "UpdateSubscriptionPeriod"
245+
offer = data.scaleway_baremetal_offer.my_offer.offer_id
246+
zone = "%s"
247+
install_config_afterward = true
248+
}
249+
```
250+
251+
#### Monthly Plan Example
252+
253+
```terraform
254+
data "scaleway_baremetal_offer" "my_offer" {
255+
zone = "fr-par-1"
256+
name = "EM-B220E-NVME"
257+
subscription_period = "monthly"
258+
}
259+
260+
resource "scaleway_baremetal_server" "server01" {
261+
name = "UpdateSubscriptionPeriod"
262+
offer = data.scaleway_baremetal_offer.my_offer.offer_id
263+
zone = "fr-par-1"
264+
install_config_afterward = true
265+
}
266+
```
267+
268+
**Important** Once you migrate to a monthly subscription, you cannot downgrade back to an hourly plan. Ensure that the monthly plan meets your needs before making the switch.
269+
229270
## Argument Reference
230271

231272
The following arguments are supported:

0 commit comments

Comments
 (0)