My cloud config template file does not seem to be working when I use it to boot up a droplet in Digital Ocean?

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 = []
  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.

package_upgrade: true
package_update: true
  - 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?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer