Skip to content

Create a Vault server on DigitalOcean using Packer and Terraform

Notifications You must be signed in to change notification settings

gordonmurray/terraform_vault_digitalocean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a Vault server on DigitalOcean using Hashicorp Packer and Terraform

The overall process is that Packer is used to create an Image, which is a preconfigured server that Terraform can then start up in your account.

To get up and running

You will need a DigitalOcean account and have an API key ready.

  • Update packer/variables.json to add your DigitalOcean API key for Packer to use
  • Update variables.tfvars to also include your DigitalOcean API key for Terraform to use

Once you have the API keys added to the config files, first create the Image in your DigitalOcean account using the following:

cd packer
# validate the packer file
packer validate -var-file=variables.json vault.json
# build the Image
packer build -var-file=variables.json vault.json

Once the Image has been built, you will see a new Image in your DigitalOcean account ready for Terraform to use:

# get out of the packer folder
cd ..
terraform init
# view the changes Terraform will make
terraform plan
# apply the changes
terraform apply

You will not have a single Vault server running in your account. To get its IP address, either look in your DigitalOcean account, or run terraform show to see the IP address. You should be able to open your web browser and log in at that IP address at http://{your IP address}:8200

About

Create a Vault server on DigitalOcean using Packer and Terraform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published