/baremetals API group) plus add-onnya: additional (floating) IP dan NEO Elastic Storage.
Setiap create/upgrade bikin order berbayar beneran. Baca panduan billing buat nilai
cycle dan semantics payWithCreditCard.biznetgio:index:Baremetal
- TypeScript
- Python
- Go
- .NET
- Java
- YAML
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.keypairId,
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;
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=keypair.keypair_id,
label="neo-metal-main",
public_ip=1,
# power_state="off",
# reset_trigger="reboot-1",
# rebuild_os="centos7-base",
)
pulumi.export("serverStatus", server.status)
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
})
}
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.KeypairId,
Label = "neo-metal-main",
PublicIp = 1,
// PowerState = "off",
// ResetTrigger = "reboot-1",
// RebuildOs = "centos7-base",
});
return new Dictionary<string, object?>
{
["serverStatus"] = server.Status,
};
});
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.keypairId())
.label("neo-metal-main")
.publicIp(1)
// .powerState("off")
// .resetTrigger("reboot-1")
// .rebuildOs("centos7-base")
.build());
ctx.export("serverStatus", server.status());
}
}
resources:
server:
type: biznetgio:index:Baremetal
properties:
productId: ${products[0].productId}
cycle: m
selectOs: ubuntu-22
keypairId: ${keypair.keypairId}
label: neo-metal-main
publicIp: 1
# powerState: "off"
# resetTrigger: reboot-1
# rebuildOs: centos7-base
| Input | Type | Required | Notes |
|---|---|---|---|
productId | int64 | yes | dari baremetalProducts |
cycle | string | yes | m bulanan / a tahunan |
selectOs | string | no | default ubuntu-22; create-only |
keypairId | int64 | yes | dari BaremetalKeypair; create-only |
label | string | yes | nama tampilan - satu-satunya input yang bisa di-update |
publicIp | int64 | no | default 1; create-only |
promocode | string | no | create-only |
payWithCreditCard | bool | no | default true |
powerState | string | no | on / off; API dipanggil cuma pas berubah |
resetTrigger | string | no | one-shot reset; ganti value buat re-fire |
rebuildOs | string | no | rebuild (destructive); value valid dari baremetalRebuildOsList |
status, orderId, ipAddress, createdAt, raw (secret, di-redact). Import pake numeric account id.
biznetgio:index:BaremetalKeypair
- TypeScript
- Python
- Go
- .NET
- Java
- YAML
const keypair = new biznetgio.BaremetalKeypair("metal-key", {
name: "neo-metal-key",
publicKey: "ssh-rsa AAAAB3NzaC1yc2E...", // optional: import; omit to generate
});
keypair = pulumi_biznetgio.BaremetalKeypair(
"metal-key",
name="neo-metal-key",
public_key="ssh-rsa AAAAB3NzaC1yc2E...", # optional: import; omit to generate
)
keypair, err := biznetgio.NewBaremetalKeypair(ctx, "metal-key", &biznetgio.BaremetalKeypairArgs{
Name: pulumi.String("neo-metal-key"),
PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2E..."),
})
var keypair = new BaremetalKeypair("metal-key", new BaremetalKeypairArgs
{
Name = "neo-metal-key",
PublicKey = "ssh-rsa AAAAB3NzaC1yc2E...",
});
var keypair = new BaremetalKeypair("metal-key",
BaremetalKeypairArgs.builder()
.name("neo-metal-key")
.publicKey("ssh-rsa AAAAB3NzaC1yc2E...")
.build());
keypair:
type: biznetgio:index:BaremetalKeypair
properties:
name: neo-metal-key
publicKey: "ssh-rsa AAAAB3NzaC1yc2E..."
| Input | Type | Required | Notes |
|---|---|---|---|
name | string | yes | |
publicKey | string | no | di-set → di-import via endpoint import; kosong → digenerate server |
keypairId, privateKey (secret - cuma ada di response create, dipertahankan saat refresh), raw (secret). Gak ada update.
biznetgio:index:BaremetalAdditionalIp
- TypeScript
- Python
- Go
- .NET
- Java
- YAML
const ip = new biznetgio.BaremetalAdditionalIp("extra-ip", {
productId: 10,
cycle: "m",
region: "wjv-1",
});
ip = pulumi_biznetgio.BaremetalAdditionalIp(
"extra-ip",
product_id=10,
cycle="m",
region="wjv-1",
)
ip, err := biznetgio.NewBaremetalAdditionalIp(ctx, "extra-ip", &biznetgio.BaremetalAdditionalIpArgs{
ProductId: pulumi.Int(10),
Cycle: pulumi.String("m"),
Region: pulumi.String("wjv-1"),
})
var ip = new BaremetalAdditionalIp("extra-ip", new BaremetalAdditionalIpArgs
{
ProductId = 10,
Cycle = "m",
Region = "wjv-1",
});
var ip = new BaremetalAdditionalIp("extra-ip",
BaremetalAdditionalIpArgs.builder()
.productId(10)
.cycle("m")
.region("wjv-1")
.build());
ip:
type: biznetgio:index:BaremetalAdditionalIp
properties:
productId: 10
cycle: m
region: wjv-1
| Input | Type | Required | Notes |
|---|---|---|---|
productId | int64 | yes | dari GET /baremetal-additional-ips/products |
cycle | string | yes | m / a |
region | string | no | default wjv-1; dari GET /baremetal-additional-ips/regions |
promocode | string | no | |
payWithCreditCard | bool | no | default true |
status, ipAddress, createdAt, raw (secret). Gak ada update - perubahan input ganti resourcenya.
biznetgio:index:BaremetalAdditionalIpAssignment
- TypeScript
- Python
- Go
- .NET
- Java
- YAML
const assignment = new biznetgio.BaremetalAdditionalIpAssignment("assign", {
additionalIpId: ip.id,
metalAccountId: server.id,
});
assignment = pulumi_biznetgio.BaremetalAdditionalIpAssignment(
"assign",
additional_ip_id=ip.id,
metal_account_id=server.id,
)
assignment, err := biznetgio.NewBaremetalAdditionalIpAssignment(ctx, "assign", &biznetgio.BaremetalAdditionalIpAssignmentArgs{
AdditionalIpId: ip.ID(),
MetalAccountId: server.ID(),
})
var assignment = new BaremetalAdditionalIpAssignment("assign", new BaremetalAdditionalIpAssignmentArgs
{
AdditionalIpId = ip.Id,
MetalAccountId = server.Id,
});
var assignment = new BaremetalAdditionalIpAssignment("assign",
BaremetalAdditionalIpAssignmentArgs.builder()
.additionalIpId(ip.id())
.metalAccountId(server.id())
.build());
assignment:
type: biznetgio:index:BaremetalAdditionalIpAssignment
properties:
additionalIpId: ${ip.id}
metalAccountId: ${server.id}
| Input | Type | Required | Notes |
|---|---|---|---|
additionalIpId | int64 | yes | dari BaremetalAdditionalIp |
metalAccountId | int64 | yes | server target |
status, raw (secret). Composite id <metalAccountId>:<additionalIpId>; reassign = replace.
biznetgio:index:BaremetalElasticStorage
- TypeScript
- Python
- Go
- .NET
- Java
- YAML
const storage = new biznetgio.BaremetalElasticStorage("volume", {
productId: 20,
cycle: "m",
storageName: "metal-volume",
metalAccountId: server.id,
size: 100, // grow-only
});
storage = pulumi_biznetgio.BaremetalElasticStorage(
"volume",
product_id=20,
cycle="m",
storage_name="metal-volume",
metal_account_id=server.id,
size=100, # grow-only
)
storage, err := biznetgio.NewBaremetalElasticStorage(ctx, "volume", &biznetgio.BaremetalElasticStorageArgs{
ProductId: pulumi.Int(20),
Cycle: pulumi.String("m"),
StorageName: pulumi.String("metal-volume"),
MetalAccountId: server.ID(),
Size: pulumi.Int(100),
})
var storage = new BaremetalElasticStorage("volume", new BaremetalElasticStorageArgs
{
ProductId = 20,
Cycle = "m",
StorageName = "metal-volume",
MetalAccountId = server.Id,
Size = 100,
});
var storage = new BaremetalElasticStorage("volume",
BaremetalElasticStorageArgs.builder()
.productId(20)
.cycle("m")
.storageName("metal-volume")
.metalAccountId(server.id())
.size(100)
.build());
storage:
type: biznetgio:index:BaremetalElasticStorage
properties:
productId: 20
cycle: m
storageName: metal-volume
metalAccountId: ${server.id}
size: 100
| Input | Type | Required | Notes |
|---|---|---|---|
productId | int64 | yes | ganti = trigger change-package |
cycle | string | yes | m / a |
storageName | string | yes | |
metalAccountId | int64 | yes | create-only - gak ada endpoint re-attach |
size | int64 | no | default 100 GB, cuma bisa naik |
promocode | string | no | |
payWithCreditCard | bool | no | default true |
status, createdAt, raw (secret). Update: size → upgrade, productId → change-package.
Functions
biznetgio:index:baremetalProducts
Gak ada argument. Return products: productId, name, description, raw (secret).
biznetgio:index:baremetalRebuildOsList
Argument accountId (int64). Return oss (string[]) dan raw (secret) - value valid buat rebuildOs.
biznetgio:index:baremetalOpenvpn
Gak ada argument. Return config (secret) dan raw (secret) - konfigurasi akses OpenVPN out-of-band.