biznetgio (API group /neolites). Alur biasa ngerangkai function katalog ke create: neoliteProducts → neoliteOsList → NeoliteKeypair → NeoliteVm.
Setiap create/upgrade bikin order berbayar beneran. Baca panduan billing buat nilai
cycle dan semantics payWithCreditCard.biznetgio:index:NeoliteVm
- TypeScript
- Python
- Go
- .NET
- Java
- YAML
import * as biznetgio from "@shirasakaren/biznetgio";
const products = biznetgio.neoliteProductsOutput();
const osList = biznetgio.neoliteOsListOutput({
productId: products.products[0].productId,
});
const keypair = new biznetgio.NeoliteKeypair("demo-keypair", {
name: "neo-lite-key",
});
const vm = new biznetgio.NeoliteVm("demo-vm", {
vmName: "neo-lite-1",
productId: products.products[0].productId,
selectOs: osList.oss[0].name,
keypairId: keypair.keypairId,
cycle: "m",
sshAndConsoleUser: "adminuser",
consolePassword: "s3cretP4ssw0rd",
// optional in-place actions (change value to fire):
// powerState: "stop",
// rebuildOs: "ubuntu-22",
// migrateToPro: "12345", // neolite-pro product id
// diskSize: 100, // absolute GB target, grow-only
});
export const vmStatus = vm.status;
import pulumi
import pulumi_biznetgio
products = pulumi_biznetgio.neolite_products()
os_list = pulumi_biznetgio.neolite_os_list_output(
product_id=products.products[0].product_id,
)
keypair = pulumi_biznetgio.NeoliteKeypair(
"demo-keypair",
name="neo-lite-key",
)
vm = pulumi_biznetgio.NeoliteVm(
"demo-vm",
vm_name="neo-lite-1",
product_id=products.products[0].product_id,
select_os=os_list.oss[0].name,
keypair_id=keypair.keypair_id,
cycle="m",
ssh_and_console_user="adminuser",
console_password="s3cretP4ssw0rd",
# optional in-place actions (change value to fire):
# power_state="stop",
# rebuild_os="ubuntu-22",
# migrate_to_pro="12345", # neolite-pro product id
# disk_size=100, # absolute GB target, grow-only
)
pulumi.export("vmStatus", vm.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.NeoliteProducts(ctx, &biznetgio.NeoliteProductsArgs{})
if err != nil {
return err
}
osList, err := biznetgio.NeoliteOsList(ctx, &biznetgio.NeoliteOsListArgs{
ProductId: products.Products[0].ProductId,
})
if err != nil {
return err
}
keypair, err := biznetgio.NewNeoliteKeypair(ctx, "demo-keypair", &biznetgio.NeoliteKeypairArgs{
Name: pulumi.String("neo-lite-key"),
})
if err != nil {
return err
}
vm, err := biznetgio.NewNeoliteVm(ctx, "demo-vm", &biznetgio.NeoliteVmArgs{
VmName: pulumi.String("neo-lite-1"),
ProductId: pulumi.Int(products.Products[0].ProductId),
SelectOs: pulumi.String(osList.Oss[0].Name),
KeypairId: keypair.KeypairId,
Cycle: pulumi.String("m"),
SshAndConsoleUser: pulumi.String("adminuser"),
ConsolePassword: pulumi.String("s3cretP4ssw0rd"),
// optional in-place actions (change value to fire):
// PowerState: pulumi.String("stop"),
// RebuildOs: pulumi.String("ubuntu-22"),
// MigrateToPro: pulumi.String("12345"),
// DiskSize: pulumi.Int(100),
})
if err != nil {
return err
}
ctx.Export("vmStatus", vm.Status)
return nil
})
}
using System;
using System.Collections.Generic;
using Pulumi;
using Shirasakaren.Biznetgio;
return await Deployment.RunAsync(() =>
{
var products = NeoliteProducts.Invoke();
var osList = NeoliteOsList.Invoke(new NeoliteOsListInvokeArgs
{
ProductId = products.Apply(p => p.Products[0].ProductId),
});
var keypair = new NeoliteKeypair("demo-keypair", new NeoliteKeypairArgs
{
Name = "neo-lite-key",
});
var vm = new NeoliteVm("demo-vm", new NeoliteVmArgs
{
VmName = "neo-lite-1",
ProductId = products.Apply(p => p.Products[0].ProductId),
SelectOs = osList.Apply(o => o.Oss[0].Name),
KeypairId = keypair.KeypairId,
Cycle = "m",
SshAndConsoleUser = "adminuser",
ConsolePassword = "s3cretP4ssw0rd",
// optional in-place actions (change value to fire):
// PowerState = "stop",
// RebuildOs = "ubuntu-22",
// MigrateToPro = "12345",
// DiskSize = 100,
});
return new Dictionary<string, object?>
{
["vmStatus"] = vm.Status,
};
});
package demo;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import ren.shirasaka.biznetgio.*;
import ren.shirasaka.biznetgio.inputs.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
private static void stack(Context ctx) {
var products = BiznetgioFunctions.neoliteProducts();
var osList = BiznetgioFunctions.neoliteOsList(
NeoliteOsListArgs.builder()
.productId(products.applyValue(p -> p.products().get(0).productId()))
.build());
var keypair = new NeoliteKeypair("demo-keypair",
NeoliteKeypairArgs.builder()
.name("neo-lite-key")
.build());
var vm = new NeoliteVm("demo-vm",
NeoliteVmArgs.builder()
.vmName("neo-lite-1")
.productId(products.applyValue(p -> p.products().get(0).productId()))
.selectOs(osList.applyValue(o -> o.oss().get(0).name()))
.keypairId(keypair.keypairId())
.cycle("m")
.sshAndConsoleUser("adminuser")
.consolePassword("s3cretP4ssw0rd")
// optional in-place actions (change value to fire):
// .powerState("stop")
// .rebuildOs("ubuntu-22")
// .migrateToPro("12345")
// .diskSize(100)
.build());
ctx.export("vmStatus", vm.status());
}
}
resources:
vm:
type: biznetgio:index:NeoliteVm
properties:
vmName: neo-lite-1
productId: ${products[0].productId}
selectOs: ${osList[0].name}
keypairId: ${keypair.keypairId}
cycle: m
sshAndConsoleUser: adminuser
consolePassword: s3cretP4ssw0rd
# powerState: stop
# rebuildOs: ubuntu-22
# migrateToPro: "12345"
# diskSize: 100
| Input | Type | Required | Notes |
|---|---|---|---|
sshAndConsoleUser | string | yes | di-set pas create |
consolePassword | string, secret | yes | write-only: gak pernah di-fetch ulang dari API |
productId | int64 | yes | dari neoliteProducts; ganti = trigger change-package |
selectOs | string | yes | dari neoliteOsList; ganti OS = rebuild |
keypairId | int64 | yes | dari NeoliteKeypair; ganti = trigger change-keypair |
cycle | string | yes | m a q s b t p4 p5 |
vmName | string | no | default server-name; bisa di-update via change-vm-name |
description | string | no | default "" |
payWithCreditCard | bool | no | default true; false = invoice gak dibayar |
promocode | string | no | default "" |
powerState | string | no | start / stop / suspend / resume / shutdown; API dipanggil cuma pas berubah |
rebuildOs | string | no | one-shot reinstall OS (destructive) |
migrateToPro | string | no | one-shot migrasi; value = productId NEO Lite Pro |
diskSize | int64 | no | target GB absolut, cuma bisa naik |
orderId, status (Active/Pending/Suspended/Terminated), uptime, maxDisk, maxMem, mem, cpus, ciUser, ciPassword (secret), osName, region, regionLabel, nextDue, recurringAmount, billingcycle, productName, lastInvoice (id, paidId, status, date, duedate, paybefore, datepaid, invoiceType), raw (secret, di-redact).
Import pake pulumi import biznetgio:index:NeoliteVm demo-vm <account_id>.
biznetgio:index:NeoliteKeypair
- TypeScript
- Python
- Go
- .NET
- Java
- YAML
const keypair = new biznetgio.NeoliteKeypair("demo-keypair", {
name: "neo-lite-key",
});
export const privateKey = keypair.privateKey;
keypair = pulumi_biznetgio.NeoliteKeypair(
"demo-keypair",
name="neo-lite-key",
)
pulumi.export("privateKey", keypair.private_key)
keypair, err := biznetgio.NewNeoliteKeypair(ctx, "demo-keypair", &biznetgio.NeoliteKeypairArgs{
Name: pulumi.String("neo-lite-key"),
})
ctx.Export("privateKey", keypair.PrivateKey)
var keypair = new NeoliteKeypair("demo-keypair", new NeoliteKeypairArgs
{
Name = "neo-lite-key",
});
// keypair.PrivateKey
var keypair = new NeoliteKeypair("demo-keypair",
NeoliteKeypairArgs.builder()
.name("neo-lite-key")
.build());
ctx.export("privateKey", keypair.privateKey());
keypair:
type: biznetgio:index:NeoliteKeypair
properties:
name: neo-lite-key
| Input | Type | Required | Notes |
|---|---|---|---|
name | string | yes | nama keypair |
keypairId, publicKey, privateKey (secret - digenerate server-side, return sekali pas create, dipertahankan saat refresh). Gak ada update. Keypair itu per-service: keypair NEO Lite gak bisa dipake di Pro/Metal/GPU.
biznetgio:index:NeoliteSnapshot
- TypeScript
- Python
- Go
- .NET
- Java
- YAML
const snapshot = new biznetgio.NeoliteSnapshot("pre-upgrade", {
neoliteAccountId: vm.id.apply((id) => Number(id)),
name: "snapshot-1",
description: "before upgrade",
cycle: "m",
});
snapshot = pulumi_biznetgio.NeoliteSnapshot(
"pre-upgrade",
neolite_account_id=pulumi.Output.from_input(vm.id).apply(int),
name="snapshot-1",
description="before upgrade",
cycle="m",
)
snapshot, err := biznetgio.NewNeoliteSnapshot(ctx, "pre-upgrade", &biznetgio.NeoliteSnapshotArgs{
NeoliteAccountId: vm.ID().ToIntOutput(),
Name: pulumi.String("snapshot-1"),
Description: pulumi.String("before upgrade"),
Cycle: pulumi.String("m"),
})
var snapshot = new NeoliteSnapshot("pre-upgrade", new NeoliteSnapshotArgs
{
NeoliteAccountId = vm.Id.Apply(v => int.Parse(v)),
Name = "snapshot-1",
Description = "before upgrade",
Cycle = "m",
});
var snapshot = new NeoliteSnapshot("pre-upgrade",
NeoliteSnapshotArgs.builder()
.neoliteAccountId(vm.id().applyValue(Integer::parseInt))
.name("snapshot-1")
.description("before upgrade")
.cycle("m")
.build());
snapshot:
type: biznetgio:index:NeoliteSnapshot
properties:
neoliteAccountId: ${fn::toNumber(vm.id)}
name: snapshot-1
description: before upgrade
cycle: m
| Input | Type | Required | Notes |
|---|---|---|---|
neoliteAccountId | int64 | yes | VM yang di-snapshot |
cycle | string | yes | m a q s b t p4 p5 |
name | string | no | default snapshot-name |
description | string | no | default "" |
payWithCreditCard | bool | no | default true |
promocode | string | no | default "" |
orderId, status. Gak ada update - perubahan input apa pun ganti snapshotnya.
biznetgio:index:NeoliteVmFromSnapshot
- TypeScript
- Python
- Go
- .NET
- Java
- YAML
const restored = new biznetgio.NeoliteVmFromSnapshot("restored", {
snapshotId: snapshot.id.apply((id) => Number(id)),
productId: products.products[0].productId,
cycle: "m",
keypairId: keypair.keypairId,
name: "restored-1",
sshAndConsoleUser: "adminuser",
consolePassword: "s3cretP4ssw0rd",
});
restored = pulumi_biznetgio.NeoliteVmFromSnapshot(
"restored",
snapshot_id=pulumi.Output.from_input(snapshot.id).apply(int),
product_id=products.products[0].product_id,
cycle="m",
keypair_id=keypair.keypair_id,
name="restored-1",
ssh_and_console_user="adminuser",
console_password="s3cretP4ssw0rd",
)
restored, err := biznetgio.NewNeoliteVmFromSnapshot(ctx, "restored", &biznetgio.NeoliteVmFromSnapshotArgs{
SnapshotId: snapshot.ID().ToIntOutput(),
ProductId: pulumi.Int(products.Products[0].ProductId),
Cycle: pulumi.String("m"),
KeypairId: keypair.KeypairId,
Name: pulumi.String("restored-1"),
SshAndConsoleUser: pulumi.String("adminuser"),
ConsolePassword: pulumi.String("s3cretP4ssw0rd"),
})
var restored = new NeoliteVmFromSnapshot("restored", new NeoliteVmFromSnapshotArgs
{
SnapshotId = snapshot.Id.Apply(v => int.Parse(v)),
ProductId = products.Apply(p => p.Products[0].ProductId),
Cycle = "m",
KeypairId = keypair.KeypairId,
Name = "restored-1",
SshAndConsoleUser = "adminuser",
ConsolePassword = "s3cretP4ssw0rd",
});
var restored = new NeoliteVmFromSnapshot("restored",
NeoliteVmFromSnapshotArgs.builder()
.snapshotId(snapshot.id().applyValue(Integer::parseInt))
.productId(products.applyValue(p -> p.products().get(0).productId()))
.cycle("m")
.keypairId(keypair.keypairId())
.name("restored-1")
.sshAndConsoleUser("adminuser")
.consolePassword("s3cretP4ssw0rd")
.build());
restored:
type: biznetgio:index:NeoliteVmFromSnapshot
properties:
snapshotId: ${fn::toNumber(snapshot.id)}
productId: ${products[0].productId}
cycle: m
keypairId: ${keypair.keypairId}
name: restored-1
sshAndConsoleUser: adminuser
consolePassword: s3cretP4ssw0rd
| Input | Type | Required | Notes |
|---|---|---|---|
snapshotId | int64 | yes | dari NeoliteSnapshot |
productId | int64 | yes | |
cycle | string | yes | |
keypairId | int64 | yes | |
name | string | yes | |
sshAndConsoleUser | string | yes | |
consolePassword | string, secret | yes | |
description | string | no | default "" |
promocode | string | no | default "" |
payWithCreditCard | bool | no | default true |
orderId, status. Hapus resource ini = hapus VM hasil restore - bukan snapshotnya. Gak ada update.
biznetgio:index:NeoliteDisk
- TypeScript
- Python
- Go
- .NET
- Java
- YAML
const disk = new biznetgio.NeoliteDisk("extra", {
productId: 60,
cycle: "m",
neoliteAccountId: vm.id.apply((id) => Number(id)),
serviceName: "extra-disk",
size: 60, // grow-only; upgrades send the increment
});
disk = pulumi_biznetgio.NeoliteDisk(
"extra",
product_id=60,
cycle="m",
neolite_account_id=pulumi.Output.from_input(vm.id).apply(int),
service_name="extra-disk",
size=60, # grow-only; upgrades send the increment
)
disk, err := biznetgio.NewNeoliteDisk(ctx, "extra", &biznetgio.NeoliteDiskArgs{
ProductId: pulumi.Int(60),
Cycle: pulumi.String("m"),
NeoliteAccountId: vm.ID().ToIntOutput(),
ServiceName: pulumi.String("extra-disk"),
Size: pulumi.Int(60),
})
var disk = new NeoliteDisk("extra", new NeoliteDiskArgs
{
ProductId = 60,
Cycle = "m",
NeoliteAccountId = vm.Id.Apply(v => int.Parse(v)),
ServiceName = "extra-disk",
Size = 60,
});
var disk = new NeoliteDisk("extra",
NeoliteDiskArgs.builder()
.productId(60)
.cycle("m")
.neoliteAccountId(vm.id().applyValue(Integer::parseInt))
.serviceName("extra-disk")
.size(60)
.build());
disk:
type: biznetgio:index:NeoliteDisk
properties:
productId: 60
cycle: m
neoliteAccountId: ${fn::toNumber(vm.id)}
serviceName: extra-disk
size: 60
| Input | Type | Required | Notes |
|---|---|---|---|
productId | int64 | yes | dari /neolites/disks/products; liat warning di bawah |
cycle | string | yes | liat warning di bawah |
neoliteAccountId | int64 | yes | VM target |
serviceName | string | no | default service-name |
size | int64 | no | default 60 GB, cuma bisa naik |
promocode | string | no | |
payWithCreditCard | bool | no | default true |
orderId, status, raw (secret). Update cuma upgrade size - API nerima increment (newSize - oldSize), bukan target absolut; ngecilin error.
productId dan cycle gak punya tag replaceOnChanges. Kalau lu ganti salah satunya tanpa ganti size juga, Update bakal buang perubahannya dan nulis balik value yang lama ke state, jadi pulumi preview berikutnya nunjukin diff yang sama lagi - gak pernah keselesein dan gak pernah error. Terraform equivalent-nya (biznetgio_neolite_disk) bener nge-mark keduanya RequiresReplace(). Kalau lu butuh disk product atau cycle beda di Pulumi, destroy dan recreate resource-nya.Functions
Buat harga beneran dan cara milih paket tertentu, bukan asal percaya
[0], liat halaman Katalog Produk.biznetgio:index:neoliteProducts
Gak ada argument. Return products: productId, name, description, categoryId, categoryName, options (type, cores, memory, allowDowngrade), billing (label, cycle, price, components dengan prices per-quantity).
biznetgio:index:neoliteOsList
Argument productId (int64). Return oss: vmid, node, name (pake buat selectOs), maxmem, maxcpu.
- TypeScript
- Python
- Go
- .NET
- Java
- YAML
const products = biznetgio.neoliteProductsOutput();
const osList = biznetgio.neoliteOsListOutput({
productId: products.products[0].productId,
});
products = pulumi_biznetgio.neolite_products()
os_list = pulumi_biznetgio.neolite_os_list_output(
product_id=products.products[0].product_id,
)
products, _ := biznetgio.NeoliteProducts(ctx, &biznetgio.NeoliteProductsArgs{})
osList, _ := biznetgio.NeoliteOsList(ctx, &biznetgio.NeoliteOsListArgs{
ProductId: products.Products[0].ProductId,
})
var products = NeoliteProducts.Invoke();
var osList = NeoliteOsList.Invoke(new NeoliteOsListInvokeArgs
{
ProductId = products.Apply(p => p.Products[0].ProductId),
});
var products = BiznetgioFunctions.neoliteProducts();
var osList = BiznetgioFunctions.neoliteOsList(
NeoliteOsListArgs.builder()
.productId(products.applyValue(p -> p.products().get(0).productId()))
.build());
variables:
products:
fn::invoke:
function: biznetgio:index:neoliteProducts
return: products
osList:
fn::invoke:
function: biznetgio:index:neoliteOsList
arguments:
productId: ${products[0].productId}
return: oss
biznetgio:index:neoliteChangePackageOptions
Argument accountId. Return raw (secret) - response upstream belum ke-model dan di-export sebagai JSON.
biznetgio:index:neoliteStorageUpgradeOptions
Argument accountId. Return raw (secret).
biznetgio:index:neoliteIPAvailability
Argument productId. Return available (bool).