ovh / terraform-provider-ovh

Terraform OVH provider
https://registry.terraform.io/providers/ovh/ovh/latest/docs
Mozilla Public License 2.0
182 stars 133 forks source link

[FEATURE] : allow dedicated server displayName configuration #684

Closed 131 closed 1 month ago

131 commented 1 month ago

Description

I want to update my server "displayName" using ovh_dedicated_server_update

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

Potential Terraform Configuration


resource "ovh_dedicated_server_update" "server" {
  service_name = data.ovh_dedicated_server.metal.service_name
  displayName = "use-this-as-name"

  boot_id      = data.ovh_dedicated_server_boots.harddisk.result[0]
  monitoring   = false
  state        = "ok"
}
amstuta commented 1 month ago

Hello @131, I'm not sure what field you would like to update in the API ? There is indeed a name field in dedicated servers, but I think it is the serviceName (the same as the one used as path parameter), and it is not editable.

131 commented 1 month ago

THe "displayName" (i've updated my request)

e-gautier commented 1 month ago

related data field https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/dedicated_server#display_name

amstuta commented 1 month ago

OK I see, since the displayName cannot be edited from the dedicated server section directly, we'll have to add a call to PUT /services/{serviceId} to update it. We will add this as soon as possible.

131 commented 1 month ago

That's great, you are the best thanks a lot 💯