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

instance_server: resizing root volume results in replacement #2605

Closed
Mika56 opened this issue Jun 5, 2024 · 0 comments · Fixed by #2745
Closed

instance_server: resizing root volume results in replacement #2605

Mika56 opened this issue Jun 5, 2024 · 0 comments · Fixed by #2745
Assignees
Labels
enhancement instance Instance issues, bugs and feature requests priority:high New features

Comments

@Mika56
Copy link

Mika56 commented Jun 5, 2024

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 Version

Terraform v1.8.4
on linux_amd64
+ provider registry.terraform.io/scaleway/scaleway v2.40.0

Affected Resource(s)

  • scaleway_instance_server

Terraform Configuration Files

resource "scaleway_instance_ip" "public_ip" {}

resource "scaleway_instance_server" "web" {
  type = "DEV1-S"
  image = "debian_bullseye"
  ip_id = scaleway_instance_ip.public_ip.id

  root_volume {
    size_in_gb  = 40
    volume_type = "b_sdd"
  }
}

Plan Output

  # module.scaleway-<redacted>.scaleway_instance_server.server must be replaced
-/+ resource "scaleway_instance_server" "server" {
      ~ bootscript_id                    = "fdfe150f-a870-4ce4-b432-9f56b5b995c1" -> (known after apply)
      + cloud_init                       = (known after apply)
      - enable_ipv6                      = false -> null
      ~ id                               = "fr-par-1/22d88a83-511f-49ca-82b9-b6610256e832" -> (known after apply)
      ~ ip_ids                           = [
          ~ "d90cb452-95f1-4387-8adf-79ebd4488b91" -> "fr-par-1/d90cb452-95f1-4387-8adf-79ebd4488b91",
          ~ "c2ea6f43-32fb-473a-a8aa-48c6824abd3e" -> "fr-par-1/c2ea6f43-32fb-473a-a8aa-48c6824abd3e",
        ]
      + ipv6_address                     = (known after apply)
      + ipv6_gateway                     = (known after apply)
      ~ ipv6_prefix_length               = 0 -> (known after apply)
        name                             = "<redacted>"
      ~ organization_id                  = "0647354e-9577-4f39-914e-da1159a2cbe7" -> (known after apply)
      + placement_group_policy_respected = (known after apply)
      + private_ip                       = (known after apply)
      ~ public_ip                        = "<redacted>" -> (known after apply)
      ~ user_data                        = {} -> (known after apply)
        # (12 unchanged attributes hidden)

      - public_ips {
          - address = "<redacted>" -> null
          - id      = "fr-par-1/d90cb452-95f1-4387-8adf-79ebd4488b91" -> null
        }
      - public_ips {
          - address = "<redacted>" -> null
          - id      = "fr-par-1/c2ea6f43-32fb-473a-a8aa-48c6824abd3e" -> null
        }

      ~ root_volume {
          ~ name                  = "Debian Bookworm" -> (known after apply)
          ~ size_in_gb            = 40 -> 45 # forces replacement
          ~ volume_id             = "fr-par-1/d519ba07-0d33-4eab-8c4f-cf8a2185d57d" -> (known after apply)
            # (3 unchanged attributes hidden)
        }
    }

Expected Behavior

Root volume size is increased

Actual Behavior

Whole instance is replaced

Steps to Reproduce

  1. Create a basic scaleway_instance_server resource
  2. terraform apply
  3. Increase its root_volume.size_in_gb value
  4. terraform apply

Important Factoids

References

  • Docs says that updating this field will recreate the resource (which is the case)
  • Same docs say that updates to this field will be ignored after creation (which is false)
  • Console allows for hot resizing of root volumes. Terraform should be able to do the same (reducing a volume would still recreate the server)
@Codelax Codelax added enhancement instance Instance issues, bugs and feature requests priority:high New features labels Jul 1, 2024
@Codelax Codelax self-assigned this Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement instance Instance issues, bugs and feature requests priority:high New features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants