lukesmurray / mc-server

Luke and Mateo's Minecraft Server.
MIT License
1 stars 0 forks source link

save terraform state in s3 #3

Open lukesmurray opened 5 years ago

lukesmurray commented 5 years ago

currently terrraform state only exists on the computer running the script. saving it to s3 would be safer.

resource

lukesmurray commented 5 years ago

Not sure if something similar can be down with serverless package or more likely by setting deployment bucket in serverless.yml

lukesmurray commented 5 years ago

From the serverless docs I can confirm that serverless is using the deploymentBucket config to store state. If we specify the name then builds should be consistent across machines.

Serverless Bucket The name should be the same as the backups bucket for simplicity. We also want to set the deploymentPrefix to severless and the serverSideEncryption to AES256. see here.

lukesmurray commented 5 years ago

for saving terraform state check out terraform best practices or continuous delivery with terraform