/terraform-digitalocean-chaosmonkey

Provides a DigitalOcean Droplet with the Chaos Monkey Application installed.

Primary LanguageHCL

terraform-digitalocean-chaosmonkey

Module version badge

Requirements

Name Version
terraform >= 1.0.0
digitalocean >= 2.0

Providers

Name Version
digitalocean 2.0

Modules

No modules.

Resources

Name Type
digitalocean_volume.chaosmonkey resource
digitalocean_droplet.chaosmonkey resource
digitalocean_volume_attachment.chaosmonkey resource
digitalocean_project.chaosmonkey resource

Inputs

Name Description Type Default Required
digitalocean_do_token Digital Ocean Token to authenticate against the Digital Ocean cli-tool string n/a yes
ssh_pvt_key Private SSH-Key path for the ssh connection string "/home/buehlmannpa/.ssh/id_rsa" yes
ssh_pub_key Pulbic SSH-Key path for the ssh connection string "/home/buehlmannpa/.ssh/id_rsa.pub" yes
digitalocean_region VPC region where the components where deployed string "fra1" yes
digitalocean_hostname Name of the chaos-monkey host string "vlscmn-fra1" yes
digitalocean_droplet_image Droplet image of the chaos-monkey host string "ubuntu-20-04-x64" no
digitalocean_droplet_size Droptlet size of the chaos-monkey host string "s-1vcpu-1gb" no
digitalocean_volume_name Volume name of the chaos-monkey host volume string "vlscmn-fra1-vol1" yes
digitalocean_volume_size Volume size of the chaos-monkey host volume (GB) number "5" yes
digitalocean_volume_filesystem_type Filesystem type of the chaos-monkey host volume string "ext4" no

Outputs

Name Description
hostname "Name of the Digital Ocean Droplet"
ip "IP of the Digital Ocean Droplet"

Example usage

Execute the Git-Repository via terraform on the command line

git clone https://github.com/buehlmannpa/terraform-digitalocean-chaosmonkey
cd terraform-digitalocean-chaosmonkey
terraform apply -auto-approve

ssh chaosmonkey@<ip_address>

Use the Git-Repository as a module

module "terraform-digitalocean-chaosmonkey" {
  source      = "git::ssh://git@github.com/buehlmannpa/terraform-digitalocean-chaosmonkey.git?ref=main"

  do_token    = var.do_token
  pvt_key     = var.pvt_key
  pub_key     = var.pub_key
  region      = var.region
  hostname    = var.hostname
  volume_name = var.volume_name
  volume_size = var.volume_size
}