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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
330 changes: 321 additions & 9 deletions docs/resource/equinix_metal_device.examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,60 @@ const web1 = new equinix.metal.Device("web1", {
billingCycle: equinix.metal.BillingCycle.Hourly,
projectId: projectId,
hardwareReservationId: "next-available",
storage: "{ \\"disks\\": [ { \\"device\\": \\"/dev/sda\\", \\"wipeTable\\": true, \\"partitions\\": [ { \\"label\\": \\"BIOS\\", \\"number\\": 1, \\"size\\": \\"4096\\" }, { \\"label\\": \\"SWAP\\", \\"number\\": 2, \\"size\\": \\"3993600\\" }, { \\"label\\": \\"ROOT\\", \\"number\\": 3, \\"size\\": \\"0\\" } ] } ], \\"filesystems\\": [ { \\"mount\\": { \\"device\\": \\"/dev/sda3\\", \\"format\\": \\"ext4\\", \\"point\\": \\"/\\", \\"create\\": { \\"options\\": [ \\"-L\\", \\"ROOT\\" ] } } }, { \\"mount\\": { \\"device\\": \\"/dev/sda2\\", \\"format\\": \\"swap\\", \\"point\\": \\"none\\", \\"create\\": { \\"options\\": [ \\"-L\\", \\"SWAP\\" ] } } } ]}
",
storage: `{
\"disks\": [
{
\"device\": \"/dev/sda\",
\"wipeTable\": true,
\"partitions\": [
{
\"label\": \"BIOS\",
\"number\": 1,
\"size\": \"4096\"
},
{
\"label\": \"SWAP\",
\"number\": 2,
\"size\": \"3993600\"
},
{
\"label\": \"ROOT\",
\"number\": 3,
\"size\": \"0\"
}
]
}
],
\"filesystems\": [
{
\"mount\": {
\"device\": \"/dev/sda3\",
\"format\": \"ext4\",
\"point\": \"/\",
\"create\": {
\"options\": [
\"-L\",
\"ROOT\"
]
}
}
},
{
\"mount\": {
\"device\": \"/dev/sda2\",
\"format\": \"swap\",
\"point\": \"none\",
\"create\": {
\"options\": [
\"-L\",
\"SWAP\"
]
}
}
}
]
}
`,
});
```
```python
Expand All @@ -435,8 +487,60 @@ web1 = equinix.metal.Device("web1",
billing_cycle=equinix.metal.BillingCycle.HOURLY,
project_id=project_id,
hardware_reservation_id="next-available",
storage="{ \\"disks\\": [ { \\"device\\": \\"/dev/sda\\", \\"wipeTable\\": true, \\"partitions\\": [ { \\"label\\": \\"BIOS\\", \\"number\\": 1, \\"size\\": \\"4096\\" }, { \\"label\\": \\"SWAP\\", \\"number\\": 2, \\"size\\": \\"3993600\\" }, { \\"label\\": \\"ROOT\\", \\"number\\": 3, \\"size\\": \\"0\\" } ] } ], \\"filesystems\\": [ { \\"mount\\": { \\"device\\": \\"/dev/sda3\\", \\"format\\": \\"ext4\\", \\"point\\": \\"/\\", \\"create\\": { \\"options\\": [ \\"-L\\", \\"ROOT\\" ] } } }, { \\"mount\\": { \\"device\\": \\"/dev/sda2\\", \\"format\\": \\"swap\\", \\"point\\": \\"none\\", \\"create\\": { \\"options\\": [ \\"-L\\", \\"SWAP\\" ] } } } ]}
")
storage="""{
\"disks\": [
{
\"device\": \"/dev/sda\",
\"wipeTable\": true,
\"partitions\": [
{
\"label\": \"BIOS\",
\"number\": 1,
\"size\": \"4096\"
},
{
\"label\": \"SWAP\",
\"number\": 2,
\"size\": \"3993600\"
},
{
\"label\": \"ROOT\",
\"number\": 3,
\"size\": \"0\"
}
]
}
],
\"filesystems\": [
{
\"mount\": {
\"device\": \"/dev/sda3\",
\"format\": \"ext4\",
\"point\": \"/\",
\"create\": {
\"options\": [
\"-L\",
\"ROOT\"
]
}
}
},
{
\"mount\": {
\"device\": \"/dev/sda2\",
\"format\": \"swap\",
\"point\": \"none\",
\"create\": {
\"options\": [
\"-L\",
\"SWAP\"
]
}
}
}
]
}
""")
```
```go
package main
Expand All @@ -456,8 +560,60 @@ func main() {
BillingCycle: pulumi.String(metal.BillingCycleHourly),
ProjectId: pulumi.Any(projectId),
HardwareReservationId: pulumi.String("next-available"),
Storage: pulumi.String("{ \\"disks\\": [ { \\"device\\": \\"/dev/sda\\", \\"wipeTable\\": true, \\"partitions\\": [ { \\"label\\": \\"BIOS\\", \\"number\\": 1, \\"size\\": \\"4096\\" }, { \\"label\\": \\"SWAP\\", \\"number\\": 2, \\"size\\": \\"3993600\\" }, { \\"label\\": \\"ROOT\\", \\"number\\": 3, \\"size\\": \\"0\\" } ] } ], \\"filesystems\\": [ { \\"mount\\": { \\"device\\": \\"/dev/sda3\\", \\"format\\": \\"ext4\\", \\"point\\": \\"/\\", \\"create\\": { \\"options\\": [ \\"-L\\", \\"ROOT\\" ] } } }, { \\"mount\\": { \\"device\\": \\"/dev/sda2\\", \\"format\\": \\"swap\\", \\"point\\": \\"none\\", \\"create\\": { \\"options\\": [ \\"-L\\", \\"SWAP\\" ] } } } ]}
"),
Storage: pulumi.String(`{
\"disks\": [
{
\"device\": \"/dev/sda\",
\"wipeTable\": true,
\"partitions\": [
{
\"label\": \"BIOS\",
\"number\": 1,
\"size\": \"4096\"
},
{
\"label\": \"SWAP\",
\"number\": 2,
\"size\": \"3993600\"
},
{
\"label\": \"ROOT\",
\"number\": 3,
\"size\": \"0\"
}
]
}
],
\"filesystems\": [
{
\"mount\": {
\"device\": \"/dev/sda3\",
\"format\": \"ext4\",
\"point\": \"/\",
\"create\": {
\"options\": [
\"-L\",
\"ROOT\"
]
}
}
},
{
\"mount\": {
\"device\": \"/dev/sda2\",
\"format\": \"swap\",
\"point\": \"none\",
\"create\": {
\"options\": [
\"-L\",
\"SWAP\"
]
}
}
}
]
}
`),
})
if err != nil {
return err
Expand All @@ -483,7 +639,59 @@ return await Deployment.RunAsync(() =>
BillingCycle = Equinix.Metal.BillingCycle.Hourly,
ProjectId = projectId,
HardwareReservationId = "next-available",
Storage = @"{ \""disks\"": [ { \""device\"": \""/dev/sda\"", \""wipeTable\"": true, \""partitions\"": [ { \""label\"": \""BIOS\"", \""number\"": 1, \""size\"": \""4096\"" }, { \""label\"": \""SWAP\"", \""number\"": 2, \""size\"": \""3993600\"" }, { \""label\"": \""ROOT\"", \""number\"": 3, \""size\"": \""0\"" } ] } ], \""filesystems\"": [ { \""mount\"": { \""device\"": \""/dev/sda3\"", \""format\"": \""ext4\"", \""point\"": \""/\"", \""create\"": { \""options\"": [ \""-L\"", \""ROOT\"" ] } } }, { \""mount\"": { \""device\"": \""/dev/sda2\"", \""format\"": \""swap\"", \""point\"": \""none\"", \""create\"": { \""options\"": [ \""-L\"", \""SWAP\"" ] } } } ]}
Storage = @"{
\""disks\"": [
{
\""device\"": \""/dev/sda\"",
\""wipeTable\"": true,
\""partitions\"": [
{
\""label\"": \""BIOS\"",
\""number\"": 1,
\""size\"": \""4096\""
},
{
\""label\"": \""SWAP\"",
\""number\"": 2,
\""size\"": \""3993600\""
},
{
\""label\"": \""ROOT\"",
\""number\"": 3,
\""size\"": \""0\""
}
]
}
],
\""filesystems\"": [
{
\""mount\"": {
\""device\"": \""/dev/sda3\"",
\""format\"": \""ext4\"",
\""point\"": \""/\"",
\""create\"": {
\""options\"": [
\""-L\"",
\""ROOT\""
]
}
}
},
{
\""mount\"": {
\""device\"": \""/dev/sda2\"",
\""format\"": \""swap\"",
\""point\"": \""none\"",
\""create\"": {
\""options\"": [
\""-L\"",
\""SWAP\""
]
}
}
}
]
}
",
});

