> ## Documentation Index
> Fetch the complete documentation index at: https://biznetgio.creations.ren/llms.txt
> Use this file to discover all available pages before exploring further.

# NEO Metal (Terraform)

> Terraform resources and data sources for NEO Metal bare-metal servers

NEO Metal is Biznet GIO's dedicated bare-metal product (`/baremetals` API group). This page also covers its add-ons: additional (floating) IPs and NEO Elastic Storage.

<Info>
  Every create/upgrade places a **real paid order**. Read the [billing guide](/guides/billing) for `cycle` values and `pay_with_credit_card` semantics.
</Info>

## `biznetgio_baremetal`

Orders a bare-metal server, waits until `Active`, and manages the label, power state, reset, and OS rebuild.

```hcl theme={null}
data "biznetgio_baremetal_products" "all" {}

resource "biznetgio_baremetal_keypair" "main" {
  name = "neo-metal-key"
}

resource "biznetgio_baremetal" "main" {
  product_id = data.biznetgio_baremetal_products.all.products[0].product_id
  cycle      = "m"
  select_os  = "ubuntu-22"
  keypair_id = biznetgio_baremetal_keypair.main.keypair_id
  label      = "neo-metal-main"
  public_ip  = 1

  # optional in-place actions (change value to fire):
  # power_state = "off"
  # reset_trigger = "reboot-1"
  # rebuild_os   = "centos7-base"
}
```

| Name | Type | Mode | Notes |
| - | - | - | - |
| `id` | string | computed | equals `account_id` |
| `product_id` | int64 | required | from `biznetgio_baremetal_products` |
| `cycle` | string | required | `m` monthly / `a` annual |
| `select_os` | string | optional | default `ubuntu-22`; create-only |
| `keypair_id` | int64 | required | from `biznetgio_baremetal_keypair`; create-only |
| `label` | string | required | display name - the only field `apply` actually sends as an update |
| `public_ip` | int64 | optional | default `1`; create-only |
| `promocode` | string | optional | create-only |
| `pay_with_credit_card` | bool | optional | default `true` |
| `power_state` | string | optional | `on` / `off`; API called only on change |
| `reset_trigger` | string | optional | one-shot reset; change value to re-fire |
| `rebuild_os` | string | optional | destructive OS reinstall; valid values from `biznetgio_baremetal_rebuild_os_list` |
| `status` | string | computed | |
| `order_id` | string | computed | |
| `ip_address` | string | computed | |
| `created_at` | string | computed | |
| `raw` | string | computed, sensitive | secrets redacted |
| `timeouts` | block | optional | create/update/delete |

Import with the numeric account id.

<Warning>
  Changing `product_id` or `cycle` after creation does **nothing** - no error, no resize, no re-billing. Terraform's `Update` only ever calls the API for `label`, `power_state`, `reset_trigger`, and `rebuild_os`; a changed `product_id` or `cycle` is written straight into state without touching the server, so `terraform apply` reports success and the *next* `plan` shows no diff, even though the real bare-metal server is still on the old package and cycle. If you need a different package or billing cycle, you must destroy and recreate the resource (or change it in the [portal](https://portal.biznetgio.com)) - there is no in-place resize for NEO Metal.
</Warning>

## `biznetgio_baremetal_keypair`

SSH keypair in the NEO Metal pool. Set `public_key` to import your own; leave it empty and the keypair is generated server-side.

```hcl theme={null}
resource "biznetgio_baremetal_keypair" "main" {
  name       = "neo-metal-key"
  public_key = "ssh-rsa AAAAB3NzaC1yc2E..."  # optional: import; omit to generate
}
```

| Name | Type | Mode | Notes |
| - | - | - | - |
| `id` | string | computed | equals `keypair_id` |
| `name` | string | required | create-only |
| `public_key` | string | optional | set → imported; empty → generated; create-only |
| `keypair_id` | int64 | computed | |
| `private_key` | string | computed, sensitive | returned once at create; preserved in state |
| `raw` | string | computed, sensitive | |

Update is a no-op - every input is create-only. Import with the keypair id.

## `biznetgio_baremetal_additional_ip`

