cfm / terraform-metal-securedrop-staging

Terraform module for standing up a SecureDrop staging environment at Equinix Metal (fka Packet)
MIT License
0 stars 2 forks source link

`terraform apply` should wait for cloud-init #1

Open cfm opened 2 years ago

cfm commented 2 years ago

It typically takes about three minutes to stand up metal_device.sd-staging at Equinix Metal. The cloud-init setup follows silently unless you're logged in and watching journalctl -f.

It would be nice for terraform apply to wait for cloud-init to complete, by remote-execing either:

  1. cloud-init status --wait; or
  2. a test for the appearance of /var/lib/cloud/instance/boot-finished.

The tradeoff is that this will require that we set up or at least refer to the SSH key with which the server will be configured, so that remote-exec can use it to connect. Right now we let the server inherit its key from the Equinix Metal project or account.