2014-07-24 16:29:42 +02:00
---
layout: "digitalocean"
page_title: "Provider: DigitalOcean"
sidebar_current: "docs-do-index"
2014-10-22 05:21:56 +02:00
description: |-
The DigitalOcean (DO) provider is used to interact with the resources supported by DigitalOcean. The provider needs to be configured with the proper credentials before it can be used.
2014-07-24 16:29:42 +02:00
---
# DigitalOcean Provider
The DigitalOcean (DO) provider is used to interact with the
resources supported by DigitalOcean. The provider needs to be configured
with the proper credentials before it can be used.
Use the navigation to the left to read about the available resources.
## Example Usage
2017-04-17 12:17:54 +02:00
```hcl
2016-01-13 15:46:06 +01:00
# Set the variable value in *.tfvars file
# or using -var="do_token=..." CLI option
2015-10-22 21:14:54 +02:00
variable "do_token" {}
2014-07-24 16:29:42 +02:00
# Configure the DigitalOcean Provider
provider "digitalocean" {
2017-02-18 23:48:50 +01:00
token = "${var.do_token}"
2014-07-24 16:29:42 +02:00
}
# Create a web server
resource "digitalocean_droplet" "web" {
2017-02-18 23:48:50 +01:00
# ...
2014-07-24 16:29:42 +02:00
}
```
## Argument Reference
The following arguments are supported:
2015-04-09 21:25:21 +02:00
* `token` - (Required) This is the DO API token. This can also be specified
with the `DIGITALOCEAN_TOKEN` shell environment variable.
2014-07-24 16:29:42 +02:00