> ## 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 (Pulumi)

> Pulumi resources and functions for NEO Metal bare-metal servers

NEO Metal dedicated servers (`/baremetals` API group) plus their 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 `payWithCreditCard` semantics.
</Info>

## `biznetgio:index:Baremetal`

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    import * as biznetgio from "@shirasakaren/biznetgio";

    const products = biznetgio.baremetalProductsOutput();

    const keypair = new biznetgio.BaremetalKeypair("metal-key", {
      name: "neo-metal-key",
    });

    const server = new biznetgio.Baremetal("metal-main", {
      productId: products.products[0].productId,
      cycle: "m",
      selectOs: "ubuntu-22",
      keypairId: keypair.id.apply((id) => Number(id)),
      label: "neo-metal-main",
      publicIp: 1,
      // optional in-place actions (change value to fire):
      // powerState: "off",
      // resetTrigger: "reboot-1",
      // rebuildOs: "centos7-base",
    });

    export const serverStatus = server.status;
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import pulumi
    import pulumi_biznetgio

    products = pulumi_biznetgio.baremetal_products()

    keypair = pulumi_biznetgio.BaremetalKeypair(
        "metal-key",
        name="neo-metal-key",
    )

    server = pulumi_biznetgio.Baremetal(
        "metal-main",
        product_id=products.products[0].product_id,
        cycle="m",
        select_os="ubuntu-22",
        keypair_id=pulumi.Output.from_input(keypair.id).apply(int),
        label="neo-metal-main",
        public_ip=1,
        # power_state="off",
        # reset_trigger="reboot-1",
        # rebuild_os="centos7-base",
    )

    pulumi.export("serverStatus", server.status)
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    package main

    import (
        biznetgio "github.com/shirasakaren/pulumi-biznetgio/sdk/go/pulumi-biznetgio"
        "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )

    func main() {
        pulumi.Run(func(ctx *pulumi.Context) error {
            products, err := biznetgio.BaremetalProducts(ctx, &biznetgio.BaremetalProductsArgs{})
            if err != nil {
                return err
            }

            keypair, err := biznetgio.NewBaremetalKeypair(ctx, "metal-key", &biznetgio.BaremetalKeypairArgs{
                Name: pulumi.String("neo-metal-key"),
            })
            if err != nil {
                return err
            }

            server, err := biznetgio.NewBaremetal(ctx, "metal-main", &biznetgio.BaremetalArgs{
                ProductId:  pulumi.Int(products.Products[0].ProductId),
                Cycle:      pulumi.String("m"),
                SelectOs:   pulumi.String("ubuntu-22"),
                KeypairId:  keypair.KeypairId,
                Label:      pulumi.String("neo-metal-main"),
                PublicIp:   pulumi.Int(1),
                // PowerState:   pulumi.String("off"),
                // ResetTrigger: pulumi.String("reboot-1"),
                // RebuildOs:    pulumi.String("centos7-base"),
            })
            if err != nil {
                return err
            }

            ctx.Export("serverStatus", server.Status)
            return nil
        })
    }
    ```
  </Tab>

  <Tab title=".NET">
    ```csharp theme={null}
    using System;
    using System.Collections.Generic;
    using Pulumi;
    using Shirasakaren.Biznetgio;

    return await Deployment.RunAsync(() =>
    {
        var products = BaremetalProducts.Invoke();

        var keypair = new BaremetalKeypair("metal-key", new BaremetalKeypairArgs
        {
            Name = "neo-metal-key",
        });

        var server = new Baremetal("metal-main", new BaremetalArgs
        {
            ProductId = products.Apply(p => p.Products[0].ProductId),
            Cycle = "m",
            SelectOs = "ubuntu-22",
            KeypairId = keypair.Id.Apply(v => int.Parse(v)),
            Label = "neo-metal-main",
            PublicIp = 1,
            // PowerState = "off",
            // ResetTrigger = "reboot-1",
            // RebuildOs = "centos7-base",
        });

        return new Dictionary<string, object?>
        {
            ["serverStatus"] = server.Status,
        };
    });
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    package demo;

    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import ren.shirasaka.biznetgio.*;

    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }

        private static void stack(Context ctx) {
            var products = BiznetgioFunctions.baremetalProducts();

            var keypair = new BaremetalKeypair("metal-key",
                BaremetalKeypairArgs.builder()
                    .name("neo-metal-key")
                    .build());

            var server = new Baremetal("metal-main",
                BaremetalArgs.builder()
                    .productId(products.applyValue(p -> p.products().get(0).productId()))
                    .cycle("m")
                    .selectOs("ubuntu-22")
                    .keypairId(keypair.id().applyValue(Integer::parseInt))
                    .label("neo-metal-main")
                    .publicIp(1)
                    // .powerState("off")
                    // .resetTrigger("reboot-1")
                    // .rebuildOs("centos7-base")
                    .build());

            ctx.export("serverStatus", server.status());
        }
    }
    ```
  </Tab>

  <Tab title="YAML">
    ```yaml theme={null}
    resources:
      server:
        type: biznetgio:index:Baremetal
        properties:
          productId: ${products[0].productId}
          cycle: m
          selectOs: ubuntu-22
          keypairId: ${fn::toNumber(keypair.id)}
          label: neo-metal-main
          publicIp: 1
          # powerState: "off"
          # resetTrigger: reboot-1
          # rebuildOs: centos7-base
    ```
  </Tab>
</Tabs>

| Input | Type | Required | Notes |
| - | - | - | - |
| `productId` | int64 | yes | from `baremetalProducts`; create-only - a change destroys and recreates the server |
| `cycle` | string | yes | `m` monthly / `a` annual; create-only |
| `selectOs` | string | no | default `ubuntu-22`; create-only |
| `keypairId` | int64 | yes | from `BaremetalKeypair`; create-only |
| `label` | string | yes | display name - the only updatable input |
| `publicIp` | int64 | no | default `1`; create-only |
| `promocode` | string | no | create-only |
| `payWithCreditCard` | bool | no | default `true` |
| `powerState` | string | no | `on` / `off`; API called only on change |
| `resetTrigger` | string | no | one-shot reset; change value to re-fire |
| `rebuildOs` | string | no | destructive rebuild; valid values from `baremetalRebuildOsList` |

Outputs: `status`, `orderId`, `ipAddress`, `createdAt`, `raw` (secret, redacted). Import with the numeric account id.

<Note>
  Pulumi handles a `productId` or `cycle` change safely by destroying and recreating the server. The Terraform provider's equivalent resource does not - see the [Terraform reference](/terraform/resources/baremetal#biznetgio_baremetal) if you also use Terraform for NEO Metal.
</Note>

## `biznetgio:index:BaremetalKeypair`

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    const keypair = new biznetgio.BaremetalKeypair("metal-key", {
      name: "neo-metal-key",
      publicKey: "ssh-rsa AAAAB3NzaC1yc2E...",   // optional: import; omit to generate
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    keypair = pulumi_biznetgio.BaremetalKeypair(
        "metal-key",
        name="neo-metal-key",
        public_key="ssh-rsa AAAAB3NzaC1yc2E...",   # optional: import; omit to generate
    )
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    keypair, err := biznetgio.NewBaremetalKeypair(ctx, "metal-key", &biznetgio.BaremetalKeypairArgs{
        Name:      pulumi.String("neo-metal-key"),
        PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2E..."),
    })
    ```
  </Tab>

  <Tab title=".NET">
    ```csharp theme={null}
    var keypair = new BaremetalKeypair("metal-key", new BaremetalKeypairArgs
    {
        Name = "neo-metal-key",
        PublicKey = "ssh-rsa AAAAB3NzaC1yc2E...",
    });
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    var keypair = new BaremetalKeypair("metal-key",
        BaremetalKeypairArgs.builder()
            .name("neo-metal-key")
            .publicKey("ssh-rsa AAAAB3NzaC1yc2E...")
            .build());
    ```
  </Tab>

  <Tab title="YAML">
    ```yaml theme={null}
    keypair:
      type: biznetgio:index:BaremetalKeypair
      properties:
        name: neo-metal-key
        publicKey: "ssh-rsa AAAAB3NzaC1yc2E..."
    ```
  </Tab>
</Tabs>

| Input | Type | Required | Notes |
| - | - | - | - |
| `name` | string | yes | |
| `publicKey` | string | no | set → imported via the import endpoint; empty → server-generated |

Outputs: `keypairId`, `privateKey` (secret - create response only, preserved across refreshes), `raw` (secret). No update.

## `biznetgio:index:BaremetalAdditionalIp`

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    const ip = new biznetgio.BaremetalAdditionalIp("extra-ip", {
      productId: 10,
      cycle: "m",
      region: "wjv-1",
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    ip = pulumi_biznetgio.BaremetalAdditionalIp(
        "extra-ip",
        product_id=10,
        cycle="m",
        region="wjv-1",
    )
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    ip, err := biznetgio.NewBaremetalAdditionalIp(ctx, "extra-ip", &biznetgio.BaremetalAdditionalIpArgs{
        ProductId: pulumi.Int(10),
        Cycle:     pulumi.String("m"),
        Region:    pulumi.String("wjv-1"),
    })
    ```
  </Tab>

  <Tab title=".NET">
    ```csharp theme={null}
    var ip = new BaremetalAdditionalIp("extra-ip", new BaremetalAdditionalIpArgs
    {
        ProductId = 10,
        Cycle = "m",
        Region = "wjv-1",
    });
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    var ip = new BaremetalAdditionalIp("extra-ip",
        BaremetalAdditionalIpArgs.builder()
            .productId(10)
            .cycle("m")
            .region("wjv-1")
            .build());
    ```
  </Tab>

  <Tab title="YAML">
    ```yaml theme={null}
    ip:
      type: biznetgio:index:BaremetalAdditionalIp
      properties:
        productId: 10
        cycle: m
        region: wjv-1
    ```
  </Tab>
</Tabs>

| Input | Type | Required | Notes |
| - | - | - | - |
| `productId` | int64 | yes | from `GET /baremetal-additional-ips/products` |
| `cycle` | string | yes | `m` / `a` |
| `region` | string | no | default `wjv-1`; from `GET /baremetal-additional-ips/regions` |
| `promocode` | string | no | |
| `payWithCreditCard` | bool | no | default `true` |

Outputs: `status`, `ipAddress`, `createdAt`, `raw` (secret). No update - input changes replace the resource.

## `biznetgio:index:BaremetalAdditionalIpAssignment`

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    const assignment = new biznetgio.BaremetalAdditionalIpAssignment("assign", {
      additionalIpId: ip.id.apply((id) => Number(id)),
      metalAccountId: server.id.apply((id) => Number(id)),
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    assignment = pulumi_biznetgio.BaremetalAdditionalIpAssignment(
        "assign",
        additional_ip_id=pulumi.Output.from_input(ip.id).apply(int),
        metal_account_id=pulumi.Output.from_input(server.id).apply(int),
    )
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    assignment, err := biznetgio.NewBaremetalAdditionalIpAssignment(ctx, "assign", &biznetgio.BaremetalAdditionalIpAssignmentArgs{
        AdditionalIpId:  ip.ID().ToIntOutput(),
        MetalAccountId:  server.ID().ToIntOutput(),
    })
    ```
  </Tab>

  <Tab title=".NET">
    ```csharp theme={null}
    var assignment = new BaremetalAdditionalIpAssignment("assign", new BaremetalAdditionalIpAssignmentArgs
    {
        AdditionalIpId = ip.Id.Apply(v => int.Parse(v)),
        MetalAccountId = server.Id.Apply(v => int.Parse(v)),
    });
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    var assignment = new BaremetalAdditionalIpAssignment("assign",
        BaremetalAdditionalIpAssignmentArgs.builder()
            .additionalIpId(ip.id().applyValue(Integer::parseInt))
            .metalAccountId(server.id().applyValue(Integer::parseInt))
            .build());
    ```
  </Tab>

  <Tab title="YAML">
    ```yaml theme={null}
    assignment:
      type: biznetgio:index:BaremetalAdditionalIpAssignment
      properties:
        additionalIpId: ${ip.id}
        metalAccountId: ${server.id}
    ```
  </Tab>
</Tabs>

| Input | Type | Required | Notes |
| - | - | - | - |
| `additionalIpId` | int64 | yes | from `BaremetalAdditionalIp` |
| `metalAccountId` | int64 | yes | target server |

Outputs: `status`, `raw` (secret). Composite id `<metalAccountId>:<additionalIpId>`; reassigning = replace.

## `biznetgio:index:BaremetalElasticStorage`

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    const storage = new biznetgio.BaremetalElasticStorage("volume", {
      productId: 20,
      cycle: "m",
      storageName: "metal-volume",
      metalAccountId: server.id.apply((id) => Number(id)),
      size: 100,   // grow-only
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    storage = pulumi_biznetgio.BaremetalElasticStorage(
        "volume",
        product_id=20,
        cycle="m",
        storage_name="metal-volume",
        metal_account_id=pulumi.Output.from_input(server.id).apply(int),
        size=100,   # grow-only
    )
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    storage, err := biznetgio.NewBaremetalElasticStorage(ctx, "volume", &biznetgio.BaremetalElasticStorageArgs{
        ProductId:       pulumi.Int(20),
        Cycle:           pulumi.String("m"),
        StorageName:     pulumi.String("metal-volume"),
        MetalAccountId:  server.ID().ToIntOutput(),
        Size:            pulumi.Int(100),
    })
    ```
  </Tab>

  <Tab title=".NET">
    ```csharp theme={null}
    var storage = new BaremetalElasticStorage("volume", new BaremetalElasticStorageArgs
    {
        ProductId = 20,
        Cycle = "m",
        StorageName = "metal-volume",
        MetalAccountId = server.Id.Apply(v => int.Parse(v)),
        Size = 100,
    });
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    var storage = new BaremetalElasticStorage("volume",
        BaremetalElasticStorageArgs.builder()
            .productId(20)
            .cycle("m")
            .storageName("metal-volume")
            .metalAccountId(server.id().applyValue(Integer::parseInt))
            .size(100)
            .build());
    ```
  </Tab>

  <Tab title="YAML">
    ```yaml theme={null}
    storage:
      type: biznetgio:index:BaremetalElasticStorage
      properties:
        productId: 20
        cycle: m
        storageName: metal-volume
        metalAccountId: ${server.id}
        size: 100
    ```
  </Tab>
</Tabs>

| Input | Type | Required | Notes |
| - | - | - | - |
| `productId` | int64 | yes | change triggers change-package |
| `cycle` | string | yes | `m` / `a`; see warning below |
| `storageName` | string | yes | |
| `metalAccountId` | int64 | yes | create-only - no re-attach endpoint |
| `size` | int64 | no | default `100` GB, grow-only |
| `promocode` | string | no | |
| `payWithCreditCard` | bool | no | default `true` |

Outputs: `status`, `createdAt`, `raw` (secret). Update: `size` → upgrade, `productId` → change-package.

<Warning>
  `cycle` is the one input `Update` never checks or sends to the API at all - unlike `productId` and `size`, a changed `cycle` is written into state as if it succeeded, with no API call and no error, and neither the change-package nor the upgrade request even has a cycle field to carry it. If you need a different billing cycle, destroy and recreate the resource.
</Warning>

## Functions

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

### `biznetgio:index:baremetalProducts`

No arguments. Returns `products`: `productId`, `name`, `description`, `raw` (secret).

### `biznetgio:index:baremetalRebuildOsList`

Argument `accountId` (int64). Returns `oss` (string\[]) and `raw` (secret) - valid values for `rebuildOs`.

### `biznetgio:index:baremetalOpenvpn`

No arguments. Returns `config` (secret) and `raw` (secret) - out-of-band OpenVPN access configuration.


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