vyrtualsynthese / digital-ocean-ondemand-minecraft-server

A terraform script to run on demand Minecraft Server over Digital Ocean Service
6 stars 2 forks source link

scp command fail #2

Open EunoTheBard opened 4 years ago

EunoTheBard commented 4 years ago

For this command I had to add -i priv_key to make the terraform function, is this something that can be fixed in a better way using some sort of variable?

"cmd" "/C" "scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i priv_key root@167.71.181.205:minecraft-server.tar.gz uploadFolder"]

justin-p commented 4 years ago

I fixed it by adding -i ${var.pvt_key}. See

https://github.com/justin-p/IaC-DigitalOcean-Minecraft/blob/c60a67332d4574bcbcbde2360d3a085fedadc522/mc_serv.tf#L110

That repo also fixes some other issues I had with provisioning of the keys and the backup process.