Expand Down Expand Up @@ -519,7 +727,59 @@ public class App {
.projectId(projectId)
.hardwareReservationId("next-available")
.storage("""
{ \"disks\": [ { \"device\": \"/dev/sda\", \"wipeTable\": true, \"partitions\": [ { \"label\": \"BIOS\", \"number\": 1, \"size\": \"4096\" }, { \"label\": \"SWAP\", \"number\": 2, \"size\": \"3993600\" }, { \"label\": \"ROOT\", \"number\": 3, \"size\": \"0\" } ] } ], \"filesystems\": [ { \"mount\": { \"device\": \"/dev/sda3\", \"format\": \"ext4\", \"point\": \"/\", \"create\": { \"options\": [ \"-L\", \"ROOT\" ] } } }, { \"mount\": { \"device\": \"/dev/sda2\", \"format\": \"swap\", \"point\": \"none\", \"create\": { \"options\": [ \"-L\", \"SWAP\" ] } } } ]}
{
\"disks\": [
{
\"device\": \"/dev/sda\",
\"wipeTable\": true,
\"partitions\": [
{
\"label\": \"BIOS\",
\"number\": 1,
\"size\": \"4096\"
},
{
\"label\": \"SWAP\",
\"number\": 2,
\"size\": \"3993600\"
},
{
\"label\": \"ROOT\",
\"number\": 3,
\"size\": \"0\"
}
]
}
],
\"filesystems\": [
{
\"mount\": {
\"device\": \"/dev/sda3\",
\"format\": \"ext4\",
\"point\": \"/\",
\"create\": {
\"options\": [
\"-L\",
\"ROOT\"
]
}
}
},
{
\"mount\": {
\"device\": \"/dev/sda2\",
\"format\": \"swap\",
\"point\": \"none\",
\"create\": {
\"options\": [
\"-L\",
\"SWAP\"
]
}
}
}
]
}
""")
.build());

