## NEED a provider # use in root module: # # module "postinstall" { # source "../alpine_postinstall" # connexion_ip = var.eth0_ip # connexion_private_key = var.pm_private_key # } resource "null_resource" "alpine_postinstall" { connection { type = "ssh" user = "root" host = var.connection_ip private_key = var.connection_private_key } provisioner "remote-exec" { inline = [ # see https://git.alpinelinux.org/aports/tree/main/ "echo '#--------------------------'", "echo '# module alpine_postinstall'", "echo '#--------------------------'", "apk add file man-pages tzdata bash htop vim", "echo '# install service openssh-server'", "apk add openssh-server", # "echo '# stop and disable service crond'", "rc-service crond stop", "rc-update del crond", ] } }