Skip to main content

Dedicated servers in Terraform

Last update:

Terraform is an infrastructure management tool on cloud or dedicated servers from HashiCorp. Infrastructure and its components are described in HashiCorp Configuration Language (HCL) in configuration files with a .tf extension. Learn more about the tool in the What is Terraform? article of the HashiCorp documentation.

Terraform manages the infrastructure using providers, special plugins that interact with APIs of services and platforms.

Dedicated servers are managed using the Selectel provider, which provides the selectel_dedicated_server_v1 resource . For more information about managing resources, see the Manage Terraform Resources instructions.

Use the Terraform Quick Start Guide to install Terraform and configure the Selectel provider. When working with dedicated servers through Terraform, pay attention to the specifics of managing dedicated servers. See the examples of infrastructure creation in the Dedicated Servers subsection of the Terraform documentation.

Features of dedicated server management in Terraform

Server ordering
Server upgrade
Installing the OS by auto-installation
Server abandonment and service resumption
  • after canceling the dedicated server, the server will be valid until the end of the paid period;
  • you cannot renew the service via Terraform. You can renew the server lease in the control panel: in the top menu, click ProductsDedicated servers → Server page → in the menu, select Renew server lease. After renewing the service, import the server into Terraform