Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/guides/dedicated_server_migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ resource "ovh_dedicated_server" "srv" {
#

lifecycle {
ignore_changes = [os, customizations, properties, storage]
ignore_changes = [os, customizations, storage]
}
}
```
Expand Down
1 change: 0 additions & 1 deletion docs/resources/dedicated_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ resource "ovh_dedicated_server" "server" {
* `raid_level` - Software raid type
* `size` - Partition size in MiB
* `scheme_name` - Partitioning scheme (if applicable with selected operating system)
* `properties` - Deprecated, has no effect

### Arguments used to control the lifecycle of a dedicated server

Expand Down
2 changes: 0 additions & 2 deletions docs/resources/dedicated_server_reinstall_task.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ The following arguments are supported:

~> **WARNING** Some customizations may be required on some Operating Systems. [Check how to list the available and required customization(s) for your operating system](https://help.ovhcloud.com/csm/en-dedicated-servers-api-os-installation?id=kb_article_view&sysparm_article=KB0061951#os-inputs) (do not forget to adapt camel case customization name to snake case parameter).

* `properties` - Deprecated, has no effect

* `storage`: OS reinstallation storage configurations. [More details about disks, hardware/software RAID and partitioning configuration](https://help.ovhcloud.com/csm/en-dedicated-servers-api-partitioning?id=kb_article_view&sysparm_article=KB0043882) (do not forget to adapt camel case parameters to snake case parameters).
* `disk_group_id`: Disk group id to install the OS to (default is 0, meaning automatic).
* `hardware_raid`: Hardware Raid configurations (if not specified, all disks of the chosen disk group id will be configured in JBOD mode).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ resource "ovh_dedicated_server_reinstall_task" "server_install" {
http_headers = {
Authorization = "Basic bG9naW46cGFzc3dvcmQ="
}
image_url = "https://github.com/ashmonger/akution_test/releases/download/0.5-compress/deb11k6.qcow2"
image_url = "https://github.com/ashmonger/akution_test/releases/latest/download/deb11k6.qcow2"
}
}
6 changes: 2 additions & 4 deletions ovh/resource_dedicated_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,9 @@ func (r *dedicatedServerResource) Update(ctx context.Context, req resource.Updat
responseData.MergeWith(&stateData)
responseData.ID = responseData.ServiceName

// Explicitely set Customizations/Properties/Storage to what was defined in the plan
// Explicitely set Customizations/Storage to what was defined in the plan
// as we can't determine the right thing to do in MergeWith function
responseData.Customizations = planData.Customizations
responseData.Properties = planData.Properties
responseData.Storage = planData.Storage

// Same thing for the flags to control reinstallation, set the plan value explicitly
Expand Down Expand Up @@ -464,8 +463,7 @@ func (r *dedicatedServerResource) reinstallDedicatedServer(ctx context.Context,
if planData.Os.ValueString() != "" &&
stateData.Os.ValueString() != planData.Os.ValueString() ||
!stateData.Customizations.Equal(planData.Customizations) ||
!stateData.Storage.Equal(planData.Storage) ||
!stateData.Properties.Equal(planData.Properties) {
!stateData.Storage.Equal(planData.Storage) {
shouldReinstall = true
}
}
Expand Down
45 changes: 12 additions & 33 deletions ovh/resource_dedicated_server_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions ovh/resource_dedicated_server_reinstall_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,6 @@ func resourceDedicatedServerReinstallTask() *schema.Resource {
},
},
},
"properties": {
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Description: "Attribute 'properties' is deprecated and has no effect",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"storage": {
Type: schema.TypeList,
Optional: true,
Expand Down
2 changes: 1 addition & 1 deletion ovh/resource_dedicated_server_reinstall_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ resource "ovh_dedicated_server_reinstall_task" "server_reinstall" {
os = "byolinux_64"
customizations {
hostname = "mon-tux"
image_url = "https://github.com/ashmonger/akution_test/releases/download/0.6-fixCache/deb11k6.qcow2"
image_url = "https://github.com/ashmonger/akution_test/releases/latest/download/deb11k6.qcow2"
efi_bootloader_path = "\\efi\\debian\\grubx64.efi"
ssh_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIrODOo0SvY5f0TlQNvGHIRKzr4bHPa+D5bYF18RiOgP [email protected]"
config_drive_user_data = "c3NoX2F1dGhvcml6ZWRfa2V5czoKICAtIHNzaC1yc2EgQUFBQUI4ZGpZaXc9PSBteXNlbGZAbXlkb21haW4ubmV0Cgp1c2VyczoKICAtIG5hbWU6IHBhdGllbnQwCiAgICBzdWRvOiBBTEw9KEFMTCkgTk9QQVNTV0Q6QUxMCiAgICBncm91cHM6IHVzZXJzLCBzdWRvCiAgICBzaGVsbDogL2Jpbi9iYXNoCiAgICBsb2NrX3Bhc3N3ZDogZmFsc2UKICAgIHNzaF9hdXRob3JpemVkX2tleXM6CiAgICAgIC0gc3NoLXJzYSBBQUFBQjhkallpdz09IG15c2VsZkBteWRvbWFpbi5uZXQKZGlzYWJsZV9yb290OiBmYWxzZQpwYWNrYWdlczoKICAtIHZpbQogIC0gdHJlZQpmaW5hbF9tZXNzYWdlOiBUaGUgc3lzdGVtIGlzIGZpbmFsbHkgdXAsIGFmdGVyICRVUFRJTUUgc2Vjb25kcw=="
Expand Down
6 changes: 0 additions & 6 deletions ovh/types_dedicated_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ type DedicatedServerTask struct {
type DedicatedServerReinstallTaskCreateOpts struct {
Os string `json:"operatingSystem"`
Customizations *DedicatedServerReinstallTaskCustomizations `json:"customizations,omitempty"`
Properties map[string]interface{} `json:"properties,omitempty"`
Storage []DedicatedServerReinstallTaskStorage `json:"storage,omitempty"`
}

Expand All @@ -131,11 +130,6 @@ func (opts *DedicatedServerReinstallTaskCreateOpts) FromResource(d *schema.Resou
opts.Customizations = (&DedicatedServerReinstallTaskCustomizations{}).FromResource(d, "customizations.0")
}

Properties := d.Get("properties").(map[string]interface{})
if len(Properties) >= 1 {
opts.Properties = d.Get("properties").(map[string]interface{})
}

Storage := d.Get("storage").([]interface{})
if len(Storage) >= 1 {
opts.Storage = make([]DedicatedServerReinstallTaskStorage, len(Storage))
Expand Down
2 changes: 1 addition & 1 deletion templates/guides/dedicated_server_migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ resource "ovh_dedicated_server" "srv" {
#

lifecycle {
ignore_changes = [os, customizations, properties, storage]
ignore_changes = [os, customizations, storage]
}
}
```
Expand Down
1 change: 0 additions & 1 deletion templates/resources/dedicated_server.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ Use this resource to order and manage a dedicated server.
* `raid_level` - Software raid type
* `size` - Partition size in MiB
* `scheme_name` - Partitioning scheme (if applicable with selected operating system)
* `properties` - Attribute 'properties' is deprecated and has no effect

### Arguments used to control the lifecycle of a dedicated server

Expand Down
2 changes: 0 additions & 2 deletions templates/resources/dedicated_server_reinstall_task.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ The following arguments are supported:

~> **WARNING** Some customizations may be required on some Operating Systems. [Check how to list the available and required customization(s) for your operating system](https://help.ovhcloud.com/csm/en-dedicated-servers-api-os-installation?id=kb_article_view&sysparm_article=KB0061951#os-inputs) (do not forget to adapt camel case customization name to snake case parameter).

* `properties` - Attribute 'properties' is deprecated and has no effect.

* `storage`: OS reinstallation storage configurations. [More details about disks, hardware/software RAID and partitioning configuration](https://help.ovhcloud.com/csm/en-dedicated-servers-api-partitioning?id=kb_article_view&sysparm_article=KB0043882) (do not forget to adapt camel case parameters to snake case parameters).
* `disk_group_id`: Disk group id to install the OS to (default is 0, meaning automatic).
* `hardware_raid`: Hardware Raid configurations (if not specified, all disks of the chosen disk group id will be configured in JBOD mode).
Expand Down