Skip to content

[FEATURE] Do not erase disks if asked with ovh_dedicated_server_reinstall_task #1165

@spnngl

Description

@spnngl

Description

We're using ovh_dedicated_server_reinstall_task and associated API to reinstall our baremetal servers.
Everything's fine on OS side but we'd like to be able to not erase our data disks when reinstalling : reinstall completely our OS on disk_group_id 1 but leave untouched our disk_group_id 2 (aka our data).

Would it be possible to add an option for this in the storage block ?

Affected Resource(s) and/or Data Source(s)

  • ovh_dedicated_server_reinstall_task

Potential Terraform Configuration

resource "ovh_dedicated_server_reinstall_task" "baremetal_install" {
  service_name = var.baremetal.service_name
  os           = "byolinux_64"

  customizations {
    efi_bootloader_path  = "\\efi\\ubuntu\\grubx64.efi"
    image_url            = "ubuntu.qcow2"
    hostname             = var.baremetal.display_name
    config_drive_user_data = base64encode(...)
  }

  storage {
    # Use OVH API to get storage id & co
    # See: https://help.ovhcloud.com/csm/en-dedicated-servers-api-partitioning?id=kb_article_view&sysparm_article=KB0043882
    #
    # Only use "system" disks and do not touch data ones (id = 2)
    disk_group_id = 1

    partitioning {
      layout {
        file_system = "ext4"
        mount_point = "/"
        raid_level  = 1
        # Use whole disk
        size        = 0
      }
    }
  }
}

Additional context

We upgrade our kubernetes and OS by just reinstalling its image, erasing data disks is painful with this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions