Skip to content

Instantly share code, notes, and snippets.

@retrogradeorbit
Created May 20, 2020 03:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retrogradeorbit/29e78a4eb8888196700b585751e37593 to your computer and use it in GitHub Desktop.
Save retrogradeorbit/29e78a4eb8888196700b585751e37593 to your computer and use it in GitHub Desktop.
test the digitalocean gist code by making a machine, printing its ip, and then deleting it.
#!/usr/bin/env spire
(ns user
(:require [digitalocean :as do]))
(let [droplet (->
{:name "myexample.com"
:region "nyc3"
:size "s-1vcpu-1gb"
:image "ubuntu-16-04-x64"
:backups false
:ipv6 true
:user_data nil
:private_networking nil
:volumes nil
:tags ["test-spire"]}
do/create-droplet
do/wait-for-droplet
)]
(debug
[(:id droplet)
(:networks droplet)])
(do/delete-droplet droplet))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment