You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scaleway_easy_partitioning data source allows you to retrieve a ready-to-use partitioning schema for a BareMetal server. This schema can be used for custom installations with optional swap and extra partitions.
9
+
10
+
This data source simplifies the process of generating valid partitioning configurations, especially useful when dealing with OS and offer compatibility requirements.
11
+
12
+
## Example Usage
13
+
14
+
```hcl
15
+
data "scaleway_easy_partitioning" "default" {
16
+
offer_id = "11111111-1111-1111-1111-111111111111"
17
+
os_id = "22222222-2222-2222-2222-222222222222"
18
+
swap = true
19
+
extra_partition = true
20
+
ext_4_mountpoint = "/data"
21
+
}
22
+
```
23
+
24
+
```hcl
25
+
data "scaleway_baremetal_offer" "my_offer" {
26
+
zone = "fr-par-1"
27
+
name = "EM-B220E-NVME"
28
+
}
29
+
30
+
data "scaleway_baremetal_os" "my_os" {
31
+
zone = "fr-par-1"
32
+
name = "Ubuntu"
33
+
version = "22.04 LTS (Jammy Jellyfish)"
34
+
}
35
+
36
+
resource "scaleway_iam_ssh_key" "main" {
37
+
name = "my-ssh-key"
38
+
public_key = "my-ssh-key-public"
39
+
}
40
+
41
+
data "scaleway_baremetal_easy_partitioning" "test" {
-`offer_id` (Required) The UUID of the BareMetal offer.
63
+
64
+
-`os_id` (Required) The UUID of the OS image.
65
+
66
+
-`swap` (Optional, Default: true) Whether to include a swap partition.
67
+
68
+
-`extra_partition` (Optional, Default: true) Whether to add an extra ext4 data partition.
69
+
70
+
-`ext_4_mountpoint` (Optional, Default: "/data") The mount point for the extra partition. Must be an absolute path using alphanumeric characters and underscores.
71
+
72
+
## Attributes Reference
73
+
74
+
In addition to all above arguments, the following attributes are exported:
75
+
76
+
-`id` — A composite identifier derived from offer_id and os_id.
77
+
78
+
-`json_partition` — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.
0 commit comments