Orders an additional (floating) IP, independent of any server. Attach it with `biznetgio_baremetal_additional_ip_assignment`.

```hcl theme={null}
resource "biznetgio_baremetal_additional_ip" "main" {
  product_id = 10
  cycle      = "m"
  region     = "wjv-1"
}
```

| Name | Type | Mode | Notes |
| - | - | - | - |
| `id` | string | computed | equals `account_id` |
| `product_id` | int64 | required | from `GET /baremetal-additional-ips/products` |
| `cycle` | string | required | `m` / `a` |
| `region` | string | optional | default `wjv-1`; from `GET /baremetal-additional-ips/regions` |
| `promocode` | string | optional | |
| `pay_with_credit_card` | bool | optional | default `true` |
| `status` | string | computed | |
| `ip_address` | string | computed | |
| `created_at` | string | computed | |
| `raw` | string | computed, sensitive | |
| `timeouts` | block | optional | create/delete |

Import with the numeric account id.

## `biznetgio_baremetal_additional_ip_assignment`

Attaches an additional IP to a bare-metal server. Reassigning means destroy + recreate.

```hcl theme={null}
resource "biznetgio_baremetal_additional_ip_assignment" "main" {
  additional_ip_id = biznetgio_baremetal_additional_ip.main.id
  metal_account_id = biznetgio_baremetal.main.id
}
```

| Name | Type | Mode | Notes |
| - | - | - | - |
| `id` | string | computed | composite `<metal_account_id>:<additional_ip_id>` |
| `additional_ip_id` | int64 | required | from `biznetgio_baremetal_additional_ip` |
| `metal_account_id` | int64 | required | target server account id |
| `status` | string | computed | |
| `raw` | string | computed, sensitive | |

**Import ID format:** `<metal_account_id>:<additional_ip_id>`, e.g. `terraform import biznetgio_baremetal_additional_ip_assignment.main 12345:67890`.

## `biznetgio_baremetal_elastic_storage`

NEO Elastic Storage volume, permanently bound to one bare-metal server at creation.

```hcl theme={null}
resource "biznetgio_baremetal_elastic_storage" "main" {
  product_id        = 20
  cycle             = "m"
  storage_name      = "metal-volume"
  metal_account_id  = biznetgio_baremetal.main.id
  size              = 100
}
```

| Name | Type | Mode | Notes |
| - | - | - | - |
| `id` | string | computed | equals storage `account_id` |
| `product_id` | int64 | required | change triggers change-package |
| `cycle` | string | required | `m` / `a`; create-only |
| `storage_name` | string | required | create-only |
| `metal_account_id` | int64 | required | create-only - no re-attach endpoint |
| `size` | int64 | optional | default `100` GB, grow-only |
| `promocode` | string | optional | create-only |
| `pay_with_credit_card` | bool | optional | default `true` |
| `status` | string | computed | |
| `created_at` | string | computed | |
| `raw` | string | computed, sensitive | |
| `timeouts` | block | optional | create/update/delete |

Import with the numeric account id.

<Note>
  `cycle` is correctly create-only here: a change destroys and recreates the volume. The [Pulumi provider](/pulumi/resources/baremetal#biznetgio:index:BaremetalElasticStorage)'s equivalent resource never checks or sends `cycle` to the API at all, in place or otherwise - a changed value there is silently written into state as if it succeeded.
</Note>

## Data sources

<Note>
  For real pricing and how to pick a specific package instead of trusting `[0]`, see the [Product Catalog](/products/baremetal) page.
</Note>

### `biznetgio_baremetal_products`

Server catalog (`GET /baremetals/products`). `products` items: `product_id`, `name`, `description`, `raw`.

### `biznetgio_baremetal_rebuild_os_list`

Valid OS images for rebuilding a server.

```hcl theme={null}
data "biznetgio_baremetal_rebuild_os_list" "ubuntu" {
  account_id = biznetgio_baremetal.main.id
}
```

Returns `oss` (list of strings, e.g. `centos7-base`) and `raw`.

### `biznetgio_baremetal_openvpn`

Out-of-band OpenVPN access configuration (`GET /baremetals/openvpn`). Returns `config` (sensitive) and `raw`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.