Terraform provider reference / guides / import

Importing what you already have

Most projects do not start in Terraform. Everything the provider manages can be adopted instead of recreated, and the identifiers you need are the ones the API and the client area already show you.

What the identifier is

Resource Identifier to import
fiberax_server the server number, e.g. 11199
fiberax_network the network number
fiberax_ip the address number (not the address itself)
fiberax_ssh_key the key number
fiberax_network_interface <server>,<card>, e.g. 11199,net1
fiberax_server_firewall the server number - the firewall is a state OF a server
fiberax_server_backup_policy the server number, for the same reason
fiberax_disk <server>,<slot>, e.g. 11199,scsi1

Composite identifiers are separated by a comma, not a colon. Every resource page in this reference repeats its own identifier in an "Import" section, and that page is the authority if the two ever disagree.

The safe order

  1. Write the resource block first, with at least the fields that cannot be guessed (server_type_id, image on a server).

  2. Import:

    terraform import fiberax_server.app 11199
    
  3. Run terraform plan and read it as a question, not as a task list. A plan that wants to change nothing means the configuration matches reality. A plan that wants to replace something means the configuration disagrees with the platform on a field that cannot be changed in place - fix the configuration, not the platform.

What commonly shows up in that first plan

Importing a whole project at once

There is no single command for that, and the reason is not politeness: the provider cannot tell which of your existing servers you want managed. Import them one by one, starting with the ones you actually intend to change.

Generated from the provider schema for version 0.3.0. How to install the provider: Terraform provider.