Commit Graph

858 Commits

Author SHA1 Message Date
Paul Stack 54395e189b provider/digitalocean: Support Import `digitalocean_ssh_key` (#7345)
```
make testacc TEST=./builtin/providers/digitalocean
TESTARGS='-run=TestAccDigitalOceanSSHKey_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/digitalocean -v -run=TestAccDigitalOceanSSHKey_ -timeout 120m
=== RUN   TestAccDigitalOceanSSHKey_importBasic
--- PASS: TestAccDigitalOceanSSHKey_importBasic (2.13s)
=== RUN   TestAccDigitalOceanSSHKey_Basic
--- PASS: TestAccDigitalOceanSSHKey_Basic (1.52s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/digitalocean
3.665s
```
2016-06-29 16:09:34 +01:00
Paul Stack d438e47fe5 provider/digitalocean: Reassign Floating IP when droplet changes (#7411)
Fixes #6673

When a floating IP is changed in the DO console, this PR will allow it
to be reassociated to the machine that Terraform attached it to and
change it back
2016-06-29 16:05:36 +01:00
stack72 a942892ec1 provider/digitalocean: Update of droplet document to add a note about
resize

When resizing a DO droplet, you can only increase the size not
descrease. If you try and go down in size, the API will return this
error:

```
 * digitalocean_droplet.foobar: Error resizing droplet (17090364):
   POST https://api.digitalocean.com/v2/droplets/17090364/actions:
   422 Size can not decrease size of Droplet's disk image
```
2016-06-09 20:09:33 +01:00
Benjamin Chelli 9deb08e4bc DigitalOcean - droplet always being recreated (#7044)
The region returned by the API is always lowercase therefore when you specify a region uppercase in your config file it forces the droplet to be regenerated on every ```terraform apply``` (even when it is not needed).
2016-06-09 10:23:44 +02:00
Thorsten Schifferdecker 1b658865d5 fix typo (#6564) 2016-05-10 22:32:22 +01:00
Michael D Roach 0687d1f222 Digital Ocean Example.
* Added Readme for this example.

* Base Terraform Digital Ocean Files

* Update Readme to read better

*  Changes to be committed:
	modified:   README.md
2016-05-09 08:04:51 +01:00
James Nugent 84d60696de provider/digitalocean: Check for nil response
This applies the same fix to `digitalocean_ssh_key` as #5588 applies to
droplets. Fixes #5402. The report there gives weight to my theory that
this occurs when there are transport issues.
2016-03-21 14:25:11 +00:00
James Nugent 69da948afd Fix panic in digital_ocean_droplet if resp is nil
Fixes #5583.
2016-03-11 16:00:13 +00:00
James Nugent fa340c97be Fix typo 2016-02-22 13:31:59 -05:00
James Nugent f1284fb75d Merge branch 'f-digitalocean-record-fqdn' of https://github.com/stack72/terraform into stack72-f-digitalocean-record-fqdn 2016-02-22 13:29:42 -05:00
Trevor Pounds 01ba89bbb4 Enable `go vet -unusedresult` check and fix warnings. 2016-02-17 11:59:50 -08:00
stack72 629cd30a24 provider/digitalocean: Addsa FQDN out to the `digitalocean_record`
resource. This is a computed field
2016-02-09 16:57:42 +00:00
stack72 e74650b266 provider/digitalocean: Addsa FQDN out to the `digitalocean_record`
resource. This is a computed field
2016-02-09 16:57:42 +00:00
James Nugent e640a03d07 Merge pull request #4767 from monkeylittleinc/v0.6.9-branch
Add support for multiple final states on the WaitForState resource
2016-01-21 18:19:52 -05:00
Colin Hebert 895edd8cc3 provider/digitalocean: allow reassignment of floating IPs
Do not force the creation of a new IP when the droplet_id changes, and
unassignment of the the floating IP without destroying it.
2016-01-21 07:16:59 -05:00
Ian Duffy f5552f9610 Change resource.StateChangeConf to use an array for target states
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-01-21 01:20:41 +00:00
Simeon Filipov 5b2f40babc Split long comment to two lines
The comment on first line of the code example is 82 characters long
and is cut on the 80-th character when viewed online. The second line
contains only two letters "on" without # in front.

The comment is displayed on two lines anyway, it is better if it is split to
two lines of less than 80 characters.
2016-01-13 14:46:06 +00:00
Paul Hinze eca929c2db provider/digitalocean: move floating ip test out of region w/ capacity problems
Should fix error seen here:

https://travis-ci.org/hashicorp/terraform/builds/100990006
2016-01-08 08:12:18 -06:00
Paul Hinze 48c40c4e35 provider/digitalocean: prevent collision on domain acctest 2016-01-04 16:36:07 -06:00
Paul Hinze 5603c74486 provider/digitalocean: acctest improvements
* Add SSH Keys to all droplets in tests, this prevents acctests from
   spamming account owner email with root password details
 * Add a new helper/acctest package to be a home for random string / int
   implementations used in tests.
 * Insert some random details into record tests to prevent collisions
 * Normalize config style in tests to hclfmt conventions
2016-01-04 15:30:35 -06:00
James Nugent 41cfcaa6c9 provider/digitalocean: Document defaults 2016-01-04 10:55:20 -05:00
James Nugent 9bd43efcd6 Fix errors with gofmt compliance 2015-12-17 12:35:19 -05:00
stack72 7117843a2d Changing the DigitalOcean FloatingIP Read func to check for Droplet Region and then fallback to FloatingIP Region 2015-12-08 17:08:02 +00:00
stack72 28a627a0ac Fixing the digitalocean floatingip resource for a panic when droplet wasn't available 2015-12-08 16:29:13 +00:00
Alex Berghage 4b749d1137 Analogous to #3768 -- just for DNS and keys.
The error string for 404s on DNS domains has (apparently)
changed, causing things to be a little sad when you modify
DNS domains from the DO console instead of terraform. This
is just the same fix as was applied to droplets around this
time last month.

While I was at it I just fixed this everywhere I saw it in the
DO provider source tree.
2015-12-06 07:13:14 -05:00
chrislovecnm b73977b2f5 updating printf formating to correct syntax with int 2015-11-25 07:59:46 +00:00
stack72 38371f4191 Using the laterst version of the DO API to get the Assign of an IP working without a time.Sleep 2015-11-24 11:08:43 +00:00
stack72 ebbc0cc8ab Using the laterst version of the DO API to get the Assign of an IP working without a time.Sleep 2015-11-24 11:08:43 +00:00
stack72 8b760a8b0f Adding the work to assign a Floating IP to a Droplet 2015-11-20 19:12:31 +02:00
stack72 06f31ff526 Reording the code for the creation of a Floating IP for a droplet. The call to the DO api takes a few seconds to propagate so I had to sacriface some kittens and added a short 10 second sleep 2015-11-20 19:12:31 +02:00
stack72 f08f01626f Adding the work to assign a Floating IP to a Droplet 2015-11-20 19:12:31 +02:00
stack72 f29196ec72 Adding the first pass of the work to get a floatingip assigned to a region 2015-11-20 19:12:30 +02:00
Paul Hinze 3416178b5b provider/digitalocean: remove relative CNAME test
Heard back from DO support:

> we require it to be a FQDN for a CNAME record in our DNS system.

/cc @paystee, the original author here
2015-11-19 18:36:58 -06:00
Paul Hinze 110bcccb19 provider/digitalocean: comment out test for relative DNS records
Until we hear back from DigitalOcean on whether this behavior is
supposed to be supported or not.
2015-11-19 16:11:42 -06:00
stack72 402df08047 Logging that the DO droplet wasn't found before removing it 2015-11-05 17:32:57 +00:00
stack72 09e622e91b Changing the DigitalOcean Droplet 404 from a message string to an actual 404 status code 2015-11-05 16:33:29 +00:00
stack72 9ff45325b2 Fixing the DigitalOcean Droplet 404 potential on refresh of state 2015-11-05 15:01:07 +00:00
Paul Hinze 2d025a0d36 provider/digitalocean: enhance user_data test
Checks to ensure that the droplet is recreated. Commenting out
`ForceNew` on `user_data` fails the test now.

/cc @stack72
2015-11-04 15:20:52 -06:00
stack72 9a9355ab96 Making user_data force a new droplet for DigitalOcean 2015-11-03 20:53:54 +00:00
Antoine Grondin 1262afa6a8 provider/digitalocean: fix issue #3628 by accepting SSH fingerprints 2015-10-25 16:29:01 -04:00
Wojtek Mach 079d1a4417 digitalocean: update index docs for do_token var
Updates the docs and clarifies the usage of `do_token` variable.

I was experiencing an issue mentioned here https://github.com/hashicorp/terraform/issues/124 and so adding more docs should be helpful.
2015-10-22 21:14:54 +02:00
Paul Hinze b171d75adb Merge pull request #3333 from aybabtme/use-official-digitalocean-client
use official Go client for DigitalOcean provider
2015-10-16 09:11:04 -05:00
Antoine Grondin 958dec2139 use official Go client for DigitalOcean provider 2015-09-27 01:09:51 -04:00
stack72 ab340205fe Enforcing lowercase on the DO Size. This is used for the sizeslug property of API calls - according to their [docs](https://developers.digitalocean.com/documentation/v1/sizes/) this always looks to be lowercase on the slug. I cannot find any definite answer to this question though 2015-09-18 19:42:37 +01:00
Anthony Scalisi 323fad0c51 remove various typos 2015-09-11 11:56:20 -07:00
Rui Lopes 94de7415fa provider/digitalocean: check if the droplet no longer exists. 2015-06-25 22:17:56 +01:00
Paul Hinze 8093ca1d18 docs: fill out all provider env var configuration
I find env vars a lot easier to use in day-to-day practice, so it's
probably a good idea to let the users have that benefit too!
2015-04-10 14:31:53 -05:00
Paul Hinze 4f645f9c99 providers/digitalocean: fix ssh key test
there's now validation on the public key field
2015-04-02 09:04:59 -05:00
Anton Tereshchenkov f509a81ece providers/digitalocean: add dot in GET response
Added tests for relative and external CNAME values.
2015-03-26 10:57:46 -07:00
Anton Tereshchenkov acd4e2b67e providers/digitalocean: force fqdn in dns rr value
Fixes a bug that forces DNS record to be recreated when dealing with
records that have domain values (CNAME, MX, NS, etc.)
2015-03-26 10:57:46 -07:00