I'm using Terraform to spin up a DO droplet, using an Ubuntu and Docker image. Checkout below:
resource "digitalocean_droplet" "web" {
image = "docker-20-04"
name = "web"
region = "nyc3"
size = "s-1vcpu-1gb"
ssh_keys = [digitalocean_ssh_key.default.id]
user_data = "I2Nsb3Vk #.....etc......"
}
user_data
is my cloud-config
template encoded in base64.
I ssh into the droplet and notice that the packages listed in the template below are not getting installed.
#cloud-config
package_upgrade: true
package_update: true
packages:
- build-essential
- libmariadbclient-dev
- libjpeg62-turbo-dev
- zlib1g-dev
- libwebp-dev
- libpq-dev
- postgresql
- postgresql-contrib
Is there something wrong with my cloud config file above?
/var/lib/cloud/instance
, do you see auser-data.txt
file? Does it have the content you expect?