Giter VIP home page Giter VIP logo

Comments (3)

andrewsomething avatar andrewsomething commented on July 26, 2024

Thanks for the report. I attempted to put together a minimal example showing this issue, but I was unable to reproduce it. Can you share the output of terraform version? Also, I notice that your example contains do_volume_ids when volume_ids is the correct attribute. I assume this was just a typo when sharing it here, correct?

Here's my attempt to reproduce. With this example, I am able to successfully attach and detach the volume by commenting it out from the Droplet config.

$ tree
.
├── main.tf
├── terraform.tfstate
├── terraform.tfstate.backup
└── volume
    ├── main.tf
    ├── terraform.tfstate
    └── terraform.tfstate.backup

1 directory, 6 files

main.tf

variable "do_token" {}
provider "digitalocean" {
    token = "${var.do_token}"
}

data "terraform_remote_state" "persistent" {
  backend = "local"
  config {
    path = "${path.cwd}/volume/terraform.tfstate"
  }
}

resource "digitalocean_droplet" "example" {
  count  = 1
  name   = "example-droplet"
  region = "ams3"
  size   = "s-1vcpu-1gb"
  image  = "ubuntu-18-04-x64"

  volume_ids = ["${data.terraform_remote_state.persistent.volume-example-id}"]
}

volume/main.tf

variable "do_token" {}
provider "digitalocean" {
    token = "${var.do_token}"
}

resource "digitalocean_volume" "example" {
  name   = "ams3-example"
  region = "ams3"
  size   = 10
}

output "volume-example-id" {
  value = "${digitalocean_volume.example.id}"
}

Please let me know if anything looks out of place or if there is any additional steps needed to reproduce this issue.

from terraform-provider-digitalocean.

ksanderer avatar ksanderer commented on July 26, 2024

I can't reproduce it also. I think it was due to the volume resizing from the DO web interface.

p.s. do_volume_ids is a typo, yes

from terraform-provider-digitalocean.

andrewsomething avatar andrewsomething commented on July 26, 2024

Thanks for the follow up. I'm going to go ahead and close out this issue. Please feel free to re-open if it occurs again.

from terraform-provider-digitalocean.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.