Expand All @@ -539,7 +799,59 @@ resources:
projectId: ${projectId}
hardwareReservationId: next-available
storage: |
{ \"disks\": [ { \"device\": \"/dev/sda\", \"wipeTable\": true, \"partitions\": [ { \"label\": \"BIOS\", \"number\": 1, \"size\": \"4096\" }, { \"label\": \"SWAP\", \"number\": 2, \"size\": \"3993600\" }, { \"label\": \"ROOT\", \"number\": 3, \"size\": \"0\" } ] } ], \"filesystems\": [ { \"mount\": { \"device\": \"/dev/sda3\", \"format\": \"ext4\", \"point\": \"/\", \"create\": { \"options\": [ \"-L\", \"ROOT\" ] } } }, { \"mount\": { \"device\": \"/dev/sda2\", \"format\": \"swap\", \"point\": \"none\", \"create\": { \"options\": [ \"-L\", \"SWAP\" ] } } } ]}
{
\"disks\": [
{
\"device\": \"/dev/sda\",
\"wipeTable\": true,
\"partitions\": [
{
\"label\": \"BIOS\",
\"number\": 1,
\"size\": \"4096\"
},
{
\"label\": \"SWAP\",
\"number\": 2,
\"size\": \"3993600\"
},
{
\"label\": \"ROOT\",
\"number\": 3,
\"size\": \"0\"
}
]
}
],
\"filesystems\": [
{
\"mount\": {
\"device\": \"/dev/sda3\",
\"format\": \"ext4\",
\"point\": \"/\",
\"create\": {
\"options\": [
\"-L\",
\"ROOT\"
]
}
}
},
{
\"mount\": {
\"device\": \"/dev/sda2\",
\"format\": \"swap\",
\"point\": \"none\",
\"create\": {
\"options\": [
\"-L\",
\"SWAP\"
]
}
}
}
]
}
```
{{% /example %}}

Expand Down
Loading
Loading