Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DigitalOcean: resize droplet disk while preserving current CPU and RAM #13007

Closed
skovorodkin opened this issue Mar 23, 2017 · 3 comments · Fixed by #13059
Closed

DigitalOcean: resize droplet disk while preserving current CPU and RAM #13007

skovorodkin opened this issue Mar 23, 2017 · 3 comments · Fixed by #13059
Labels
bug provider/digitalocean waiting-response An issue/pull request is waiting for a response from the community

Comments

@skovorodkin
Copy link
Contributor

Terraform Version

v0.9.1

Affected Resource(s)

  • digitalocean_droplet

Terraform Configuration Files

provider "digitalocean" {
  token = "TOKEN"
}
resource "digitalocean_droplet" "droplet-01" {
  image = "ubuntu-16-04-x64"
  name = "droplet-01"
  region = "nyc3"
  resize_disk = false
  size = "512mb"
}

Expected Behavior

Droplet disk should be resized.

Actual Behavior

State is updated, but disk stays the same.

Steps to Reproduce

  1. Create a droplet: terraform apply.
  2. Resize only CPU and RAM: change config to size = "1gb" and run terraform apply.
  3. Try to resize disk: change config to resize_disk = true and run terraform apply.

Related Issues and PRs

@stack72
Copy link
Contributor

stack72 commented Mar 24, 2017

Hi @skovorodkin

Thanks for opening the issue here - apologies this isn't working as expected for you. From what I can gather, you have performed the following:

  • created a droplet
  • changed the size to 1gb but said not to resize the disk at the same time
  • then decided that you wanted to resize the disk

Is this correct?

Paul

@stack72 stack72 added the waiting-response An issue/pull request is waiting for a response from the community label Mar 24, 2017
@skovorodkin
Copy link
Contributor Author

Hi @stack72

Yes, it's correct.

I've made a pull request (#13059) with a fix.

stack72 pushed a commit that referenced this issue Mar 27, 2017
Allow to resize a droplet permanently (i.e. apply disk resize)
if previously it was resized temporarily (CPU and RAM only).

Fixes: #13007

```
$ make testacc TEST=./builtin/providers/digitalocean TESTARGS='-run=TestAccDigitalOceanDroplet_ResizeOnlyDisk'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/25 03:54:23 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/digitalocean -v -run=TestAccDigitalOceanDroplet_ResizeOnlyDisk -timeout 120m
=== RUN   TestAccDigitalOceanDroplet_ResizeOnlyDisk
--- PASS: TestAccDigitalOceanDroplet_ResizeOnlyDisk (198.62s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/digitalocean	198.638s
```
@ghost
Copy link

ghost commented Apr 14, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug provider/digitalocean waiting-response An issue/pull request is waiting for a response from the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants