Skip to content

Conversation

@zackpollard
Copy link

@zackpollard zackpollard commented Dec 4, 2025

Description

Add a new range argument to the ovh_dedicated_server resource that allows users to specify whether to order from the standard baremetal servers lineup or the eco server lineup.

  • Add range schema attribute with validator for 'standard' or 'eco'
  • Default to 'standard' when not specified
  • Map 'standard' to 'baremetalServers' and 'eco' to 'eco' for the API
  • Update Create function to pass range type to orderCreate
  • Generate documentation with tfplugindocs
  • Add acceptance test for eco server range
  • Add testAccPreCheckOrderDedicatedServerEco precheck function

Fixes #1176

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A: make testacc TESTARGS="-run TestAccDedicatedServer_eco"

Test Configuration:

  • Terraform version: terraform version: Terraform vx.y.z
  • Existing HCL configuration you used:
resource "ovh_dedicated_server" "eco" {
  ovh_subsidiary = data.ovh_me.account.ovh_subsidiary
  range = "eco"
  display_name = "Eco Server Test"
  plan = [
    {
      plan_code = "24sys012"
      duration = "P1M"
      pricing_mode = "default"

      configuration = [
        {
          label = "dedicated_datacenter"
          value = "lon"
        },
        {
          label = "dedicated_os"
          value = "none_64.en"
        },
        {
          label = "region"
          value = "europe"
        }
      ]
    }
  ]

  plan_option = [
    {
      duration = "P1M"
      plan_code = "softraid-2x512nvme-24sys"
      pricing_mode = "default"
      quantity = 1
    },
    {
      duration = "P1M"
      plan_code = "vrack-bandwidth-500-24sys"
      pricing_mode = "default"
      quantity = 1
    },
    {
      duration = "P1M"
      plan_code = "bandwidth-1000-24sys"
      pricing_mode = "default"
      quantity = 1
    },
    {
      duration = "P1M"
      plan_code = "ram-32g-ecc-2666-24sys"
      pricing_mode = "default"
      quantity = 1
    }
  ]
}

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or issues
  • I have added acceptance tests that prove my fix is effective or that my feature works
  • New and existing acceptance tests pass locally with my changes
  • I ran successfully go mod vendor if I added or modify go.mod file

I have created an acceptance test based on the existing test for the standard dedicated servers, however I am unable to run it locally as it would try to create an instance.

I have however, built and ran the provider locally and tested that it successfully creates a soyoustart instance there.

Add a new `range` argument to the `ovh_dedicated_server` resource
that allows users to specify whether to order from the standard
baremetal servers lineup or the eco server lineup.

- Add `range` schema attribute with validator for 'standard' or 'eco'
- Default to 'standard' when not specified
- Map 'standard' to 'baremetalServers' and 'eco' to 'eco' for the API
- Update Create function to pass range type to orderCreate
- Generate documentation with tfplugindocs
- Add acceptance test for eco server range
- Add testAccPreCheckOrderDedicatedServerEco precheck function

Signed-off-by: Zack Pollard <[email protected]>
@zackpollard zackpollard requested a review from a team as a code owner December 4, 2025 15:31
@zackpollard zackpollard changed the title feat: support eco server lineup for ovh_dedicated_server resource fix: support eco server lineup for ovh_dedicated_server resource Dec 4, 2025
@zackpollard
Copy link
Author

zackpollard commented Dec 4, 2025

@amstuta @jrm-d PR is up, as mentioned in the description I have ran this with a locally built provider and can confirm it successfully creates a soyoustart server (pending validation, but it created the order successfully). I have not ran the new acceptance test however.

Also, unsure why the DCO check is failing as I did add the Signed-off-by to my commit.

@amstuta
Copy link
Contributor

amstuta commented Dec 8, 2025

Thanks for your PR @zackpollard, I'll give it a try today !

Regarding the DCO, I see this in the summary: Committer: Zack; Expected "Zack [[email protected]](mailto:[email protected])", but got "Zack Pollard [[email protected]](mailto:[email protected])"., I guess if you amend your commit with the right name it will fix ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ovh_dedicated_server can't be used for the eco line of servers

2 participants