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

ibm_is_volume capacity volume update failing #2668

Closed
VidyasagarMSC opened this issue May 24, 2021 · 5 comments
Closed

ibm_is_volume capacity volume update failing #2668

VidyasagarMSC opened this issue May 24, 2021 · 5 comments
Assignees
Labels
service/VPC Infrastructure Issues related to the VPC Infrastructure

Comments

@VidyasagarMSC
Copy link
Member

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

terraform -v
Terraform v0.15.3
on darwin_amd64
+ provider registry.terraform.io/ibm-cloud/ibm v1.25.0

Affected Resource(s)

  • ibm_is_volume

Expected Behavior

Should resize the volume without any error. This works fine in UI.

Actual Behavior

Steps to Reproduce

resource "ibm_is_volume" "dedicated_volume" {
  name           = "${var.basename}-volume"
  profile        = "10iops-tier"
  zone           = "${var.region}-1"
  resource_group = var.resource_group_id
  capacity       = var.resize_dedicated_instance_volume ? 250 : 100
  encryption_key = var.keyprotect_key_id
  depends_on = [ibm_iam_authorization_policy.dedicated_volume_policy]
}


// Provision instance in a dedicated host
resource "ibm_is_instance" "dedicated_instance" {
  name    = "${var.basename}-dedicated-instance"
  image   = data.ibm_is_image.image.id
  profile = var.resize_dedicated_instance ? "cx2-8x16" : "cx2-2x4"

  primary_network_interface {
    subnet          = ibm_is_subnet.dedicated_subnet.id
    security_groups = [ibm_is_security_group.dedicated_security_group.id]
  }
  dedicated_host     = ibm_is_dedicated_host.dedicated_host.id
  vpc                = ibm_is_vpc.dedicated_vpc.id
  zone               = "${var.region}-1"
  keys               = local.ssh_key_ids
  resource_group     = var.resource_group_id
  volumes            = [ibm_is_volume.dedicated_volume.id]
  auto_delete_volume = true
}
  1. terraform apply - An instance with attached volume is provisioned on a dedicated host
  2. Set the resize_dedicated_instance_volume to true to increase the volume capacity from the default 100 GB to 250 GB.
  3. terraform apply

fails with

module.create_dedicated[0].ibm_is_volume.dedicated_volume: Destroying... [id=r006-86bc3c77-b4a4-4483-8824-662fb99ddb0c]
╷
│ Error: Error Deleting Volume : The volume is still attached to an instance.
│ {
│     "StatusCode": 409,
│     "Headers": {
│         "Cache-Control": [
│             "max-age=0, no-cache, no-store, must-revalidate"
│         ],
│         "Cf-Cache-Status": [
│             "DYNAMIC"
│         ],
│         "Cf-Ray": [
│             "654469ea8e774ae1-HYD"
│         ],
│         "Cf-Request-Id": [
│             "0a3ea0869500004ae14f2e1000000001"
│         ],
│         "Content-Length": [
│             "240"
│         ],
│         "Content-Type": [
│             "application/json; charset=utf-8"
│         ],
│         "Date": [
│             "Mon, 24 May 2021 06:19:44 GMT"
│         ],
│         "Expect-Ct": [
│             "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""
│         ],
│         "Expires": [
│             "-1"
│         ],
│         "Pragma": [
│             "no-cache"
│         ],
│         "Server": [
│             "cloudflare"
│         ],
│         "Strict-Transport-Security": [
│             "max-age=31536000; includeSubDomains"
│         ],
│         "Transaction-Id": [
│             "ca35094c142783f2f7ec1a36cf37a964"
│         ],
│         "Vary": [
│             "Accept-Encoding"
│         ],
│         "X-Content-Type-Options": [
│             "nosniff"
│         ],
│         "X-Request-Id": [
│             "ca35094c142783f2f7ec1a36cf37a964"
│         ],
│         "X-Xss-Protection": [
│             "1; mode=block"
│         ]
│     },
│     "Result": {
│         "errors": [
│             {
│                 "code": "volume_still_attached",
│                 "message": "The volume is still attached to an instance.",
│                 "more_info": "http://www.bluemix.com/help#volume_still_attached",
│                 "target": {
│                     "name": "",
│                     "type": ""
│                 }
│             }
│         ],
│         "trace": "ca35094c142783f2f7ec1a36cf37a964"
│     },
│     "RawResult": null
│ }

Important Factoids

References

  • #0000
@kavya498 kavya498 added the service/VPC Infrastructure Issues related to the VPC Infrastructure label May 24, 2021
@astha-jain
Copy link
Contributor

Resizing a volume is still in a Beta release. We'll keep this request open.

@VidyasagarMSC
Copy link
Member Author

@astha-jain Expandable volume is now GAed.

@astha-jain
Copy link
Contributor

Yes @VidyasagarMSC. Working on getting the provider out.

@astha-jain
Copy link
Contributor

@kavya498 PR is merged This issue can be closed now.

@kavya498
Copy link
Collaborator

Thanks.. closing this issue..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/VPC Infrastructure Issues related to the VPC Infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants