Terraform GreenHost provider. forked from github.com/digitalocean/terraform-provider-digitalocean
Go to file
Kiara Grouwstra 2bba30894b document tested API coverage 2022-08-20 19:30:20 +02:00
.github go 1.18 (#813) 2022-04-18 12:39:06 -05:00
digitalocean restore functionality for images 2022-08-20 19:30:07 +02:00
docs Add more docs examples on using droplet snapshots (#846) 2022-07-12 15:37:38 -04:00
examples Change k8s example to use ingress v1 (#837) 2022-06-15 14:49:06 -04:00
internal Upgrade Terraform SDK to v2.6.1 (#642) 2021-05-28 11:16:44 -05:00
scripts Fix Changelog Links Script for digitalocean provider 2017-06-26 09:49:27 -05:00
vendor restore functionality for images 2022-08-20 19:30:07 +02:00
.gitignore Update issue templates (#633) 2021-05-06 11:35:04 -05:00
.go-version Update to go 1.16 (#597) 2021-03-09 09:47:59 -06:00
.goreleaser.yml goreleaser: Build OpenBSD binaries. 2020-12-03 10:16:12 -05:00
CHANGELOG.md Prep v2.21.0 release (#838) 2022-06-16 08:04:50 -04:00
GNUmakefile Makefile: Only run sweep against the digitalocean package. (#759) 2021-12-17 15:50:03 -05:00
LICENSE initial commit 2017-06-05 20:54:06 +00:00
README.md document tested API coverage 2022-08-20 19:30:20 +02:00
go.mod Add reserved IP related resources and data source (#830) 2022-06-15 18:10:43 -04:00
go.sum Add reserved IP related resources and data source (#830) 2022-06-15 18:10:43 -04:00
main.go upgrade provider to use terraform-plugin-sdk v2 (#492) 2020-10-16 15:50:20 -04:00


GreenHost Terraform Provider

API coverage

index detail resource
regions - -
images - -


  • Terraform 0.10.x
  • Go 1.14 (to build the provider plugin)

Building The Provider

Clone repository to: $GOPATH/src/github.com/digitalocean/terraform-provider-digitalocean

$ mkdir -p $GOPATH/src/github.com/digitalocean; cd $GOPATH/src/github.com/digitalocean
$ git clone git@github.com:digitalocean/terraform-provider-digitalocean

Enter the provider directory and build the provider

$ cd $GOPATH/src/github.com/digitalocean/terraform-provider-digitalocean
$ make build

Using the provider

See the DigitalOcean Provider documentation to get started using the DigitalOcean provider.

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.11+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.

To compile the provider, run make build. This will build the provider and put the provider binary in the $GOPATH/bin directory.

$ make build
$ $GOPATH/bin/terraform-provider-digitalocean

In order to test the provider, you can simply run make test.

$ make test

In order to run the full suite of acceptance tests, run make testacc.

Note: Acceptance tests create real resources, and often cost money to run.

$ make testacc

In order to run a specific acceptance test, use the TESTARGS environment variable. For example, the following command will run TestAccDigitalOceanDomain_Basic acceptance test only:

$ make testacc TESTARGS='-run=TestAccDigitalOceanDomain_Basic'

In order to check changes you made locally to the provider, you can use the binary you just compiled by adding the following to your ~/.terraformrc file. This is valid for Terraform 0.14+. Please see Terraform's documentation for more details.

provider_installation {

  # Use /home/developer/go/bin as an overridden package directory
  # for the digitalocean/digitalocean provider. This disables the version and checksum
  # verifications for this provider and forces Terraform to look for the
  # digitalocean provider plugin in the given directory.
  dev_overrides {
    "digitalocean/digitalocean" = "/home/developer/go/bin"

  # For all other providers, install them directly from their origin provider
  # registries as normal. If you omit this, Terraform will _only_ use
  # the dev_overrides block, and so no other providers will be available.
  direct {}

For information about writing acceptance tests, see the main Terraform contributing guide.

Releasing the Provider

This repository contains a GitHub Action configured to automatically build and publish assets for release when a tag is pushed that matches the pattern v* (ie. v0.1.0).

A Gorelaser configuration is provided that produces build artifacts matching the layout required to publish the provider in the Terraform Registry.

Releases will appear as drafts. Once marked as published on the GitHub Releases page, they will become available via the Terraform Registry.