Skip to content

Instantly share code, notes, and snippets.

@glenn-sorrentino
Created May 28, 2024 18:20
Show Gist options
  • Save glenn-sorrentino/113dea707a156e47c39b4a4008a12457 to your computer and use it in GitHub Desktop.
Save glenn-sorrentino/113dea707a156e47c39b4a4008a12457 to your computer and use it in GitHub Desktop.

Developer Instructions

Terraform

On a Mac:

  1. Install Terraform
brew update
brew install terraform
brew install doctl
  1. Configure Docker CLI with your API token
doctl auth init
  1. View DO SSH Keys
doctl compute ssh-key list
  1. Copy the ID, and replace the value for digitalocean_ssh_key_ids in variables.tf.

  2. Initialize Terraform

terraform init
  1. Check the information in ddosecrets_news.tf and ensure the names are what you want.

  2. Test your configuration

terraform plan
  1. Deploy the infrastructure
terraform apply

Ansible

  1. Update the IP in inventory.yml with the IP address of the Droplet you just created using Terraform.

  2. Install Role for SSH hardening

ansible-galaxy install dev-sec.ssh-hardening

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment