Skip to content

Allow Updating machine_type and Disk Size Without Resource Recreation #1218

@PeKaHaMup

Description

@PeKaHaMup

Problem description

Currently, modifying the machine_type or the disk size of a VM using the STACKIT Terraform Provider results in the resource being recreated.

This behavior causes avoidable downtime and operational overhead, especially in production environments where vertical scaling (CPU/RAM increase) or disk expansion is required without changing the overall VM identity.

Proposed solution

Enable in-place updates of the following attributes, where supported by the underlying STACKIT API:

machine_type (CPU/RAM resizing)

Disk size (volume expansion)

The provider should perform an update operation instead of forcing resource recreation when these attributes change and the platform supports resizing.

resource "stackit_compute_instance" "example" {
name = "example-vm"
machine_type = "c2-standard-4" # should be updatable without recreation

boot_volume {
size = 100 # should be expandable without recreation
}

network {
network_id = stackit_network.example.id
}
}

Alternative solutions (optional)

Additional information

Supporting in-place updates for machine_type and disk size would significantly improve operational flexibility and reduce service interruptions during routine scaling operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions