This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "${var.region}" | |
version = "~> 1.9" | |
} | |
provider "template" { | |
version = "~> 1.0" | |
} | |
resource "aws_default_vpc" "default" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/Users/nickhadd/.rvm/rubies/ruby-2.1.0/bin/ruby | |
# This script allows us to create new droplets | |
require 'droplet_kit' | |
print "Enter you new droplet name ->: " | |
dropname = gets.chomp | |
token=ENV['Oauth_key'] | |
client = DropletKit::Client.new(access_token: token) | |
# The last part of the object created below is the ssh_key ID array, very important to access the VM ;-) | |
droplet = DropletKit::Droplet.new(name: dropname, region: 'lon1', size: '512mb', image: 'ubuntu-14-04-x64',ssh_keys: [123456]) | |
client.droplets.create(droplet) |