Skip to content

Commit 2276a29

Browse files
committed
tf: Add outputs for provisioner and worker ids
Makes using them much easier. Signed-off-by: Manuel Mendez <[email protected]>
1 parent 0229bdf commit 2276a29

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

deploy/terraform/outputs.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@ output "provisioner_ip" {
22
value = metal_device.tink_provisioner.network[0].address
33
}
44

5+
output "provisioner_id" {
6+
value = metal_device.tink_provisioner.id
7+
}
8+
59
output "provisioner_ssh" {
610
value = format("%s.packethost.net", split("-", metal_device.tink_provisioner.id)[0])
711
}
812

13+
output "worker_id" {
14+
value = metal_device.tink_worker.id
15+
}
16+
917
output "worker_macs" {
1018
value = local.worker_macs
1119
}

docs/quickstarts/TERRAFORMEM.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This option will also show you how to create a machine to provision.
4242
Or if you have the [Equinix Metal CLI](https://github.com/equinix/metal-cli) installed run the following:
4343
4444
```bash
45-
metal device reboot -i $(terraform show -json | jq -r '.values.root_module.resources[1].values.id')
45+
metal device reboot -i $(terraform output -raw worker_id)
4646
```
4747
4848
5. Watch the provision complete
@@ -95,7 +95,7 @@ This option will also show you how to create a machine to provision.
9595
Now reboot the `tink-worker` via the [Equinix Metal Web UI](https://console.equinix.com), or if you have the [Equinix Metal CLI](https://github.com/equinix/metal-cli) installed run the following:
9696
9797
```bash
98-
metal device reboot -i $(terraform show -json | jq -r '.values.root_module.resources[1].values.id')
98+
metal device reboot -i $(terraform output -raw worker_id)
9999
```
100100
101101
7. Login to the machine

0 commit comments

Comments
 (0)