- Project State: Maintained
- Issues Response Time Maximum: 7 days or more
- Pull Request Response Time Maximum: 7 days or more
This plugin allows applications that rely on Train to communicate with the Digitalocean API. For example, InSpec uses this to perform compliance checks against Digitalocean infrastructure. Train plugins are managed by InSpec CLI.
When used in combination with the InSpec Digitalocean resource pack you can e.g. verify droplets:
describe digitalocean_droplet(id: '123456') do
it { should exist }
its('name') { should eq 'nginx-web-ams3' }
its('image') { should eq 'ubuntu-16-04-x64' }
its('region') { should eq 'ams3' }
its('size') { should eq 's-1vcpu-1gb' }
end
- InSpec 3 or later.
- Digitalocean API key
Train plugins are distributed as gems. You may choose to manage the gem yourself, but if you are an InSpec user, InSPec can handle it for you.
Simply run:
$ inspec plugin install train-digitalocean
In order to use this example, you need to create a DigitalOcean API Token and export it as an environment variable.
export DIGITALOCEAN_TOKEN="Put Your Token Here"
Verify the plugin and the connection to Digitalocean
$ inspec detect -t digitalocean://
== Platform Details
Name: digitalocean
Families: cloud, api
Release: 0.1.0
You need to set the DIGITALOCEAN_TOKEN
environment variable with your credentials.
Bugs, typos, limitations, and frustrations are welcome to be reported through the GitHub issues page for the train-digitalocean project.
You may also ask questions in the #inspec channel of the CHef Community Slack team. However, for an issue to get traction, please report it as a github issue.
If you wish to contribute to this plugin, please use the usual fork-branch-push-PR cycle. All functional changes need new tests, and bugfixes are expected to include a new test that demonstrates the bug.
Plugin Development is documented on the train
project on GitHub.