# About the author
Source: https://biznetgio.creations.ren/about
Shirasaka Ren - the developer behind the unofficial Biznet GIO providers
Shirasaka Ren (白坂れん) · she/her · JST (UTC+09:00)
Both providers and this documentation are built and maintained by **Shirasaka Ren** - a solo, community effort. They are unofficial and not affiliated with or endorsed by PT Biznet Gio Nusantara.
## Who maintains this
Shirasaka Ren is an infrastructure engineer working across DevOps, Security, Cloud, and Servers. Her motto: *"Infrastructure that stays boring, on purpose"* - her favorite compliment is silence: no incidents, no surprises, no 3AM pages.
She started her career in October 2022 and works on clusters, pipelines, and the boring-on-purpose infrastructure underneath them - across startups, research labs, and data centres. In her words: *"I keep the lights on."*
The Biznet GIO providers come from her own IaC practice: automating NEO Lite VPS fleets, NEO Metal bare-metal, NEO GPU rentals, and NEO Object Storage with Terraform and Pulumi.
## Contact
| | |
| ----------------- | ---------------------------------------------------------- |
| Website | [shirasaka.ren](https://shirasaka.ren) |
| Works & portfolio | [creations.ren](https://creations.ren) |
| Publications | [publications.ren](https://publications.ren) |
| GitHub | [github.com/shirasakaren](https://github.com/shirasakaren) |
| Email | [ren@shirasaka.ren](mailto:ren@shirasaka.ren) |
## Support the work
These providers are maintained in free time. If they save you time or money, consider supporting:
| | |
| ------- | ------------------------------------------------------------ |
| Donate | [donate.ren](https://donate.ren) |
| Patreon | [patreon.com/shirasakaren](https://patreon.com/shirasakaren) |
Issues, pull requests, and bug reports are just as welcome as sponsorship:
* [terraform-provider-biznetgio](https://github.com/shirasakaren/terraform-provider-biznetgio)
* [pulumi-biznetgio](https://github.com/shirasakaren/pulumi-biznetgio)
* [biznetgio-docs](https://github.com/shirasakaren/biznetgio-docs)
よろしくおねがいします〜
# Authentication
Source: https://biznetgio.creations.ren/authentication
API tokens, environment variables, and base URLs for both providers
Both providers authenticate against the Biznet GIO Portal API with a single API token. There is no username/password flow, and each product group uses the same token.
## Get an API token
1. Log in to the [customer portal](https://portal.biznetgio.com).
2. Open the **Generate API Key** menu (under your account/profile section).
3. Generate a key and copy it immediately - it is shown only once. If you lose it, contact [support](mailto:support@biznetgio.com) to regenerate.
The token is sent on every request as the `x-token` header.
## Configuration
### Terraform
| Setting | Type | Default | Environment variable |
| ---------- | ----------------- | ------------------------------------- | -------------------- |
| `api_key` | string, sensitive | - | `BIZNETGIO_API_KEY` |
| `base_url` | string | `https://api.portal.biznetgio.com/v1` | `BIZNETGIO_BASE_URL` |
| `timeout` | number (seconds) | `30` | - |
Values set in the provider block take precedence over environment variables. If `api_key` is missing everywhere, configuration fails with an error.
```hcl theme={null}
provider "biznetgio" {
api_key = "your-token" # or: BIZNETGIO_API_KEY
base_url = "https://api.portal.biznetgio.com/v1" # or: BIZNETGIO_BASE_URL
timeout = 60
}
```
The provider works with no `provider` block at all - export the environment variables and use `provider "biznetgio" {}`.
### Pulumi
| Config key | Type | Required | Default | Environment variable |
| -------------------- | -------------- | -------- | ------------------------------------- | -------------------- |
| `biznetgio:apiToken` | string, secret | yes | - | `BIZNETGIO_API_KEY` |
| `biznetgio:baseUrl` | string | no | `https://api.portal.biznetgio.com/v1` | `BIZNETGIO_BASE_URL` |
```bash theme={null}
pulumi config set --secret biznetgio:apiToken
```
The provider errors if `apiToken` is not set via config or environment.
```ts TypeScript theme={null}
import * as biznetgio from "@shirasakaren/biznetgio";
const token = biznetgio.config.apiToken;
const baseUrl = biznetgio.config.baseUrl;
```
```python Python theme={null}
import pulumi_biznetgio as biznetgio
token = biznetgio.config.api_token
base_url = biznetgio.config.base_url
```
```go Go theme={null}
import bngcfg "github.com/shirasakaren/pulumi-biznetgio/sdk/go/pulumi-biznetgio/config"
token := bngcfg.GetApiToken(ctx)
baseURL := bngcfg.GetBaseUrl(ctx)
```
```csharp .NET theme={null}
var cfg = new Pulumi.Config("biznetgio");
var token = cfg.RequireSecret("apiToken");
var baseUrl = cfg.Get("baseUrl");
```
```java Java theme={null}
var cfg = ctx.config();
var token = cfg.requireSecret("biznetgio:apiToken");
var baseUrl = cfg.get("biznetgio:baseUrl");
```
## Base URLs
| Environment | Base URL |
| ----------- | ------------------------------------- |
| Production | `https://api.portal.biznetgio.com/v1` |
| Staging | `https://api.portal.biznetgio.dev/v1` |
Production is the default when `base_url` / `baseUrl` is omitted. Point the providers at staging by setting it explicitly, e.g. `export BIZNETGIO_BASE_URL="https://api.portal.biznetgio.dev/v1"`.
## Keep your token secret
* `api_key` and `apiToken` are marked sensitive; they never appear in plans, diffs, or outputs.
* The `raw` output on every resource is redacted: values under keys like `password`, `private_key`, `secret_key`, `token`, and `pem` are masked as `***` before entering state.
* Secrets that the API returns only once (keypair private keys, S3 secret keys) are preserved in state across refreshes - protect your state files with a secure backend.
The token grants full control of your account. Never commit it to version control; use a secret manager (Terraform Cloud variables, Pulumi ESC, SOPS, Vault) for CI/CD.
# Complete code walkthrough
Source: https://biznetgio.creations.ren/contribute/code-walkthrough
Every file, resource, and pattern in both example repos, explained fully and technically
This is the exhaustive technical reference for the two example repos. The [Terraform repo guide](/contribute/terraform-guide) and [Pulumi repo guide](/contribute/pulumi-guide) teach the concepts and the why; this page documents the what, completely. Every source file in both repos is explained here or listed in the file index at the end. Nothing is skipped on purpose.
Before you start: the repos use the [Conventions](/contribute/conventions) (bilingual comments, cost safety, version pinning), the structure is mapped in [How the repos are organized](/contribute/repositories), and the CI workflows are dissected in [Pipelines](/contribute/pipelines).
## Part 1: the Terraform repo
One folder per product line, each an independent Terraform root module. The provider is pinned to `0.1.0` and `required_version` is `>= 1.0` in every folder.
### 1.1 The five-file anatomy
Every folder contains the same five files. Their semantics, exactly:
`versions.tf`
```hcl theme={null}
terraform {
required_version = ">= 1.0"
required_providers {
biznetgio = {
source = "registry.terraform.io/shirasakaren/biznetgio"
version = "0.1.0"
}
}
}
provider "biznetgio" {}
```
* `required_version` is the minimum Terraform CLI version. The provider itself uses the Terraform Plugin Framework.
* `required_providers` maps the local name `biznetgio` to a registry address and pins the version. `terraform init` downloads exactly `0.1.0` from the [Terraform Registry](https://registry.terraform.io/providers/shirasakaren/biznetgio).
* The empty `provider "biznetgio"` block configures the provider with zero inline arguments. The provider reads the `BIZNETGIO_API_KEY` environment variable itself, which is why no token ever appears in a file.
`variables.tf`
Declares every input with types and defaults. The three recurring variables across folders:
* `ssh_and_console_user`: string, default `"adminuser"` (or `"root"` in `gpu/`). The comments note the API rule: 6 to 32 characters, letters, numbers, dash, dot only.
* `console_password`: string, `sensitive = true`, deliberately no default. The only ways in are `TF_VAR_console_password` or the gitignored `terraform.tfvars`. This exists in `neolite/`, `neolite-pro/`, `gpu/`, and `complete/`; `baremetal/` and `object-storage/` authenticate with a keypair only and have no such variable.
* `pay_with_credit_card`: bool, default `false`. `false` still creates the real resource, it just leaves the invoice unpaid in the portal. See [Billing and orders](/guides/billing).
`terraform.tfvars.example`
A committed template of real values. The `.gitignore` ignores `*.tfvars` but re-includes `*.tfvars.example`, so the template is committed and the filled-in copy never is. The example file contains a placeholder password only.
`main.tf`
The declarations themselves. Two kinds of declarations appear:
* `data` blocks are read-only lookups. `data "biznetgio_neolite_products" "all" {}` queries the API for the current catalog; the result is referenced as `data.biznetgio_neolite_products.all.products[0].product_id`.
* `resource` blocks create and manage things. References between them, like `keypair_id = biznetgio_neolite_keypair.main.keypair_id`, are what Terraform turns into a dependency graph and an API call order.
* `locals` blocks compute values once, like picking `products[0]` for the demo.
`outputs.tf`
Publishes values after apply. Sensitive outputs (`keypair_private_key`, `secret_key`, `console_url`, `openvpn_config`) are marked `sensitive = true` so they render masked in the console and in JSON output.
### 1.2 neolite/: the full NEO Lite story
Five resources and five data sources, wired in the order you would actually use them:
| Declaration | Kind | References | Purpose |
| ------------------------------------------------------------- | -------- | --------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `data.biznetgio_neolite_products.all` | data | none | every NEO Lite package on sale, first one picked via `locals` |
| `data.biznetgio_neolite_os_list.ubuntu` | data | `product_id` | valid OS images for that product; the VM's `select_os` comes from here |
| `data.biznetgio_neolite_ip_availability.check` | data | `product_id` | whether a public IP is orderable right now |
| `resource.biznetgio_neolite_keypair.main` | resource | none | SSH keypair generated server side; `private_key` returned once at create time |
| `resource.biznetgio_neolite_vm.main` | resource | product, OS list, keypair | the VM order; `vm_name = "neolite-example"`, `cycle = "m"` |
| `resource.biznetgio_neolite_disk.extra` | resource | `neolite_account_id = biznetgio_neolite_vm.main.id` | extra disk, `product_id = 60`, `service_name = "extra-disk"`, 60 GB minimum, grow-only |
| `resource.biznetgio_neolite_snapshot.main` | resource | `neolite_account_id` | a paid snapshot, `cycle = "m"` |
| `resource.biznetgio_neolite_vm_from_snapshot.restored` | resource | `snapshot_id`, product, keypair | restores the snapshot into a second VM with its own bill |
| `data.biznetgio_neolite_change_package_options.opts` | data | `account_id` | raw unmodeled JSON pricing, exposed as a sensitive output |
| `data.biznetgio_neolite_storage_upgrade_options.storage_opts` | data | `account_id` | same, for storage upgrades |
The dependency chain reads as: products → os\_list → keypair → vm → disk, snapshot → restore. The `snapshot_id` reference is what guarantees the snapshot exists before the restore is ordered.
Commented-out VM options, each fired only when its value changes: `power_state` (start/stop/suspend/resume/shutdown), `rebuild_os` (wipes the disk and reinstalls), `migrate_to_pro` (one-way move to a NEO Lite Pro product id), `disk_size` (grow-only absolute target).
Outputs: `ip_available`, `vm_status`, `vm_id` (documented as the value for `terraform import`), `keypair_private_key` (sensitive), `restored_vm_status`, `change_package_options_raw` (sensitive), `storage_upgrade_options_raw` (sensitive).
### 1.3 neolite-pro/: same shape, dedicated tier
Four resources and five data sources. Identical wiring to NEO Lite with these exact differences:
* No `biznetgio_neolite_pro_vm_from_snapshot` exists. Pro snapshots restore only through the portal today; the file's banner says so.
* `biznetgio_neolite_pro_disk.extra` has a 30 GB minimum instead of 60 GB, `service_name = "pro-extra-disk"`, same `product_id = 60`.
* `vm_name = "pro-example"` (the shorter name also fits the 6 to 16 character limit).
* Migration into Pro comes from the Lite side via `migrate_to_pro` on the `neolite/` example.
* Outputs are the same set minus `restored_vm_status`.
`variables.tf` reuses the same three variables and says so in a comment, pointing at `neolite/variables.tf` for the full explanation.
### 1.4 baremetal/: dedicated hardware
Five resources and three data sources, keypair-only authentication (no console password anywhere in the folder; `variables.tf` has only `pay_with_credit_card`):
| Declaration | References | Purpose |
| ------------------------------------------------------------ | --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `data.biznetgio_baremetal_products.all` | none | catalog; first product picked |
| `resource.biznetgio_baremetal_keypair.main` | none | server keypair; leave `public_key` unset for server-side generation, or set it to import your own key |
| `resource.biznetgio_baremetal.main` | product, OS, keypair | the server; `select_os = "ubuntu-22"`, `label = "baremetal-example"`, `public_ip = 1` bundles one public IP with the order |
| `data.biznetgio_baremetal_rebuild_os_list.ubuntu` | `account_id = biznetgio_baremetal.main.id` | valid OS images for rebuilding this specific server, resolvable only after the server exists |
| `data.biznetgio_baremetal_openvpn.vpn` | none | out-of-band OpenVPN access config |
| `resource.biznetgio_baremetal_additional_ip.extra` | none | a second, independent floating IP: `product_id = 10`, `region = "wjv-1"` |
| `resource.biznetgio_baremetal_additional_ip_assignment.main` | `additional_ip_id`, `metal_account_id` | attaches the extra IP to the server; reassigning means replacing this resource |
| `resource.biznetgio_baremetal_elastic_storage.main` | `metal_account_id`, `product_id = 20`, `size = 100` | storage volume permanently bound to the server from creation, no re-attach endpoint |
Commented-out server options: `power_state` (on/off), `reset_trigger` (one-shot reboot, change the string to re-fire), `rebuild_os` (wipes the disk; valid values from the rebuild OS list data source above).
Outputs: `server_status`, `server_ip_address`, `keypair_private_key` (sensitive), `valid_rebuild_os_images`, `additional_ip_address`, `elastic_storage_status`, `openvpn_config` (sensitive).
### 1.5 gpu/: the two quirks, concretely
Two resources and three data sources. `variables.tf` sets `ssh_and_console_user` to `"root"` (the GPU images use root).
```hcl theme={null}
resource "biznetgio_gpu_keypair" "main" {
name = "gpu-example-key"
}
resource "biznetgio_gpu_instance" "main" {
product_id = local.gpu_product_id
select_os = "ubuntu-22"
keypair_id = biznetgio_gpu_keypair.main.id
service_name = "gpu-example"
ssh_and_console_user = var.ssh_and_console_user
console_password = var.console_password
pay_with_credit_card = var.pay_with_credit_card
subscription = {
cycle = "m"
}
}
```
The two quirks, exactly as the file comments them:
* `biznetgio_gpu_keypair` exports no `keypair_id` attribute. It exports `id` (which already is the keypair id), `public_key`, and `private_key`. The instance references `.id`.
* `subscription` and `on_demand` are object-typed attributes, not blocks. They are assigned with `=` and exactly one of the two must be set; Terraform rejects a plan with neither or both. The commented-out `on_demand` form is `on_demand = { additional_hours = 0 }` and bills hourly. Two one-shot triggers are commented out: `rebuild_trigger` (wipes the disk) and `reserve_additional_hours_trigger`.
Data sources: `data.biznetgio_gpu_console.console` is side-effecting (every read mints a brand-new one-time console session; safe in `terraform output`, never reference it from anything evaluated during plan diffing) and `data.biznetgio_gpu_graph.graph` with `timeframe = "hour"`.
Outputs: `gpu_status`, `keypair_private_key` (sensitive), `console_url` (sensitive), `monitoring_graph`.
### 1.6 object-storage/: S3-compatible storage
Four resources and three data sources, no keypair and no password; `variables.tf` has only `pay_with_credit_card`:
| Declaration | References | Purpose |
| --------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `resource.biznetgio_object_storage.main` | none | the subscription, the S3 tenant: `product_id = 8`, `label = "example"`, `quota = 10` (grow-only afterwards) |
| `resource.biznetgio_object_storage_bucket.assets` | `account_id` | one bucket, `acl = "public-read"`; only `acl` is mutable after creation |
| `resource.biznetgio_object_storage_credential.main` | `account_id` | an S3 access/secret key pair; `active = true`; the secret key is returned once, at create time |
| `resource.biznetgio_object_storage_object.index` | `account_id`, `bucket`, `source = "${path.module}/index.html"` | uploads the folder's `index.html` through the control-plane API, `key = "index.html"`, `acl = "public-read"` |
| `data.biznetgio_object_storage_instances.active` | `status = "Active"` | every instance on the account, filtered to active |
| `data.biznetgio_object_storage_buckets.all` | `account_id` | every bucket in the subscription |
| `data.biznetgio_object_storage_credentials.all` | `account_id` | every credential in the subscription |
The upload resource's comment sets the boundary: the control-plane upload is fine for one small file; anything bigger or bulk should use real S3 tooling (aws-cli, rclone) with the credential, pointed at `nos..neo.id`.
Outputs: `storage_status`, `bucket_name`, `access_key` (sensitive), `secret_key` (sensitive), `active_instances` (sensitive because each item carries a redacted `raw` JSON field, and Terraform treats anything containing a sensitive value as sensitive as a whole).
### 1.7 complete/: the module
The root `main.tf` does catalog lookups then one module call with ten arguments; `variables.tf` at the root only forwards `console_password` and `pay_with_credit_card`; root `outputs.tf` passes through every module output.
Inside `modules/app-stack/`:
* `main.tf` declares five resources: `biznetgio_neolite_pro_keypair.this` (named `"${var.name}-key"`), `biznetgio_neolite_pro_vm.this` (`vm_name = var.name`), `biznetgio_object_storage.this`, `biznetgio_object_storage_bucket.this` (`"${var.name}-assets"`, `acl = "private"`), and `biznetgio_object_storage_credential.this`. All references use the module's own resources, so the module is fully self-contained.
* `variables.tf` declares ten inputs: `name` (VM name and prefix for bucket and credential, 6 to 16 characters), `storage_label` (separate on purpose because the storage label has its own 6 to 16 character limit), `vm_product_id`, `select_os`, `storage_product_id`, `cycle` (default `"m"`), `ssh_and_console_user` (default `"adminuser"`), `console_password` (sensitive, no default), `pay_with_credit_card` (default `false`), `storage_quota` (default `10`).
* `outputs.tf` exports `vm_status`, `bucket_name`, `access_key` (sensitive), `secret_key` (sensitive), `keypair_private_key` (sensitive). The comment on the sensitive ones says the module caller owns the responsibility of saving them.
* Its own `terraform { required_providers { biznetgio = { source = "registry.terraform.io/shirasakaren/biznetgio" } } }` block. Without it, Terraform assumes the default `hashicorp/*` namespace for providers referenced inside a child module and fails with a missing provider error. Any module copied out of this repo must keep that block.
### 1.8 The workflow
`.github/workflows/ci.yml` runs `terraform fmt -check`, `terraform init`, and `terraform validate` unconditionally per selected folder, then conditionally `plan`, `apply`, or `destroy` with `BIZNETGIO_API_KEY` and `TF_VAR_console_password` secrets. The full line-by-line explanation lives in [Pipelines](/contribute/pipelines).
## Part 2: the Pulumi repo
Six examples, each written in six languages. Every folder is an independent Pulumi project with its own `Pulumi.yaml`.
### 2.1 Project anatomy per language
`Pulumi.yaml` in every folder:
```yaml theme={null}
name: biznetgio-example-neolite
runtime: nodejs
description: NEO Lite walkthrough - every resource and data source this service has
```
`name` is unique per folder, `runtime` selects the language engine (`nodejs`, `python`, `go`, `dotnet`, `java`, or `yaml`). Around it, each language contributes:
| Language | Dependency file | Pinned versions | Other files |
| ---------- | ------------------ | ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| TypeScript | `package.json` | `@pulumi/pulumi ^3.142.0`, `@shirasakaren/biznetgio ^0.1.7`, dev: `typescript ^5`, `@types/node ^20` | `index.ts`, `tsconfig.json` (strict, es2020, commonjs, noEmit), `package-lock.json` |
| Python | `requirements.txt` | `pulumi>=3.231.0,<4.0.0`, `pulumi-biznetgio>=0.1.7` | `__main__.py` |
| Go | `go.mod` | `go 1.25.11`, `pulumi/sdk/v3 v3.256.0`, `pulumi-biznetgio v0.1.7` | `main.go`, `go.sum` |
| .NET | `.csproj` | `Pulumi 3.*`, `Shirasakaren.Biznetgio 0.1.7`, `net8.0` | `Program.cs` |
| Java | `pom.xml` | `com.pulumi:pulumi:1.0.0`, `ren.shirasaka:biznetgio:0.1.7`, Java 17 | `src/main/java/demo/App.java` |
| YAML | none | the CLI resolves the provider | only `Pulumi.yaml` |
The csproj filename matches the `name` in `Pulumi.yaml` (for example `biznetgio-example-gpu.csproj`). The `.gitignore` excludes `node_modules/`, `__pycache__/`, `venv/`, `bin/`, `obj/`, `target/`, `*.class`, and `Pulumi.*.yaml` with `!Pulumi.yaml` re-included, so stack state and secrets stay out of git.
### 2.2 The shared program model
Every program does the same five things, in the same order:
1. **Config.** Read the stack settings. `consolePassword` is required and secret (`config.requireSecret("consolePassword")`, `cfg.RequireSecret(...)`, `config.require_secret(...)`); `payWithCreditCard` is optional boolean defaulting to false. Set them with `pulumi config set --secret consolePassword `.
2. **Catalog lookups.** Invoke the product catalog, then the OS list for the first product, sometimes IP availability. Functions are read-only API calls.
3. **Resources.** Create the keypair, the VM, and everything else. Passing one resource's output into another's input is what builds the dependency graph.
4. **Outputs.** Export the values you care about.
5. **Run.** Each language has its own entry mechanism: TypeScript and Python run top-level; Go wraps everything in `pulumi.Run(func(ctx *pulumi.Context) error {...})` with `(value, error)` returns on every call; .NET uses top-level statements returning `await Deployment.RunAsync(() => {...})` and exports via a returned `Dictionary`; Java wraps in `Pulumi.run(App::stack)` with `ctx.export(...)` calls; YAML declares `configuration`, `variables`, `resources`, and `outputs` sections instead of code.
The naming per language for the same concepts:
| Concept | TypeScript | Python | Go | .NET | Java | YAML |
| -------------------- | -------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| NEO Lite VM | `new biznetgio.NeoliteVm(n, {vmName})` | `biznetgio.NeoliteVm(n, vm_name=...)` | `biznetgio.NewNeoliteVm(ctx, n, &Args{VmName})` | `new NeoliteVm(n, new NeoliteVmArgs { VmName })` | `new NeoliteVm(n, NeoliteVmArgs.builder().vmName(...).build())` | `type: biznetgio:index:NeoliteVm` |
| Catalog function | `biznetgio.neoliteProductsOutput()` | `biznetgio.neolite_products()` | `biznetgio.NeoliteProducts(ctx, &Args{}, nil)` | `NeoliteProducts.Invoke()` | `BiznetgioFunctions.neoliteProducts()` | `fn::invoke: function: biznetgio:index:neoliteProducts` |
| Function with inputs | `biznetgio.neoliteOsListOutput({productId})` | `biznetgio.neolite_os_list_output(product_id=...)` | `biznetgio.NeoliteOsList(ctx, &Args{ProductId}, nil)` | `NeoliteOsList.Invoke(new NeoliteOsListInvokeArgs { ProductId })` | `BiznetgioFunctions.neoliteOsList(NeoliteOsListArgs.builder().productId(...).build())` | `fn::invoke` with `arguments:` |
| Export | `export const x = ...` | `pulumi.export("x", ...)` | `ctx.Export("x", ...)` | dictionary entry `["x"] = ...` | `ctx.export("x", ...)` | `outputs:` map |
### 2.3 The account id conversion
Resource `id`s are always strings in Pulumi, but the upstream API sends numbers, so the provider types several "account id" style inputs as numbers. Passing a string `id` into them is a compile error in every typed language, which is why each language carries a conversion helper. The exact implementations:
```typescript theme={null}
function toAccountId(id: pulumi.Input): pulumi.Output {
return pulumi.output(id).apply((value) => Number(value));
}
```
```python theme={null}
def to_account_id(value: pulumi.Input[str]) -> pulumi.Output[int]:
return pulumi.Output.from_input(value).apply(int)
```
```go theme={null}
func toAccountID(id pulumi.IDOutput) pulumi.IntOutput {
return id.ToStringOutput().ApplyT(func(s string) (int, error) {
return strconv.Atoi(s)
}).(pulumi.IntOutput)
}
```
```csharp theme={null}
static Output ToAccountId(Output id) => id.Apply(v => int.Parse(v));
```
```java theme={null}
private static Output toAccountId(Output id) {
return id.applyValue(Integer::parseInt);
}
```
```yaml theme={null}
neoliteAccountId: ${fn::toNumber(vm.id)}
```
Where the conversion applies, the complete inventory:
| Input | Resource or function | Converted in |
| ---------------------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------- |
| `neoliteAccountId` | `NeoliteDisk`, `NeoliteSnapshot` | neolite, neolite-pro |
| `snapshotId` | `NeoliteVmFromSnapshot` | neolite |
| `accountId` | `neoliteChangePackageOptions`, `neoliteStorageUpgradeOptions` and their Pro variants | neolite, neolite-pro |
| `accountId` | `baremetalRebuildOsList` | baremetal |
| `additionalIpId`, `metalAccountId` | `BaremetalAdditionalIpAssignment` | baremetal |
| `metalAccountId` | `BaremetalElasticStorage` | baremetal |
| `keypairId` | `GpuInstance` | gpu (the GPU keypair's `id`, not a `keypairId` property) |
Where it does not apply, just as important:
* `keypairId` on the VPS and baremetal VMs is string-typed: `NeoliteKeypair`, `NeoliteProKeypair`, and `BaremetalKeypair` all expose a string `keypairId` that passes straight through.
* Every Object Storage `accountId` (`ObjectStorageBucket`, `ObjectStorageCredential`, `ObjectStorageObject`, and the three catalog functions) is string-typed. No conversion anywhere in `object-storage/` or `complete/`.
* `GpuConsole` and `GpuGraph` take `accountId` as a string; the GPU examples pass `gpu.id` directly.
* `GpuKeypair` exposes no `keypairId` at all, only `id`, `publicKey`, and `privateKey`. The GPU examples convert `keypair.id` with the same helper (inline, as `keypair.id.apply((id) => Number(id))` in TypeScript, `keypair_id = keypair.id.apply(int)` in Python, and equivalents elsewhere) and comment why.
A second Output idiom appears in `object-storage/`: running plain code like `.length` against an Output's eventual value requires `.apply` (TypeScript), `.apply(len)` (Python), `ApplyT` (Go), `.Apply` (.NET), `.applyValue` (Java), or `fn::length` (YAML). The examples use it to export the count of active instances, buckets, and credentials.
### 2.4 The examples, inventory per product line
**neolite/**: products → osList → ipAvailability → keypair → vm (with the four commented-out options `powerState`, `rebuildOs`, `migrateToPro`, `diskSize`) → disk (60 GB minimum, `productId: 60`) → snapshot → restored VM from snapshot → the two raw JSON functions. Exports: `ipAvailable`, `vmStatus`, `vmId`, `keypairPrivateKey`, `diskStatus`, `restoredVmStatus`, `changePackageOptionsRaw`, `storageUpgradeOptionsRaw`.
**neolite-pro/**: the same minus the from-snapshot resource, with the 30 GB disk minimum and `serviceName: "pro-extra-disk"`. Exports add `diskStatus` and `snapshotStatus`, drop `restoredVmStatus`.
**baremetal/**: products → keypair → server (`publicIp: 1`, commented `powerState`, `resetTrigger`, `rebuildOs`) → rebuild OS list (converted `accountId`) → OpenVPN (no inputs) → additional IP (`productId: 10`, `region: "wjv-1"`) → assignment (both ids converted) → elastic storage (`productId: 20`, `size: 100`, converted `metalAccountId`). Exports: `keypairPrivateKey`, `serverStatus`, `serverIpAddress`, `validRebuildOsImages`, `openvpnConfig`, `additionalIpAddress`, `assignmentStatus`, `elasticStorageStatus`.
**gpu/**: products → keypair → instance. The billing mode is one property: `subscription: { cycle: "m" }` (TypeScript/Python object literals), `subscription=biznetgio.GpuSubscriptionArgsArgs(cycle="m")` (Python's SDK names the args classes with a doubled ArgsArgs), `Subscription: biznetgio.GpuSubscriptionArgsArgs{Cycle: pulumi.String("m")}` (Go), `Subscription = new GpuInstanceSubscriptionArgs { Cycle = "m" }` (.NET), `.subscription(GpuSubscriptionArgs.builder().cycle("m").build())` (Java, imported from `ren.shirasaka.biznetgio.inputs`), and `subscription: { cycle: m }` (YAML). The alternative `onDemand` (with `additionalHours`) is commented out in every language, as are `rebuildTrigger` and `reserveAdditionalHoursTrigger`. Then the side-effecting console function and the graph (`timeframe: "hour"`), both with string `accountId`. Exports: `keypairPrivateKey`, `gpuStatus`, `consoleUrl`, `monitoringGraph`.
**object-storage/**: subscription (`productId: 8`, `quota: 10`) → bucket (`acl: "public-read"`) → credential (`active: true`) → object upload → the three catalog lookups with counts. The `source` path differs per language: `path.join(__dirname, "index.html")` (TypeScript), `str(pathlib.Path(__file__).parent / "index.html")` (Python), `"index.html"` relative (Go and Java, where `pulumi up` runs from the project folder), `Path.Combine(AppContext.BaseDirectory, "index.html")` (.NET), and `source: ./index.html` (YAML). Exports: `storageStatus`, `bucketName`, `accessKey`, `secretKey`, `objectKey`, `activeInstanceCount`, `bucketCount`, `credentialCount`.
### 2.5 The complete/ example and the component
The `complete/` folder wraps a NEO Lite Pro VM plus Object Storage into a reusable `AppStack` component. The caller (`index.ts`, `__main__.py`, `main.go`, `Program.cs`, `App.java`) does the catalog lookups, constructs one `AppStack` with args, and re-exports its five outputs: `vmStatus`, `bucketName`, `accessKey`, `secretKey`, `keypairPrivateKey`.
The component's internals are identical across languages:
* Registration with the type string `"biznetgio-example:index:AppStack"`.
* Five children: keypair, VM, storage, bucket, credential, each named `${name}-key`, `${name}-vm`, `${name}-storage`, `${name}-assets`, `${name}-cred`.
* Each child gets the component as parent: `{ parent: this }` (TypeScript), `opts=pulumi.ResourceOptions(parent=self)` (Python), `pulumi.Parent(app)` (Go), `new CustomResourceOptions { Parent = this }` (.NET), `CustomResourceOptions.builder().parent(this).build()` (Java). The parent wiring groups everything under one tree so `pulumi destroy` tears the whole app down in order.
* Outputs are published with `registerOutputs({...})` (TypeScript), `self.register_outputs({...})` (Python), `ctx.RegisterResourceOutputs(app, pulumi.Map{...})` (Go), `RegisterOutputs(new Dictionary{...})` (.NET), `this.registerOutputs(Map.of(...))` (Java).
* Args: TypeScript uses an `AppStackArgs` interface; Python a plain class with `storage_quota` defaulting to `None` and the component falling back to 10; Go a struct with `StorageQuota *int` where nil means the 10 GB default; .NET a class with nullable `Input? StorageQuota` and `args.StorageQuota ?? 10`; Java a builder class (`AppStackArgs.java`) where `storageQuota` defaults to `Input.of(10)`; the bucket `acl` is `private` and the VM `vmName` is the component name itself.
YAML cannot define components, a runtime limitation, so `yaml/complete/Pulumi.yaml` declares the same five resources flat with a comment explaining the difference.
### 2.6 The workflow
`.github/workflows/ci.yml` builds each language with its toolchain, then optionally runs `preview`/`up`/`destroy` through `pulumi/actions@v7` against the `dev` stack. Full details in [Pipelines](/contribute/pipelines).
## Part 3: cross-cutting technical reference
### The billing model
Every orderable resource takes `cycle` (`"m"` monthly, `"y"` annual) and `payWithCreditCard`. In Pulumi the same fields are `cycle` and `payWithCreditCard`; the default-false billing rule applies to both tools. GPU adds the `subscription` versus `onDemand` split, and `additional_hours` reserves extra on-demand hours on top of the default balance.
### The one-shot and destructive options
All commented out in every language, all firing only when their value changes:
| Product | Option | Effect |
| ------------ | ---------------------------------- | ----------------------------------------------------- |
| NEO Lite | `power_state` | start/stop/suspend/resume/shutdown |
| NEO Lite | `rebuild_os` | wipes the disk and reinstalls |
| NEO Lite | `migrate_to_pro` | one-way move to a NEO Lite Pro product id |
| NEO Lite | `disk_size` | grow-only absolute GB target |
| NEO Lite Pro | same set as NEO Lite | same effects |
| NEO Metal | `power_state` | on/off |
| NEO Metal | `reset_trigger` | one-shot reboot; change the string to re-fire |
| NEO Metal | `rebuild_os` | wipes the disk; valid values from the rebuild OS list |
| NEO GPU | `rebuild_trigger` | wipes the disk |
| NEO GPU | `reserve_additional_hours_trigger` | reserves more on-demand hours |
### Side-effecting reads
Only `biznetgio_gpu_console` / `gpuConsole` mints state on read: every evaluation creates a fresh one-time console session. The examples expose it as an output and warn never to reference it from anything evaluated during preview diffing. The raw JSON lookups (`changePackageOptions`, `storageUpgradeOptions`) are read-only.
### Name limits enforced by the API
`vm_name`/`vmName`: 6 to 16 characters. `service_name`/`serviceName` (disks): 6 to 16. Object Storage `label`: 6 to 16. `ssh_and_console_user`: 6 to 32, letters, numbers, dash, dot only. The examples' names (`neolite-example`, `extra-disk`, `pro-extra-disk`, `gpu-example`, `metal-example`, `example`) are all chosen to fit.
### Secrets per tool
Terraform: `console_password` via `TF_VAR_console_password` or gitignored `terraform.tfvars`; provider auth via `BIZNETGIO_API_KEY` env. Pulumi: `pulumi config set --secret consolePassword`; stack state in gitignored `Pulumi..yaml`; provider auth via `BIZNETGIO_API_KEY` env; CI adds `PULUMI_ACCESS_TOKEN`.
## Part 4: complete file indexes
Terraform repo, every file:
| File | Content |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `README.md` | bilingual overview, folder table, cost warnings, template guide |
| `LICENSE` | MIT |
| `.gitignore` | `.terraform/`, `.terraform.lock.hcl`, `*.tfstate*`, `crash.log`, `override.tf*`, `*.tfvars`, `!*.tfvars.example` |
| `.github/workflows/ci.yml` | manual dispatch pipeline |
| `.github/pull_request_template.md` | PR checklist |
| `.github/ISSUE_TEMPLATE/*.yml` | bug, feature, docs forms plus `config.yml` |
| `CODEOWNERS`, `CONTRIBUTING.md` | review routing, contribution summary |
| `neolite/{versions,variables,main,outputs}.tf`, `terraform.tfvars.example`, `README.md` | sections 1.1 and 1.2 |
| `neolite-pro/...` | section 1.3 |
| `baremetal/...` | section 1.4 |
| `gpu/...` | section 1.5 |
| `object-storage/...` plus `index.html` (the uploaded demo page) | section 1.6 |
| `complete/{versions,variables,main,outputs}.tf`, `terraform.tfvars.example`, `README.md`, `modules/app-stack/{main,variables,outputs}.tf` | section 1.7 |
Pulumi repo, every file:
| File | Content |
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `README.md` | bilingual overview, language matrix, the bug-this-repo-caught section, cost warnings |
| `LICENSE` | MIT |
| `.gitignore` | per-language build output and `Pulumi.*.yaml` |
| `.github/workflows/ci.yml` | language x example matrix pipeline |
| `.github/pull_request_template.md`, `.github/ISSUE_TEMPLATE/*.yml`, `CODEOWNERS`, `CONTRIBUTING.md` | contribution plumbing |
| `//Pulumi.yaml` | project name, runtime, description |
| `typescript/*/index.ts`, `package.json`, `tsconfig.json`, `package-lock.json` | sections 2.2 to 2.5 |
| `typescript/complete/appStack.ts` | the component |
| `python/*/__main__.py`, `requirements.txt`; `python/complete/app_stack.py` | same |
| `go/*/main.go`, `go.mod`, `go.sum`; `go/complete/app_stack.go` | same |
| `dotnet/*/Program.cs`, `.csproj`; `dotnet/complete/AppStack.cs` | same |
| `java/*/src/main/java/demo/App.java`, `pom.xml`; `java/complete/AppStack.java`, `AppStackArgs.java` | same |
| `yaml/*/Pulumi.yaml`; `yaml/object-storage/index.html` | same, flat |
| `*/object-storage/index.html` | the demo page each language uploads |
That is everything in both repos. If you change any of it, the [Conventions](/contribute/conventions) and the [walkthroughs](/contribute/walkthroughs) tell you how to do it safely.
# CODEOWNERS and reviews
Source: https://biznetgio.creations.ren/contribute/codeowners
How the CODEOWNERS file routes reviews, its matching rules, and how to claim ownership of a path
Both example repos - [biznetgio-example-terraform](https://github.com/shirasakaren/biznetgio-example-terraform) and [biznetgio-example-pulumi](https://github.com/shirasakaren/biznetgio-example-pulumi) - have a `CODEOWNERS` file at their root. It tells GitHub who owns which files, and GitHub turns that into review requests automatically. The two provider repos and this docs site do not have one yet; a PR there gets no automatic review request, so tag the maintainer manually. This page explains how the mechanism works and how to read and change the file, for the repos that have it.
## What CODEOWNERS does
When a pull request changes files that match an entry in `CODEOWNERS`, GitHub automatically requests a review from the listed owners, as described in [GitHub's documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners). It does not block merges and it does not grant permissions; it is a routing table for review requests.
The file in both example repos is minimal, and identical between them:
```text theme={null}
* @shirasakaren
```
`*` matches every file in the repo, so every PR requests review from the repo owner. That is the whole current policy: one maintainer reviews everything, and CODEOWNERS makes sure nothing merges without them seeing it.
## Matching rules
The rules follow [GitHub's CODEOWNERS syntax](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax):
* Paths match gitignore style patterns: `*` is a wildcard, `*.tf` matches all Terraform files, `docs/` matches a folder and everything in it.
* The last matching line wins. Order matters; specific paths must come after the catch-all `*`.
* Comments start with `#`. Each line maps a path to one or more owners, separated by spaces.
* Owners are GitHub usernames or team names like `@username` or `@org/team-name`.
A realistic future version might look like:
```text theme={null}
* @shirasakaren
/contribute/ @shirasakaren @docs-volunteer
*.tf @shirasakaren @terraform-examples-team
```
Here a PR touching `contribute/` pages requests both reviewers, and any `.tf` file requests the Terraform team, while everything else falls back to the repo owner.
## Adding yourself as an owner
If you become a regular contributor to one area, ask the maintainer to add you to `CODEOWNERS` for that path in a normal PR. Two rules:
* Only add yourself or people who asked; never volunteer someone else.
* Only claim paths you are willing to review promptly. Ownership means review requests, not glory.
## Review expectations, both sides
For the author: answer review comments by changing the code or explaining why not, and do not take a request for changes personally. The checklist in the [PR template](/contribute/commits-and-prs) exists so reviews stay about the checklist and the conventions instead of taste.
For the reviewer: use the template checklist as the script, check that docs and code changed together, and verify cost safety (the `payWithCreditCard` default, commented out destructive options). If a PR is good, approve it; if it needs small fixes, request them; if the approach is wrong, say so early and plainly.
Review happens asynchronously. The maintainer is in one timezone, contributors are in several; a round trip can take a day or more. That is normal for this project and is why [Communication](/contribute/communication) asks you to keep PRs small and self-contained.
# Commits and pull requests
Source: https://biznetgio.creations.ren/contribute/commits-and-prs
Conventional Commits, branch naming, the PR template, and the full fork to merge lifecycle
The contribution workflow is plain [GitHub Flow](https://docs.github.com/en/get-started/using-github/github-flow): fork, branch from `main`, commit, open a pull request, review, squash merge. Nothing more. The only house rules are about how commits and PRs are written.
## Commit messages
All three repos use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). The format is:
```text theme={null}
[optional scope]:
[optional body]
[optional footer]
```
### Types
| Type | Use for |
| ---------- | ---------------------------------------------------------------- |
| `feat` | a new example, a new page, a new feature |
| `fix` | correcting wrong behavior or wrong code |
| `docs` | documentation only: README, comments, docs site pages, templates |
| `ci` | the pipelines in `.github/workflows/` |
| `refactor` | restructuring without changing behavior |
| `test` | tests and checks only |
| `chore` | everything else, like license or ignore files |
### Scopes
The scope names the area, and it mirrors the repo layout. Real examples from the two example repos' history (the last one is what actually added their CODEOWNERS and issue templates - the docs repo doesn't have those yet, see [CODEOWNERS](/contribute/codeowners) and [Issues](/contribute/issues)):
```text theme={null}
fix: correct GPU keypair and account-id typing in reference examples
docs: add example repos page with real repo links
docs: add contribution guide, PR and issue templates, CODEOWNERS
```
With scopes, the same commits would read `fix(gpu): correct GPU keypair and account-id typing` or `docs(tutorials): add example repos page`. Either form is fine. The rules that always apply:
* Imperative mood, present tense: "add X", never "added X" or "adds X".
* Lowercase type, no period at the end.
* One logical change per commit. Split unrelated work.
* No em dashes or en dashes in commit messages either, same as everywhere else in this project.
### Body and footers
The body explains why when the title is not enough, especially for anything that changes billable behavior. Footer lines like `Closes #123` link issues and close them automatically on merge, see [GitHub's reference](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
## Branch naming
Branch from `main`, name the branch `/`, like `fix/gpu-keypair-id` or `docs/contribute-section`. The name just has to be readable in the PR list; nothing enforces it.
## The pull request
When you open a PR, GitHub fills the description from the repo's [pull request template](https://github.com/shirasakaren/biznetgio-example-terraform/blob/main/.github/pull_request_template.md). The template is a checklist, and the checklist is the definition of done:
* Bilingual comments on new code, no em or en dashes
* The example builds in its language, or validates in the touched folders
* No secrets, `payWithCreditCard` stays `false`
* READMEs and the root tables updated
* Docs site pages updated in both languages when behavior changed
Every unchecked box is a review comment waiting to happen. Check them yourself before asking for review; the reviewer will check them again.
Fork the repo from the GitHub web UI, clone your fork, and create the branch from an up to date `main`. Keep the [upstream remote](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-repository-for-a-fork) configured so you can pull the latest `main` before pushing.
Follow [Conventions](/contribute/conventions), then run the checks from [Local setup](/contribute/setup) in every folder you touched. For the docs repo, run `mint dev` and look at the page in the browser.
Open the PR as a draft if you want early feedback, then mark it ready when the checklist is done. Link any issues it closes in the description or footer.
CODEOWNERS automatically requests a review from the repo owner, see [CODEOWNERS and reviews](/contribute/codeowners). Expect the review to check the template checklist, the conventions, and whether docs and code changed together.
The maintainer squash merges into `main`, which keeps the history linear and one commit per change. For the docs repo, merging into `main` is also the deploy; the Mintlify app ships the site within minutes. For the example repos, the maintainer may run the manual CI afterwards.
## What happens after merge
* Docs repo: `mint validate` and `mint broken-links` run automatically on the push, then the site at biznetgio.creations.ren redeploys automatically from `main` - see [The docs site pipeline](/contribute/pipelines#the-docs-site-pipeline). Neither step places an order or costs money, so there is nothing to gate manually here.
* Example repos: nothing runs automatically. The [Pipelines](/contribute/pipelines) are manual dispatch on purpose, because `apply` and `up` place real orders. The maintainer triggers a `validate` or `build` run after review, and anything with real side effects only when it is wanted.
One last rule: nothing in this project runs `apply`, `up`, or a release step automatically on push, and there is no branch protection with required checks. The safety model for anything with a real side effect is human review plus a deliberate, manual pipeline run - the docs site's push-triggered CI is a build check, not an exception to that, since it can only fail a validation, never place an order. That is a design choice described in [Pipelines](/contribute/pipelines), and it is why the PR checklist matters more than in most repos.
# Communication
Source: https://biznetgio.creations.ren/contribute/communication
Where conversations happen, the etiquette of issues and reviews, docs sync rules, and the release policy
Contributions are conversations, and this project is small enough that a few simple rules keep every conversation useful. This page covers where to talk, how to talk, and the policies that keep the two languages and the three repos in sync.
## Where conversations happen
Every conversation happens on GitHub, in public:
| Channel | Use for |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| Issues on the example repos | bug reports, feature requests, docs problems, via the [three forms](/contribute/issues) |
| [Discussions](https://docs.github.com/en/discussions) on the example repos | questions, ideas before they are proposals, sharing what you built |
| Issues on [terraform-provider-biznetgio](https://github.com/shirasakaren/terraform-provider-biznetgio/issues) and [pulumi-biznetgio](https://github.com/shirasakaren/pulumi-biznetgio/issues) | provider level bugs |
| Pull request threads | discussion of the change itself |
There is no chat room or mailing list. Public issues and discussions are the archive, so the next person can search and find what you found.
## Issue etiquette
* Search before posting; the answer often exists in an issue, a Discussion, or on a docs page.
* One topic per issue, and stay on it. If a side topic appears, open a second issue and link them.
* Assume good faith and reply with specifics, not tone. A terse bug report is not rudeness; it is brevity.
* Redact secrets from everything you paste. Outputs in these examples include private keys and secret keys; once posted, they are public forever.
## Pull request review etiquette
* Keep PRs small and single purpose. A reviewer can give a ten line PR an answer in minutes; a thousand line PR with three features gets one of them reviewed well.
* Ask for review only when the PR template checklist is done. The checklist is the shared definition of done.
* Answer review comments with a code change or a written reason. A stale "will fix later" is how PRs rot.
* Reviews are asynchronous and can take a day or more. If something is urgent, say so in the PR and why, politely.
## Docs sync rules
The docs site is bilingual, and that is a hard invariant, not a preference. Every rule from [AGENTS.md](https://github.com/shirasakaren/biznetgio-docs/blob/main/AGENTS.md) in the docs repo:
* Every page exists in English and under `id/` with the same relative path. A PR that adds an English page without its Indonesian copy is incomplete.
* Indonesian pages are casual gen-z tone, short sentences, technical terms in English inside code formatting. Code blocks are identical across languages.
* Internal links in Indonesian pages start with `/id/`.
* No em dashes or en dashes in either language, and the same rule applies to code comments and commit messages.
When an example changes, ask one question: does any docs page show the old behavior? If yes, the docs update ships in the same PR or a linked one. The GPU keypair fix and the account id typing fix are the model examples of this paired workflow, visible on the [Pulumi GPU reference](/pulumi/resources/gpu).
## Releases and announcements
* The example repos do not cut releases or version tags. `main` is the release, and the READMEs say so implicitly: clone, and you have the latest.
* The providers release through their registries, [Terraform Registry](https://registry.terraform.io/providers/shirasakaren/biznetgio) and [Pulumi Registry](https://www.pulumi.com/registry/packages/biznetgio), see [Registries](/registries).
* The docs site ships continuously; every merge to `main` is a deploy.
* Big changes, like a new example or a new language, get announced in a Discussion so users and contributors can weigh in before the PR opens.
## Ask first for big things
The only real rule about scope: if a change would touch every folder, every language, or every page, propose it in a Discussion or feature request before writing it. Small fixes should just appear as PRs; big ones earn a conversation first. That keeps the maintainer's review time for reviewing, and keeps contributors from writing six languages of code for an idea that needed reshaping.
# Conventions
Source: https://biznetgio.creations.ren/contribute/conventions
Naming, comments, formatting, version pinning, and safety rules every contribution must follow, with links to the canonical standards
Conventions exist so any contributor can read any file and know what is happening. The rules are few, and each links to the published standard it comes from.
## Naming
Follow the existing names in each repo. They follow the conventions of their own ecosystems:
| Thing | Convention | Example |
| -------------------------------------- | ------------------------------------------- | ----------------------------------------------------------- |
| Terraform folder names | lowercase with hyphens | `object-storage/` |
| Terraform resource names | short, one word or hyphenated, no numbering | `biznetgio_neolite_vm.main`, `biznetgio_neolite_disk.extra` |
| Terraform variables and attributes | snake\_case | `pay_with_credit_card`, `console_password` |
| Pulumi resource names (first argument) | lowercase with hyphens, descriptive | `"neolite-example"`, `"example-app-key"` |
| Pulumi variables and config keys | camelCase | `consolePassword`, `payWithCreditCard` |
| Pulumi project names | `biznetgio-example-` | `biznetgio-example-gpu` |
| Class names in code | PascalCase | `AppStack`, `AppStackArgs` |
| Go exported types | PascalCase, Go style | `NewAppStack`, `VmProductId` |
Biznet GIO enforces its own name limits, and the examples must respect them. Keep these in mind when you rename things:
* VM names (`vm_name` / `vmName`): 6 to 16 characters
* Disk service names (`service_name` / `serviceName`): 6 to 16 characters
* Object Storage labels (`label` / `storageLabel`): 6 to 16 characters
* SSH and console usernames: 6 to 32 characters, letters, numbers, dash, dot only
The reference pages document the limits per resource: [Terraform NEO Lite](/terraform/resources/neolite), [Pulumi NEO Lite](/pulumi/resources/neolite), and their neighbors. The limit ranges are why the examples use short names like `example-app` instead of long descriptive ones.
## Bilingual comments
Every code file in the example repos starts with a banner comment and is commented in English and Bahasa Indonesia throughout. The format is fixed:
```hcl theme={null}
# ============================================================================
# English: What this whole file does, in plain casual English.
#
# Indonesia: Apa yang file ini lakuin, pake Bahasa Indonesia yang santai.
# ============================================================================
```
Then each section gets a divider with both languages:
```hcl theme={null}
# --- The VM itself ---------------------------------------------------
# --- VM-nya sendiri --------------------------------------------------
```
The rules:
* English first, Indonesian second, always.
* Casual tone, like explaining to a friend. No formal documentation speak inside code comments.
* Technical terms stay in English inside code formatting, both in comments and on the docs site.
* New code you add must follow the same pattern. This is the single most important convention in these repos; it is the whole point of them being beginner friendly.
The docs site pages are not bilingual per file. Each page exists twice, once in English and once under `id/`, following [AGENTS.md](https://github.com/shirasakaren/biznetgio-docs/blob/main/AGENTS.md) in the docs repo.
## No em dashes or en dashes
This project never uses em dashes or en dashes, in docs pages, in code comments, in READMEs, or in commit messages. Hyphens only. The rule keeps every file ASCII-safe and every contributor's editor consistent, and it applies to both languages. When a sentence needs a pause, rewrite it or use a comma or a hyphen.
## Formatting, per language
Formatting follows each ecosystem's canonical tool. The links go to the official documentation for each:
| Language | Standard | Link | How CI checks it |
| --------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Terraform (HCL) | `terraform fmt`, style guide | [HashiCorp style conventions](https://developer.hashicorp.com/terraform/language/style) | `terraform fmt -check` fails the CI job on any diff |
| TypeScript | Prettier style, 2 space indent, double quotes | [prettier.io](https://prettier.io/) | `tsc --noEmit` type checks; formatting matches the existing files by convention |
| Python | PEP 8, snake\_case | [PEP 8](https://peps.python.org/pep-0008/) | `pip install` resolves the pinned requirements |
| Go | `gofmt`, effective Go | [Effective Go formatting](https://go.dev/doc/effective_go#formatting) | `go build ./...` compiles every example |
| .NET | C# conventions, `dotnet format` | [Microsoft C# coding conventions](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions) | `dotnet build` |
| Java | Google Java Style | [google.github.io/styleguide](https://google.github.io/styleguide/javaguide.html) | `mvn -q compile` |
| YAML | plain 2 space YAML | [yaml.org spec](https://yaml.org/spec/) | parsed with a YAML loader in CI |
Run the formatter before committing, in any language you touched. If a file's formatting drifts from its neighbors, your PR review will ask you to fix it.
## Version pinning
Every example pins the exact SDK and provider versions it was built against. Do not bump versions casually, and never leave a version unpinned in a new folder:
| Language | Pinned versions |
| ---------- | ------------------------------------------------------------------------------------------------- |
| Terraform | `required_version = ">= 1.0"`, provider `registry.terraform.io/shirasakaren/biznetgio` at `0.1.0` |
| TypeScript | `@pulumi/pulumi ^3.142.0`, `@shirasakaren/biznetgio ^0.1.7` |
| Python | `pulumi>=3.231.0,<4.0.0`, `pulumi-biznetgio>=0.1.7` |
| Go | Go `1.25.11`, `pulumi/sdk/v3 v3.256.0`, `pulumi-biznetgio v0.1.7` |
| .NET | `Pulumi 3.*`, `Shirasakaren.Biznetgio 0.1.7`, `net8.0` |
| Java | `com.pulumi:pulumi:1.0.0`, `ren.shirasaka:biznetgio:0.1.7`, Java 17 |
| YAML | nothing to pin, the CLI resolves the provider |
The provider SDKs live in the Terraform Registry and the Pulumi Registry respectively, see [Registries](/registries). Version bumps happen deliberately, in their own PR, mirrored across all folders at once so the repo never has a mix.
## Cost safety
These repos create real, billable infrastructure, so they encode safety rules directly into the code:
* `pay_with_credit_card` (Terraform) and `payWithCreditCard` (Pulumi) default to `false` everywhere. A `false` order still creates the real resource but leaves the invoice unpaid in the portal. Read [Billing and orders](/guides/billing) for the full picture.
* Destructive or one-shot options like `power_state`, `rebuild_os`, `migrate_to_pro`, and `rebuild_trigger` are present in the code but commented out. Each carries a comment saying what it does and that it wipes disks or spends money. Uncomment one at a time, never a batch.
* `baremetal/` and `gpu/` READMEs carry an extra cost warning because they are the most expensive product lines. Keep those warnings if you touch those folders.
* Secrets never enter git. Terraform uses the gitignored `terraform.tfvars` with a committed `.example` template; Pulumi uses `pulumi config set --secret` and `Pulumi..yaml` files are gitignored.
Any new example you add must inherit all four rules. A PR that adds a billable default or commits a secret gets the review it deserves.
## Docs site conventions
The docs repo has its own writing rules, all in [AGENTS.md](https://github.com/shirasakaren/biznetgio-docs/blob/main/AGENTS.md):
* Every page has `title` and `description` frontmatter; descriptions are one sentence.
* Headings are sentence case; prose is active voice, second person.
* English and Indonesian pages must stay in sync with the same relative path.
* Internal links in Indonesian pages start with `/id/`.
* No em dashes or en dashes, same as the example repos.
When you change behavior in an example repo, check whether any docs page shows the old behavior. If it does, fix the docs in the same PR or a linked one, in both languages. The [GPU keypair](/pulumi/resources/gpu) and account id typing fixes were exactly this kind of paired change.
# Contribute
Source: https://biznetgio.creations.ren/contribute/introduction
Everything you need to collaborate on the Biznet GIO providers, docs site, and example repos
Welcome to the collaboration guide for the Biznet GIO infrastructure as code project. Everything in this project is open source, and this section teaches you exactly how to help: what lives where, how the pieces work, which conventions to follow, how to open issues and pull requests, and how the pipelines keep every change safe.
You do not need prior Terraform, Pulumi, or Go experience to contribute. The [What is Infrastructure as Code?](/what-is-iac) page explains the basics, and each guide below assumes only general computer science knowledge. Everything in the repos themselves is commented in English and Bahasa Indonesia for the same reason.
## The project map
Five repositories make up this project. They form a chain: two providers that talk to the Biznet GIO API, two example repos that show every feature of those providers working, and one docs site that teaches both.
| Repo | What it is | Language | License |
| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------- | ---------- |
| [terraform-provider-biznetgio](https://github.com/shirasakaren/terraform-provider-biznetgio) | The Terraform provider itself | Go | MPL-2.0 |
| [pulumi-biznetgio](https://github.com/shirasakaren/pulumi-biznetgio) | The Pulumi provider itself | Go | Apache-2.0 |
| [biznetgio-example-terraform](https://github.com/shirasakaren/biznetgio-example-terraform) | Runnable Terraform examples, one folder per product line | HCL | MIT |
| [biznetgio-example-pulumi](https://github.com/shirasakaren/biznetgio-example-pulumi) | The same examples in all six Pulumi languages | TypeScript, Python, Go, .NET, Java, YAML | MIT |
| [biznetgio-docs](https://github.com/shirasakaren/biznetgio-docs) | This docs site, built with [Mintlify](https://mintlify.com) | MDX | MIT |
This Contribute section covers the three repos you can change without deep provider knowledge: the docs site and the two example repos. The two provider repos are Go codebases with their own development flow; if you find a provider bug, report it as an issue on the provider repo and it usually gets fixed there first.
## How the repos communicate
The three repos reference each other constantly, and that wiring is part of the design:
* The example repos link to the docs site tutorials that explain the patterns they use, like the [Capstone tutorial](/tutorials/production-deployment).
* The docs site links to the example repos on its [examples page](/tutorials/examples), in the sidebar GitHub menu, and from the reference pages.
* The docs site reference pages show code that must match what the providers and examples actually do. When the examples catch a mismatch, both the examples and the docs get fixed together.
That last point matters a lot. This repo already caught real bugs in the docs by compiling every example against the real SDKs, for example the [GPU keypair id quirk](/pulumi/resources/gpu). Your contributions should keep that loop going: code first, docs second, both consistent.
## Reading order
Follow this order if you are new here:
1. [How the repos are organized](/contribute/repositories) to know where everything lives.
2. [Local setup](/contribute/setup) to get the tools and tokens you need.
3. [Conventions](/contribute/conventions) to learn the house rules before you write anything.
4. [Commits and pull requests](/contribute/commits-and-prs) to learn the contribution workflow.
5. [Issues](/contribute/issues) and [CODEOWNERS and reviews](/contribute/codeowners) to learn how communication and review work.
6. [Pipelines](/contribute/pipelines) to understand the safety net every change runs through.
7. The repo deep dives, [Terraform](/contribute/terraform-guide) and [Pulumi](/contribute/pulumi-guide), to understand the code itself, and the [complete code walkthrough](/contribute/code-walkthrough) for the exhaustive file-by-file reference.
8. [Step-by-step walkthroughs](/contribute/walkthroughs) when you are ready to make your first change.
## Standards this project follows
Every convention this project uses is a published standard. The pages above link to the canonical source for each one, but here are the big three up front:
Every commit message follows this spec, the same one used by most large open source projects.
Fork, branch from main, open a pull request, review, merge. Nothing more complicated than that.
Issue templates, pull request templates, and ownership rules are all configured per repo in .github.
Every repo also has a `CONTRIBUTING.md` at its root that summarizes its own rules and links back here:
* [Terraform examples CONTRIBUTING.md](https://github.com/shirasakaren/biznetgio-example-terraform/blob/main/CONTRIBUTING.md)
* [Pulumi examples CONTRIBUTING.md](https://github.com/shirasakaren/biznetgio-example-pulumi/blob/main/CONTRIBUTING.md)
# Issues
Source: https://biznetgio.creations.ren/contribute/issues
The three issue forms, when to use Discussions instead, and how to write an issue that gets fixed fast
Issues are how bugs and ideas enter the project. Both example repos have three structured issue forms, configured as YAML under `.github/ISSUE_TEMPLATE/`, using GitHub's [issue forms](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository) feature. The docs repo does not have its own issue forms yet - open a plain issue there, or use one of the example repos' forms if the bug is really about a specific example.
## The three forms
### Bug report
For anything that is broken or behaves differently than the docs say. The form asks for:
* Which example and language (the Pulumi form has a dropdown for the six languages)
* Exact tool versions, like the Terraform or `pulumi` version
* Ordered steps to reproduce
* Expected behavior versus actual behavior, with the full error output pasted
The reproduction steps are the most important part. A bug without steps is a conversation, not a bug report.
### Feature request
For a new example, a new language pattern, or an improvement. The form asks for the problem first, then the proposal, then alternatives you already tried. The problem-first structure exists because the best feature request is a description of something you could not do; the proposal may change in review, the problem does not.
### Docs improvement
For wrong, unclear, or missing comments and READMEs. Docs bugs are real bugs here: the entire point of the example repos is teaching, so a confusing comment is a defect, not a nicety. The form asks for the file and section, the exact line that is wrong, and a suggested rewrite.
## Issues versus Discussions
Use [GitHub Discussions](https://docs.github.com/en/discussions) on the repo instead of an issue when:
* You have a question about how something works
* You want to share what you built with the examples
* You want to discuss an idea before proposing it
* Something is not broken, it just surprises you
Both example repos have Discussions enabled and linked from the issue form's contact links, so people get routed there instead of opening a blank issue.
## Labels
The issue forms assign a label per kind: `bug`, `enhancement`, or `documentation`. Beyond those, a minimal set keeps triage simple:
| Label | Meaning |
| ------------------ | -------------------------------------------------------- |
| `bug` | incorrect behavior, from the bug form |
| `enhancement` | a proposal, from the feature form |
| `documentation` | docs or comments, from the docs form |
| `good first issue` | small and self-contained, ideal for a first contribution |
| `help wanted` | the maintainer welcomes help on this one |
| `question` | needs discussion, may move to Discussions |
Maintainers add the last three during triage. There is no service level agreement on response times; this is a community project, and issues get attention in the order they come in. A complete issue with reproduction steps moves fastest because it needs the fewest follow-up questions.
## Writing an issue that gets fixed fast
1. Search first, both open and closed issues, plus Discussions. The GPU keypair quirk, for example, is already documented in [the Pulumi GPU reference](/pulumi/resources/gpu) and in the example code comments.
2. One issue per problem. Two bugs in one issue means one of them gets lost.
3. Fill every field the form gives you. The forms were designed to capture what a maintainer needs.
4. Paste full error output, not a paraphrase. Errors contain the resource name and the failing attribute.
5. Say what you expected and what you got, in those words.
6. Never put secrets in an issue. Redact tokens and passwords; the examples' outputs include private keys and secret keys, and pasting them means rotating them.
## Triage, from the maintainer side
A new issue goes through three questions: is it a provider bug, an example bug, or a docs bug? The answer decides the repo:
* Provider bug: moved to [terraform-provider-biznetgio](https://github.com/shirasakaren/terraform-provider-biznetgio/issues) or [pulumi-biznetgio](https://github.com/shirasakaren/pulumi-biznetgio/issues), then the examples and docs are updated to match the provider's real behavior once fixed.
* Example bug: fixed in the example repo, mirrored across languages, docs updated in the same PR or a linked one.
* Docs bug: fixed in both languages on the docs repo.
The [step-by-step walkthroughs](/contribute/walkthroughs) cover each of these paths end to end.
# Pipelines
Source: https://biznetgio.creations.ren/contribute/pipelines
Line by line explanation of the two manual dispatch CI workflows, the secrets they need, and how to extend them
Both example repos ship a GitHub Actions workflow that runs only when a human deliberately triggers it. This page explains why, what each step does, and how to add a new example or language to the matrix. The docs site has a much smaller workflow of its own - a validation gate, not a deploy step - covered in [The docs site pipeline](#the-docs-site-pipeline) below.
## Why manual only
Every pipeline here is declared `workflow_dispatch`, GitHub's [manually triggered workflow event](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch). They never run on push and never on a schedule. The reason is cost safety: the interesting actions (`apply`, `up`, `destroy`) place real orders on a real Biznet GIO account, so they must never fire because of a commit. A push-triggered `destroy` is how you get an incident; a manual choice from the Actions tab is how you get a rehearsal.
The default action in each workflow is the safe one: `validate` for Terraform, `build` for Pulumi. Both need zero credentials.
## The Terraform pipeline
The full file is [ci.yml in biznetgio-example-terraform](https://github.com/shirasakaren/biznetgio-example-terraform/blob/main/.github/workflows/ci.yml). From top to bottom:
1. **Trigger and inputs.** Two choice dropdowns: `example` (a folder, or `all`) and `action` (`validate`, `plan`, `apply`, `destroy`). The workflow file itself is the documentation; each input description says what needs credentials and what places real orders.
2. **Permissions.** `contents: read`, the minimum a checkout needs. The workflow cannot write to the repo.
3. **The `discover` job.** Turns the `all` choice into a concrete list of the six folders and publishes it as a job output, which becomes the matrix in the next job. It is a small shell script, because GitHub matrices must be concrete lists.
4. **The `run` job.** A matrix over the chosen folders with `fail-fast: false`, so one broken example does not cancel the others. Steps:
* `actions/checkout@v4` gets the code.
* [`hashicorp/setup-terraform@v3`](https://github.com/hashicorp/setup-terraform) installs Terraform.
* `terraform fmt -check` fails the job if any file is not canonically formatted. This is the formatting gate from [Conventions](/contribute/conventions).
* `terraform init` downloads the pinned provider from the registry.
* `terraform validate` type checks the whole folder without any credentials or API calls.
* `terraform plan` runs only when the action is `plan`, `apply`, or `destroy`, with the `BIZNETGIO_API_KEY` secret and the console password exposed as the `TF_VAR_console_password` environment variable. For `destroy` it plans with `-destroy`.
* `terraform apply -auto-approve` or `terraform destroy -auto-approve` run only when explicitly chosen.
Secrets used: `BIZNETGIO_API_KEY` for any action past validate, and `EXAMPLE_CONSOLE_PASSWORD` (mapped to `TF_VAR_console_password`, the Terraform convention for [setting variables from the environment](https://developer.hashicorp.com/terraform/language/values/variables#environment-variables)) for the folders that take a console password.
## The Pulumi pipeline
The full file is [ci.yml in biznetgio-example-pulumi](https://github.com/shirasakaren/biznetgio-example-pulumi/blob/main/.github/workflows/ci.yml). Same philosophy, one more dimension:
1. **Trigger and inputs.** Three dropdowns: `language`, `example`, and `action` (`build`, `preview`, `up`, `destroy`).
2. **The `discover` job.** Cross-products the chosen language and example into a matrix of `{language, example}` pairs using `jq -nc`. This is the same `all` expansion trick as the Terraform workflow, but the cross product means `all` by `all` fans out into 36 jobs.
3. **The `run` job.** A matrix over those pairs, `fail-fast: false`, with the working directory set to `/`. Steps:
* `actions/checkout@v4`.
* Per-language toolchain and build, gated with `if:` on the language: [`setup-node@v4`](https://github.com/actions/setup-node) with Node 20 plus `npm install && npx tsc --noEmit` for TypeScript; [`setup-python@v5`](https://github.com/actions/setup-python) with Python 3.11 plus `pip install -r requirements.txt`; [`setup-go@v5`](https://github.com/actions/setup-go) pinned to `1.25.x` plus `go build ./...`; [`setup-dotnet@v4`](https://github.com/actions/setup-dotnet) with .NET 8 plus `dotnet build`; [`setup-java@v4`](https://github.com/actions/setup-java) with Temurin 17 plus `mvn -q compile`; and a one-liner YAML parse for the `yaml` language.
* [`pulumi/actions@v7`](https://github.com/pulumi/actions) runs the chosen command (`preview`, `up`, or `destroy`) against the `dev` stack in the example's folder, only when the action is not `build`. It needs `PULUMI_ACCESS_TOKEN` (Pulumi Cloud auth) and `BIZNETGIO_API_KEY` (the provider reads it from the environment).
The Go pin at `1.25.x` exists because the Go SDK's `go.mod` requires a recent toolchain; the comment in the workflow says to keep it in lockstep with the provider repo. If you bump Go in the examples, bump it there too.
## Adding a new example or language
The matrix lists are hardcoded in the workflow files, so extending the matrix means editing the workflow in the same PR as the new folder:
| Change | Edit these places |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| New Terraform example folder | the `example` input's `options:` list, and the `discover` job's folder list |
| New Pulumi example folder | the `example` input's `options:` list and the `discover` job's `examples` list |
| A whole new Pulumi language | the `language` input's `options:` list, the `discover` job's `langs` list, plus a new `if:` gated toolchain and build block in the `run` job |
Both workflows are plain YAML following the [GitHub Actions workflow syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions). The `discover` job pattern (compute a matrix in one job, consume it in the next via `fromJson`) is the official [dynamic matrix recipe](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs) from the Actions documentation.
## The docs site pipeline
Unlike the two example repos, the docs repo's `.github/workflows/ci.yml` is **not** manual-dispatch-only - it runs automatically on every push to `main` and on every pull request, because there is nothing destructive to gate here, only a build check:
```yaml theme={null}
name: ci
on:
push:
branches: [main]
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm install -g mint
- run: mint validate
- run: mint broken-links
```
`mint validate` catches a broken `docs.json` or a page Mintlify can't build; `mint broken-links` catches an internal link or anchor that doesn't resolve, which is exactly the class of bug a `[0]`-heavy docs site full of cross-references is prone to. Neither step deploys anything - deployment is separate and handled by the Mintlify GitHub app, which builds and publishes to [biznetgio.creations.ren](https://biznetgio.creations.ren) whenever a commit lands on `main`, tracked in the repo's [deployments](https://github.com/shirasakaren/biznetgio-docs/deployments). Run both `mint validate` and `mint broken-links` locally before opening a PR - see [Local setup](/contribute/setup) - so CI is a confirmation, not the first time you find out something's broken. If a deploy ever looks stale, the deployment history page shows the commit hash of the live site.
# Pulumi repo guide
Source: https://biznetgio.creations.ren/contribute/pulumi-guide
How the Pulumi examples work in all six languages, the component pattern, the id conversion quirk, and how to add an example or a language
This is the deep dive into [biznetgio-example-pulumi](https://github.com/shirasakaren/biznetgio-example-pulumi). It assumes you have read [What is Infrastructure as Code?](/what-is-iac) or know what a Pulumi stack is. The [Pulumi reference pages](/pulumi/resources/neolite) document every resource used here.
## What a Pulumi program is, in one paragraph
A Pulumi program is a real program in a real language, not a markup file. You write ordinary code that calls `new biznetgio.NeoliteVm(...)` the way you would call any constructor, and Pulumi's engine records every resource in a graph instead of executing the constructor's side effects. References between resources, like `keypair.keypairId` passed into the VM, become edges in that graph, so the engine knows to create the keypair before the VM. The program then declares outputs, and `pulumi up` drives the graph against the Biznet GIO API. The same program structure exists in all six languages because it is the same engine underneath.
## A project's anatomy
Each folder is an independent Pulumi project. `Pulumi.yaml` declares the identity:
```yaml theme={null}
name: biznetgio-example-neolite
runtime: nodejs
description: NEO Lite walkthrough - every resource and data source this service has
```
`runtime` picks the language engine. Around that file each language brings its own files, listed in [How the repos are organized](/contribute/repositories). Two concepts appear in every language's program:
* **Config.** The stack's settings, like `consolePassword`, set with `pulumi config set --secret consolePassword ` and read in the program with `config.requireSecret("consolePassword")`. Stack state lives in `Pulumi..yaml` files, which are gitignored so secrets never enter git.
* **Stacks.** `pulumi stack init dev` creates an independent deployment target per folder. One example's stack can never touch another's.
## The id conversion convention
The single most important convention in this repo is the `toAccountId` helper, and it exists because of a real type mismatch between Pulumi and the upstream API:
* Pulumi resource `id`s are always strings.
* Several Biznet GIO inputs that accept those ids (`neoliteAccountId`, `snapshotId`, `metalAccountId`, `additionalIpId`, and the `accountId` on GPU functions) are typed as numbers in the SDKs, because the upstream API sends numbers.
Passing a string `id` into a number typed input is a compile error in every typed language, so each language has its own conversion:
```typescript theme={null}
function toAccountId(id: pulumi.Input): pulumi.Output {
return pulumi.output(id).apply((value) => Number(value));
}
const disk = new biznetgio.NeoliteDisk("extra", {
// ...
neoliteAccountId: toAccountId(vm.id),
});
```
```python theme={null}
def to_account_id(resource_id: pulumi.Input[str]) -> pulumi.Output[int]:
return pulumi.Output.from_input(resource_id).apply(int)
disk = biznetgio.NeoliteDisk("extra",
neolite_account_id=to_account_id(vm.id),
# ...
)
```
```go theme={null}
// The SDK's ID() returns a pulumi.IDOutput; convert with ToIntOutput().
disk, err := biznetgio.NewNeoliteDisk(ctx, "extra", &biznetgio.NeoliteDiskArgs{
NeoliteAccountId: vm.ID().ToIntOutput(),
// ...
})
```
```csharp theme={null}
var disk = new Biznetgio.NeoliteDisk("extra", new Biznetgio.NeoliteDiskArgs
{
NeoliteAccountId = vm.Id.Apply(v => int.Parse(v)),
// ...
});
```
```java theme={null}
var disk = new NeoliteDisk("extra", NeoliteDiskArgs.builder()
.neoliteAccountId(vm.id().applyValue(Integer::parseInt))
// ...
.build());
```
```yaml theme={null}
extraDisk:
type: biznetgio:index:NeoliteDisk
properties:
neoliteAccountId: ${fn::toNumber(vm.id)}
```
Three exceptions to remember:
* `GpuKeypair` exposes no `keypairId` property, only `id`, which already is the keypair id. The GPU examples convert `keypair.id` with the same helper and carry a comment explaining why, matching the [Pulumi GPU reference](/pulumi/resources/gpu).
* Object Storage's `accountId` fields are string typed, so no conversion happens anywhere in `object-storage/` or the storage part of `complete/`.
* YAML uses `fn::toNumber`, the built in function, instead of a helper.
Both quirks were found by compiling this repo against the real SDKs, and the docs site was updated to match. When you add code that passes an `id` anywhere, check which type the input wants before writing the reference.
## The component in complete/
`complete/` bundles "one app" (NEO Lite Pro VM plus Object Storage bucket and credential) into a reusable component, the Pulumi equivalent of the Terraform module. The TypeScript version is `appStack.ts`:
* `AppStackArgs` is a plain interface listing the component's inputs. Every field is typed `pulumi.Input<...>`, which means a caller may pass either a plain value or a live output from another resource.
* `AppStack` extends `pulumi.ComponentResource`, registered with the type string `"biznetgio-example:index:AppStack"` in its `super(...)` call.
* Each child resource is created with `{ parent: this }` in its options. That one line puts every child in a tree under the component, which is what makes `pulumi destroy` tear the whole stack down in the right order.
* Outputs are assigned to public fields, then published with `this.registerOutputs(...)`, which makes them appear in `pulumi stack output`.
The same pattern exists in every code language, with language appropriate naming:
| Language | File | Component registration |
| ---------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| TypeScript | `appStack.ts` | `class AppStack extends pulumi.ComponentResource`, `super("biznetgio-example:index:AppStack", ...)` |
| Python | `app_stack.py` | `class AppStack(pulumi.ComponentResource)`, `super().__init__("biznetgio-example:index:AppStack", name, {}, opts)` |
| Go | `app_stack.go` | `func NewAppStack(ctx, name, args, opts...)`, `ctx.RegisterComponentResource(...)`, children get `pulumi.Parent(app)` |
| .NET | `AppStack.cs` | `class AppStack : Pulumi.ComponentResource` |
| Java | `AppStack.java` + `AppStackArgs.java` | separate args class, the Java convention |
YAML cannot define components, a language limitation, so `yaml/complete/` shows the same five resources flat, with a comment explaining the difference. The [modules and components tutorial](/tutorials/modules-and-components) teaches the pattern itself.
## Version pinning and the Go detail
Every language pins the SDK and provider versions it was built against, listed in the table in [Conventions](/contribute/conventions). One pin needs special care: the Go SDK's `go.mod` requires a recent toolchain, which is why the Go folders declare `go 1.25.11` and the CI installs `1.25.x`. The workflow comment says to keep it in lockstep with the provider repo. If Go updates ever break a build, that pin is the first thing to check.
## Adding a new example
The steps mirror the Terraform ones, plus a language matrix:
Copy the folder for the closest product line. Keep the `Pulumi.yaml` name and description format, `biznetgio-example-`.
Keep the bilingual banner and comments, the `toAccountId` helper where needed, and the cost safety defaults (`payWithCreditCard` defaults to `false`, one-shot options commented out).
Run the language's build command from [Local setup](/contribute/setup). Fix type errors until it compiles; the type checker will catch every id conversion you missed.
Each example must exist in every language, so the contribution is six programs. Translate the TypeScript structure, not the comments; the comments stay the same bilingual format in every language. YAML gets the flat version of whatever the component would be.
Update the root README table and the per-folder READMEs, and register the new example in the `example` input options and the `discover` job list in the workflow, as [Pipelines](/contribute/pipelines) describes.
Fill the PR template checklist, which asks exactly these questions.
## Adding a whole new language
Pulumi supports more runtimes than the six here. Adding one means:
1. Copy one existing language folder's six examples and rewrite the programs in the new language, keeping every comment.
2. Pin the SDK and provider versions in that language's dependency file.
3. Add the language to the CI `language` input options, the `discover` job's `langs` list, and a new build leg with the right setup action.
Discuss the language in a [feature request](/contribute/issues) first. A new language is a big mirroring commitment, since every future example change must be translated six or seven times.
## Running an example, for reference
```bash theme={null}
cd typescript/object-storage
npm install
pulumi stack init dev
pulumi config set --secret consolePassword "" # only examples with a VM
export BIZNETGIO_API_KEY=""
pulumi preview
pulumi up
```
`preview` is the plan; `up` is the apply. The full user facing walkthrough is the [Pulumi quickstart](/pulumi-quickstart), and the examples page lists what each folder covers.
For the exhaustive file-by-file reference, including the exact conversion code in all six languages and the complete inventory of number-typed inputs, see the [Complete code walkthrough](/contribute/code-walkthrough).
# How the repos are organized
Source: https://biznetgio.creations.ren/contribute/repositories
A full map of the three repos you can contribute to, what each file does, and where to make each kind of change
Before you change anything, you need a mental map of the three repos this guide covers. Each one has a small, consistent structure, and most contributions touch a single folder in a single repo.
## The docs site repo
[shirasakaren/biznetgio-docs](https://github.com/shirasakaren/biznetgio-docs) builds this site with [Mintlify](https://mintlify.com). Every page is an MDX file (Markdown plus React style components), and one JSON file, `docs.json`, defines the whole navigation.
```
biznetgio-docs/
├── docs.json # site config: tabs, sidebar groups, colors, navbar
├── index.mdx # home page
├── what-is-iac.mdx # IaC explainer
├── quickstart.mdx # Terraform quickstart
├── pulumi-quickstart.mdx # Pulumi quickstart
├── authentication.mdx # how to get a Biznet GIO API token
├── registries.mdx # where the providers are published
├── about.mdx # about the project
├── tutorials/ # the beginner tutorial track (8 pages + examples)
├── terraform/ # Terraform provider reference
├── pulumi/ # Pulumi provider reference
├── guides/ # billing, triggers, development, FAQ
├── contribute/ # this section
├── id/ # Indonesian translation of every page, same paths
├── images/ logo/ # images and logos
├── AGENTS.md # writing rules for this repo
├── README.md # repo overview and local dev instructions
└── .mintignore # files Mintlify ignores when building
```
Key rules for this repo:
* Every page must exist in English at the root and in Indonesian under `id/` with the same relative path. `index.mdx` has `id/index.mdx`, `tutorials/cicd.mdx` has `id/tutorials/cicd.mdx`, and so on. There are no exceptions.
* Links between pages are relative to the site root, like `/contribute/setup`. In Indonesian pages the same link starts with `/id/`.
* Navigation lives in `docs.json` only. Adding a page to a folder does nothing until the page is listed in a sidebar group there.
* The site deploys automatically from the `main` branch through the Mintlify GitHub app. A separate CI workflow (`mint validate` + `mint broken-links`, on every push and PR) is a validation gate, not the deploy - see [Pipelines](/contribute/pipelines#the-docs-site-pipeline).
## The Terraform examples repo
[shirasakaren/biznetgio-example-terraform](https://github.com/shirasakaren/biznetgio-example-terraform) has one self-contained example per Biznet GIO product line, plus a `complete/` example that combines two product lines through a reusable module. Together they use every one of the provider's 20 resources and 19 data sources.
```
biznetgio-example-terraform/
├── neolite/ # NEO Lite VPS: all 5 resources + all 5 data sources
├── neolite-pro/ # NEO Lite Pro VPS: all 4 resources + all 5 data sources
├── baremetal/ # NEO Metal: all 5 resources + all 3 data sources
├── gpu/ # NEO GPU: both resources + all 3 data sources
├── object-storage/ # NEO Object Storage: all 4 resources + all 3 data sources
├── complete/ # NEO Lite Pro + Object Storage behind a reusable module
│ └── modules/app-stack/ # the module itself
├── .github/workflows/ci.yml # manual dispatch pipeline
├── .github/ISSUE_TEMPLATE/ # bug, feature, and docs issue forms
├── .github/pull_request_template.md
├── CODEOWNERS CONTRIBUTING.md
├── README.md # bilingual overview, per-folder table, cost warning
└── LICENSE # MIT
```
Each example folder always has the same five files:
| File | What it does |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `versions.tf` | Pins the Terraform version and the provider version, and declares the provider (which reads the `BIZNETGIO_API_KEY` environment variable) |
| `variables.tf` | Declares every input, with defaults where safe. Secrets get no default, on purpose |
| `main.tf` | The actual infrastructure: data sources, resources, and how they connect |
| `outputs.tf` | Publishes the values you care about after apply, like the VM status or the keypair private key |
| `terraform.tfvars.example` | A template you copy to the gitignored `terraform.tfvars` to fill in real values. Only exists in folders that need a console password |
The [Terraform repo guide](/contribute/terraform-guide) walks through these files line by line.
## The Pulumi examples repo
[shirasakaren/biznetgio-example-pulumi](https://github.com/shirasakaren/biznetgio-example-pulumi) has the same six examples, each written once per supported language:
```
biznetgio-example-pulumi/
├── typescript/ # neolite/ neolite-pro/ baremetal/ gpu/ object-storage/ complete/
├── python/ # same six folders
├── go/ # same six folders
├── dotnet/ # same six folders
├── java/ # same six folders
├── yaml/ # same six folders (each is a single Pulumi.yaml)
├── .github/workflows/ci.yml # manual dispatch pipeline with a language x example matrix
├── .github/ISSUE_TEMPLATE/ # bug, feature, and docs issue forms
├── .github/pull_request_template.md
├── CODEOWNERS CONTRIBUTING.md
├── README.md # bilingual overview, bug-it-caught section, cost warning
└── LICENSE # MIT
```
Every folder is an independent Pulumi project. It has a `Pulumi.yaml` (project name, runtime, description) plus whatever files that language needs:
| Language | Files |
| ---------- | ---------------------------------------------------------------------- |
| TypeScript | `index.ts` (the program), `package.json` (pinned SDK), `tsconfig.json` |
| Python | `__main__.py`, `requirements.txt` |
| Go | `main.go`, `go.mod`, `go.sum` |
| .NET | `Program.cs`, a `.csproj` named after the project in `Pulumi.yaml` |
| Java | `pom.xml`, `src/main/java/demo/App.java` |
| YAML | just `Pulumi.yaml` with `runtime: yaml` |
The `complete/` example in each code language also has one extra file defining the reusable component, like `appStack.ts` or `app_stack.py`. The [Pulumi repo guide](/contribute/pulumi-guide) explains the pattern and every one of the languages.
## Where to make each kind of change
If you know what you want to do but not where to do it, this table is your answer:
| I want to... | Repo | Path |
| -------------------------------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Fix a typo or unclear paragraph | docs | the page file under the section it lives in, plus `id/` copy |
| Fix wrong code in a reference page | docs | `terraform/resources/*.mdx` or `pulumi/resources/*.mdx`, plus `id/` copy |
| Add or fix an example of a resource | terraform examples | the product folder, e.g. `gpu/main.tf` |
| Add or fix an example in one Pulumi language | pulumi examples | that language's folder, then mirror it to the other five |
| Fix the CI pipeline | examples | `.github/workflows/ci.yml` |
| Report a provider bug | provider repo | an issue on [terraform-provider-biznetgio](https://github.com/shirasakaren/terraform-provider-biznetgio/issues) or [pulumi-biznetgio](https://github.com/shirasakaren/pulumi-biznetgio/issues) |
## The provider repos, briefly
The two provider repos are Go codebases that implement the [Biznet GIO API](https://api.portal.biznetgio.com/v1/docs) for Terraform and Pulumi respectively. You usually do not need to touch them: everything a user-facing change needs is visible through the examples and the reference pages. When a provider bug affects the examples or docs, file the issue on the provider repo first, then fix the example or docs page to match the provider's actual behavior, exactly like the [GPU keypair fix](/pulumi/resources/gpu) described in the Pulumi examples README.
# Local setup
Source: https://biznetgio.creations.ren/contribute/setup
Tools, accounts, and tokens you need before contributing, with every version this project pins
This page gets your machine ready to contribute to any of the three repos. Total time is about twenty minutes the first time, and everything here is free.
## Accounts
All contribution happens through GitHub. Sign in at [github.com](https://github.com), then [fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) the repo you want to change. You never push directly to the main repos; you push to your fork and open a pull request.
The providers talk to Biznet GIO with an API token, created from the portal as described in [Authentication](/authentication). You only need this to run `plan`, `apply`, `preview`, or `up`. Static checks like `terraform validate` and `pulumi preview` with mocks work without it.
Running the Pulumi examples with real state requires a free [Pulumi Cloud](https://www.pulumi.com/docs/iac/concepts/state/) account, and the CI pipeline needs a personal access token from it. Skip this until you actually run something.
## Tooling
Install exactly the versions this project uses. The CI pipelines pin the same ones, so a change that builds on your machine builds in CI:
| Tool | Version | Where it is pinned | Install link |
| -------------- | ------------ | ----------------------------- | ---------------------------------------------------------------------------- |
| Git | any recent | not pinned | [git-scm.com](https://git-scm.com/downloads) |
| Terraform | 1.0 or newer | `versions.tf` in every folder | [developer.hashicorp.com](https://developer.hashicorp.com/terraform/install) |
| Pulumi CLI | current | not pinned | [pulumi.com](https://www.pulumi.com/docs/iac/cli/) |
| Node.js | 20 | CI `node-version` | [nodejs.org](https://nodejs.org/en/download) |
| Python | 3.11 | CI `python-version` | [python.org](https://www.python.org/downloads/) |
| Go | 1.25.x | `go.mod` and CI `go-version` | [go.dev](https://go.dev/doc/install) |
| .NET SDK | 8.0.x | `.csproj` `net8.0` and CI | [dotnet.microsoft.com](https://dotnet.microsoft.com/en-us/download) |
| Java (Temurin) | 17 | `pom.xml` and CI | [adoptium.net](https://adoptium.net/) |
| Maven | current | not pinned | [maven.apache.org](https://maven.apache.org/install.html) |
| Mintlify CLI | current | not pinned | `npm i -g mint` |
Go 1.25 is not a typo. The Pulumi Go SDK's `go.mod` declares a recent toolchain requirement, so older Go versions refuse to build. If you see a `go: go.mod requires go >= 1.25` error, update Go.
You do not need all six Pulumi language toolchains. Install the one you want to contribute in. The CI pipeline runs all six for you anyway.
## Cloning and first run
The three repos are plain git clones:
```bash theme={null}
git clone https://github.com/shirasakaren/biznetgio-docs.git
git clone https://github.com/shirasakaren/biznetgio-example-terraform.git
git clone https://github.com/shirasakaren/biznetgio-example-pulumi.git
```
These commands clone the upstream repos directly. If you plan to send a pull request, fork first and clone your fork instead, the same way.
Then verify each one works on your machine.
### Docs site
```bash theme={null}
cd biznetgio-docs
npm i -g mint # one time, installs the Mintlify CLI
mint dev # preview at http://localhost:3000
```
Every saved change hot-reloads. The local preview is the best way to check MDX before committing.
### Terraform examples
```bash theme={null}
cd biznetgio-example-terraform/object-storage
terraform fmt -check
terraform init
terraform validate
```
All three commands must pass. They need no credentials; `terraform validate` is a static check that never calls the Biznet GIO API.
### Pulumi examples
One build command per language, from inside the example folder:
```bash theme={null}
cd biznetgio-example-pulumi/typescript/neolite
npm install && npx tsc --noEmit
cd ../../python/neolite
pip install -r requirements.txt
cd ../../go/neolite
go build ./...
cd ../../dotnet/neolite
dotnet build
cd ../../java/neolite
mvn -q compile
```
YAML needs no build; any YAML parser accepting `yaml/neolite/Pulumi.yaml` is the check.
## CI secrets, for maintainers
The example repos' pipelines run on manual dispatch and most actions need repo secrets. Configure these in your fork's `Settings > Secrets and variables > Actions` if you want to run the full pipelines from your own fork:
| Secret | Where | Needed by |
| -------------------------- | ------------------ | ----------------------------------------------------------------------- |
| `BIZNETGIO_API_KEY` | both example repos | `plan`/`apply`/`destroy` (Terraform), `preview`/`up`/`destroy` (Pulumi) |
| `EXAMPLE_CONSOLE_PASSWORD` | terraform examples | `plan`/`apply`/`destroy` on folders that take a console password |
| `PULUMI_ACCESS_TOKEN` | pulumi examples | `preview`/`up`/`destroy` |
Never set these unless you mean it. `apply`, `up`, and `destroy` place real orders on the account whose token you configure, which is exactly why the pipelines are manual only. See [Pipelines](/contribute/pipelines) for the full explanation.
## You are ready
From here, read [Conventions](/contribute/conventions) so your first change matches the house style, then pick a walkthrough from the [step-by-step guide](/contribute/walkthroughs).
# Terraform repo guide
Source: https://biznetgio.creations.ren/contribute/terraform-guide
How the Terraform examples work file by file, what the module does, and how to add a new example
This is the deep dive into [biznetgio-example-terraform](https://github.com/shirasakaren/biznetgio-example-terraform). It assumes you have read [What is Infrastructure as Code?](/what-is-iac) or know what a Terraform plan is. If a term confuses you, the [NEO Lite reference](/terraform/resources/neolite) documents every resource and data source used here.
## What Terraform code is, in one paragraph
A Terraform configuration is a set of declarations, not a script. You write what should exist (a VM with this name, this OS, this keypair) and Terraform figures out the API calls needed to get there. Resources are the things to create; data sources are read-only lookups into what already exists. Everything is connected by references, like `biznetgio_neolite_keypair.main.keypair_id` meaning "the keypair id attribute of the keypair named main". Terraform reads those references, orders the API calls, and shows you a plan before doing anything.
## The five files of every folder
Every example folder has the same anatomy, which is also the standard layout the [project structure tutorial](/tutorials/project-structure) teaches:
### versions.tf
```hcl theme={null}
terraform {
required_version = ">= 1.0"
required_providers {
biznetgio = {
source = "registry.terraform.io/shirasakaren/biznetgio"
version = "0.1.0"
}
}
}
provider "biznetgio" {}
```
Two jobs. First, pinning: `terraform init` downloads exactly provider version 0.1.0 from the Terraform Registry so the example always runs against the version it was tested with. Second, wiring: the empty provider block reads `BIZNETGIO_API_KEY` from the environment, which is why no credentials ever appear in a file.
### variables.tf
Every input the folder accepts, declared with types and defaults:
```hcl theme={null}
variable "console_password" {
type = string
sensitive = true
}
variable "pay_with_credit_card" {
type = bool
default = false
}
```
`console_password` deliberately has no default: a real password must never be hardcoded in a committed file, so the only way in is `TF_VAR_console_password` or the gitignored `terraform.tfvars`. `pay_with_credit_card` defaults to `false` everywhere, the cost safety rule from [Conventions](/contribute/conventions).
### terraform.tfvars.example
A template of real values, committed, that you copy to the gitignored `terraform.tfvars` and fill in. The `.example` file never contains a real secret, only the shape of one.
### main.tf
The infrastructure itself. The `neolite/main.tf` example walks through the whole product in the order you would use it:
1. **Catalog lookups.** `data "biznetgio_neolite_products" "all"` reads every package Biznet GIO currently sells, and a `locals` block picks the first one for the demo. A second data source, `biznetgio_neolite_os_list`, lists the OS images for that product, and a third checks IP availability. The VM's `select_os` comes from this list, so the example never hardcodes a product id or OS name that could stop existing.
2. **The keypair.** `biznetgio_neolite_keypair.main` is created with just a name. The private key comes back exactly once, at create time, and the example exports it as an output with a comment telling you to save it immediately.
3. **The VM.** `biznetgio_neolite_vm.main` pulls its `product_id` from the products lookup, its `select_os` from the OS list, and its `keypair_id` from the keypair. Destructive options like `power_state`, `rebuild_os`, and `migrate_to_pro` are present but commented out, each with a comment naming its cost or danger.
4. **The extra disk.** `biznetgio_neolite_disk.extra` attaches to the VM via `neolite_account_id = biznetgio_neolite_vm.main.id`, and its `service_name` is `extra-disk`, short enough for the 6 to 16 character limit.
5. **Snapshot and restore.** A paid snapshot of the VM, then `biznetgio_neolite_vm_from_snapshot.restored` turns it into a second VM with a separate bill. This chain of references, snapshot id into restore, is how Terraform expresses "this depends on that".
6. **Raw lookups.** Two data sources return unmodeled JSON from the upstream API, exposed as outputs for poking around from the CLI.
Read the comments in the file itself; every one of these steps is explained line by line in both languages.
### outputs.tf
```hcl theme={null}
output "vm_status" {
value = biznetgio_neolite_vm.main.status
}
```
Outputs are what you inspect after apply and what other code consumes. Sensitive values like the keypair private key are marked `sensitive = true` so they never print casually.
## The module in complete/
`complete/` shows the same production shape as the [Capstone tutorial](/tutorials/production-deployment): an app tier (NEO Lite Pro VM) plus a data bucket (Object Storage), bundled as a reusable module.
The root `complete/main.tf` only does lookups and configuration: it reads the product catalog, picks an OS, and calls the module:
```hcl theme={null}
module "app" {
source = "./modules/app-stack"
name = "example-app"
storage_label = "example-app"
vm_product_id = data.biznetgio_neolite_pro_products.all.products[0].product_id
select_os = data.biznetgio_neolite_pro_os_list.ubuntu.oss[0].name
storage_product_id = 8
cycle = "m"
ssh_and_console_user = "adminuser"
console_password = var.console_password
pay_with_credit_card = var.pay_with_credit_card
}
```
Like every quickstart and tutorial on this site, `vm_product_id` and `select_os` here take `products[0]`/`oss[0]` for a runnable demo, not a deliberate choice - if you copy this module, replace them with a name filter first; see [Understanding the product catalog](/products/overview) and the [NEO Lite Pro catalog](/products/neolite-pro) for real pricing and the exact filter syntax.
A module is a folder of the same five files called with arguments instead of declared inline. Everything about "one app" moves into `modules/app-stack/`: the keypair, the VM, the storage subscription, the bucket, and the credential. Its `variables.tf` documents each input, including the 6 to 16 character limits. Its `outputs.tf` marks the access key, secret key, and private key as sensitive, because the module's caller owns the responsibility for saving them.
Two details worth knowing before you copy this module:
* The child module has its own `required_providers` block with the same `registry.terraform.io/shirasakaren/biznetgio` source. Without it, Terraform assumes the default `hashicorp/*` namespace for providers inside child modules and fails with a missing provider error. If you move a module out of this repo, keep that block.
* The module's `storage_label` variable is separate from `name` on purpose. The VM name and the storage label both have 6 to 16 character limits, but they are validated separately by the API, so the module keeps them as independent knobs.
## The GPU quirks
`gpu/main.tf` documents two real quirks that exist because of how the upstream API is shaped:
* `biznetgio_gpu_keypair` exports no `keypair_id` attribute, only `id`, which already is the keypair id. The instance references `biznetgio_gpu_keypair.main.id`, unlike every other keypair resource in the repo.
* `subscription` and `on_demand` are object typed attributes, not blocks. They are assigned with `=`, and exactly one of them must be set. The example uses `subscription = { cycle = "m" }` and keeps an `on_demand` alternative commented out.
Both quirks were discovered by compiling these examples and are now documented on the [Terraform GPU reference](/terraform/resources/gpu). That loop, examples catching provider and docs bugs, is described in [How the repos are organized](/contribute/repositories).
## baremetal/ and object-storage/, briefly
`baremetal/` shows the NEO Metal flow: a server with a bundled public IP, an additional floating IP ordered and then assigned to the server, and elastic storage bound to the server at creation time. It also looks up valid rebuild OS images and the OpenVPN out-of-band access config. It is the most expensive line, so its README carries an extra cost warning.
`object-storage/` shows the cheapest flow: subscription, bucket, credential, and a one-file upload (`index.html`) through the control plane API. Its comments note that the upload endpoint is fine for one small file, and anything bulk should use real S3 tooling with the credential.
## Adding a new example folder
Say you want a new product example, or a second flavor of an existing one. The steps:
Copy the product folder that resembles what you want, into a new folder named after the example. Start from `object-storage/` for anything simple, from `complete/` if you want the module pattern.
Keep the header banner and the bilingual comments. Keep every cost safety rule: `pay_with_credit_card` defaulting to `false`, destructive options commented out, secrets only through variables.
Run `terraform validate` and watch for errors about `vm_name`, `service_name`, or `label`. The limits are 6 to 16 characters for those fields; if validation fails, shorten the names.
Add the folder's row to the root README table (resources and data sources counts must be right), and write the folder's own README following the bilingual format of the others.
Add the folder name to the `example` input's `options:` list and to the `discover` job's list in `.github/workflows/ci.yml`, as [Pipelines](/contribute/pipelines) describes.
From inside the new folder run `terraform fmt -check`, `terraform init`, and `terraform validate`. Then open the PR and fill the checklist in the PR template.
If the new example teaches something the docs site does not cover yet, consider a reference page update in the same PR, in both languages.
For the exhaustive file-by-file reference of every folder, including the complete module internals and the full inventory of one-shot options, see the [Complete code walkthrough](/contribute/code-walkthrough).
# Step-by-step walkthroughs
Source: https://biznetgio.creations.ren/contribute/walkthroughs
Five complete contribution scenarios with every command, from a docs typo to a new language
The previous pages explain the rules. This page turns them into five complete runs you can follow exactly, in order of difficulty. Each assumes you have done [Local setup](/contribute/setup).
## Scenario 1: fix a typo on the docs site
The smallest possible contribution, good for learning the fork and PR flow.
Fork [biznetgio-docs](https://github.com/shirasakaren/biznetgio-docs) if you plan to send a PR, then clone:
```bash theme={null}
git clone https://github.com/shirasakaren/biznetgio-docs.git
cd biznetgio-docs
git checkout -b docs/fix-typo
```
The command clones upstream; to push a branch, clone your fork from your fork's page the same way.
Say the typo is on `/quickstart`. The English copy is `quickstart.mdx`, the Indonesian copy is `id/quickstart.mdx`. Fix the English first, then apply the equivalent fix to the Indonesian page. If the Indonesian sentence does not exist verbatim, fix the meaning, not the words.
```bash theme={null}
npm i -g mint # one time
mint dev # open http://localhost:3000/quickstart
```
Check both languages with the language switcher in the top bar.
```bash theme={null}
git add quickstart.mdx id/quickstart.mdx
git commit -m "docs: fix typo in quickstart"
git push origin docs/fix-typo
```
Open the PR against the upstream `main`. Mention which page and which language. The maintainer squash merges, and the Mintlify app redeploys the site from `main` automatically within minutes.
## Scenario 2: add a new Terraform example
Say the provider gained a new data source for NEO Lite and you want an example showing it.
```bash theme={null}
git clone https://github.com/shirasakaren/biznetgio-example-terraform.git
cd biznetgio-example-terraform
git checkout -b feat/neolite-new-datasource
```
This clones upstream directly; fork first and clone your fork if you will push a branch.
If the data source belongs in the existing NEO Lite story, add it to `neolite/main.tf` with the bilingual banner and section comments, following [Conventions](/contribute/conventions). Reference it from a resource or an output so it is actually exercised.
```bash theme={null}
cd neolite
terraform fmt -check
terraform init
terraform validate
```
Fix everything until all three pass. If the provider has a name limit on something you added, shorten the name.
The root README table says `neolite/` covers "all 5" data sources; bump the count. If the docs site has a page showing NEO Lite data sources, update `terraform/resources/neolite.mdx` and `id/terraform/resources/neolite.mdx` in the docs repo.
```bash theme={null}
git commit -am "feat(neolite): use the new data source in the example"
git push origin feat/neolite-new-datasource
```
Fill the PR template checklist honestly, including the README and docs sync boxes.
## Scenario 3: add a new Pulumi example in TypeScript
```bash theme={null}
git clone https://github.com/shirasakaren/biznetgio-example-pulumi.git
cd biznetgio-example-pulumi
git checkout -b feat/new-example
cp -r typescript/object-storage typescript/my-new-thing
```
This clones upstream directly; fork first and clone your fork if you will push a branch.
Edit `typescript/my-new-thing/index.ts`: new banner, new resources, same rules. Set the project name in `Pulumi.yaml` to `biznetgio-example-my-new-thing` and fix the `name` field in `package.json` to match. Keep `payWithCreditCard` defaulting to `false`, one-shot options commented out, and `toAccountId` wherever an id meets a number typed input.
```bash theme={null}
npm install
npx tsc --noEmit
```
Type errors at this stage are almost always a missed `toAccountId` or a property that does not exist, like `keypairId` on `GpuKeypair`. The [Pulumi repo guide](/contribute/pulumi-guide) lists the known ones.
Copy the equivalent existing example in each language and translate the program the same way. YAML gets the flat version. Comments stay identical in spirit, the same bilingual format everywhere.
Root README table, the per-folder READMEs, and the three CI edit points from [Pipelines](/contribute/pipelines). Then fill the PR checklist and open the PR against upstream `main`.
## Scenario 4: mirror an existing example into a new Pulumi language
The mechanics of the "other five languages" step from Scenario 3, done properly for one language:
1. Pick the language you know and copy the six folders of an existing language, renaming nothing yet.
2. For each folder, replace the program file with the new language's version, keeping the bilingual comments. Translate the structure, never invent behavior: same resources, same defaults, same order.
3. Write the new language's dependency file with the pinned versions from [Conventions](/contribute/conventions).
4. Build each folder with the language's command from [Local setup](/contribute/setup), fixing type errors one by one.
5. Update the root README only if it lists language coverage, and add the language to the CI in the three places [Pipelines](/contribute/pipelines) names.
If the whole thing is a new language rather than a mirror, open a feature request first per [Communication](/contribute/communication).
## Scenario 5: report a bug you found while using an example
You ran `terraform plan` in `gpu/` and got an error you cannot explain.
1. Search the repo's issues and Discussions for the error text first.
2. Check the docs page for that resource; the [GPU quirks](/terraform/resources/gpu) are documented on purpose.
3. If it is new, open a bug issue through the [bug report form](/contribute/issues). Fill in the example folder, your Terraform version, the exact commands, the full error output, and what you expected.
4. Wait for triage. If the maintainer says it is a provider bug, they will move it to the provider repo, and you can follow the fix there.
5. If you also know the fix for the example or docs, say so in the issue, then send the PR once the issue confirms the direction.
## What to do when you are stuck
* Re-read the [Terraform repo guide](/contribute/terraform-guide) or [Pulumi repo guide](/contribute/pulumi-guide) for the area you are touching.
* Open a Discussion with your current code and the error. That is exactly what Discussions are for.
* Keep the PR draft while you figure it out; the review thread is a fine place to ask once the PR exists.
# Billing and orders
Source: https://biznetgio.creations.ren/guides/billing
How cycles, promocodes, and credit-card charging work in both providers
Every create and upgrade call in these providers places a **real paid order** on your Biznet GIO account. There is no dry-run mode.
## `cycle` values
| Value | Meaning | Where |
| ----------- | ---------------------- | ----------------------------------- |
| `m` | monthly | all services |
| `a` | annually | all services |
| `q` | quarterly | NEO Lite / Lite Pro, Object Storage |
| `s` | semi-annual | NEO Lite / Lite Pro, Object Storage |
| `b` | biennial | NEO Lite / Lite Pro, Object Storage |
| `t` | triennial | NEO Lite / Lite Pro, Object Storage |
| `p4` / `p5` | 4-year / 5-year prepay | NEO Lite / Lite Pro, Object Storage |
NEO Metal and NEO GPU accept only `m` and `a`. GPU instances can bill hourly instead, via the on-demand mode (`on_demand` block / `onDemand` input) instead of a cycle.
## `pay_with_credit_card`
Both providers default `pay_with_credit_card` / `payWithCreditCard` to `true`: the invoice for the order is charged to your credit card immediately.
Set it to `false` to place the order without paying:
* The resource is created but stays `Pending` until the invoice is paid in the [portal](https://portal.biznetgio.com).
* The providers poll for `Active` and will wait (up to the create timeout) for payment.
* Resources that stay `Pending` past the timeout surface a create error with partial state; once you pay in the portal, the next apply/up resumes.
## Promocodes
Pass `promocode` (Terraform) / `promocode` (Pulumi) at creation to apply a portal promo. Promocodes are create-only - changing one replaces the resource.
## Grow-only sizing
Storage-sized attributes can only increase; shrinking fails validation:
| Resource | Attribute | Unit | Upgrade API call |
| ------------------- | ------------------------ | -------------------- | ----------------------- |
| NEO Lite / Pro VM | `disk_size` / `diskSize` | GB (absolute target) | change-storage |
| NEO Lite / Pro disk | `size` | GB | sends the **increment** |
| NEO Elastic Storage | `size` | GB | upgrade (increment) |
| Object Storage | `quota` | GB | sends the **increment** |
To shrink, you must recreate the resource (which deletes the server/disk/instance and its data).
## `raw` outputs and invoices
Every resource exports a `raw` secret output - the last API response JSON, with credentials redacted. Invoice details also surface on VM resources: `last_invoice` (Terraform) / `lastInvoice` (Pulumi) carries `id`, `status`, `date`, `duedate`, `paybefore`, `datepaid`, and `invoice_type`.
# Development
Source: https://biznetgio.creations.ren/guides/development
Build, test, and contribute to the Biznet GIO providers
Both providers are Go projects maintained in separate repositories. This guide covers the local development workflow for each.
## Terraform provider
Repository: [shirasakaren/terraform-provider-biznetgio](https://github.com/shirasakaren/terraform-provider-biznetgio) · Go 1.25 · Terraform Plugin Framework (protocol 6.0) · MPL-2.0
```bash theme={null}
git clone https://github.com/shirasakaren/terraform-provider-biznetgio.git
cd terraform-provider-biznetgio
make build # go build ./... - writes ./terraform-provider-biznetgio in the repo root, not a bin/ folder
make install # go install into GOPATH/bin, for use with dev_overrides
make lint # golangci-lint
make test # unit tests
make testacc # acceptance tests (TF_ACC=1, hits the real API, 120m timeout)
make generate # regenerate docs/ with terraform-plugin-docs
```
Point Terraform at a development binary via `dev_overrides` in your CLI config file (see [Installation](/terraform/installation) for an example).
Layout: `internal/provider/` (resources, data sources, provider schema), `internal/biznetgio/` (API client), `examples/` (provider/resource/data-source examples used to generate docs), `docs/` (generated reference).
Acceptance tests need `BIZNETGIO_API_KEY` exported; creates place **real orders** on the account.
## Pulumi provider
Repository: [shirasakaren/pulumi-biznetgio](https://github.com/shirasakaren/pulumi-biznetgio) · Go 1.25 · `pulumi-go-provider` (native provider) · Apache-2.0
```bash theme={null}
git clone https://github.com/shirasakaren/pulumi-biznetgio.git
cd pulumi-biznetgio
make provider # builds only bin/pulumi-resource-biznetgio - just the Go provider binary
make build # builds the provider AND regenerates + builds all five SDKs
make install # copies the provider binary into GOPATH/bin and links the Node and .NET SDKs
make lint
make test_provider # provider unit tests
make build_nodejs # regenerate schema, rebuild the provider, then build the TypeScript SDK
```
`make build` does not just build the Go provider - it also builds all five language SDKs (`dotnet_sdk go_sdk nodejs_sdk python_sdk java_sdk`), which needs `dotnet`, `yarn`/Node, `python3`, and `gradle` installed locally in addition to Go. If you only want the provider binary, use `make provider` instead. `make build_nodejs` also has hidden prerequisites: it regenerates the Pulumi schema first, which needs the `pulumi` CLI and `jq`, and rebuilds the provider binary before touching the nodejs SDK.
Layout: `provider/` (resources, functions, config), `provider/client/` (API client), `sdk/` (generated nodejs/python/go/dotnet/java SDKs), `examples/` (one program per language against the local SDK), `tests/` (unit tests).
Local development uses the language SDKs in `sdk/` - point example projects at them via `file:../../sdk/nodejs/bin` (Node) or `pip install -e sdk/python`.
## API reference
Both providers wrap the [Biznet GIO Portal API](https://api.portal.biznetgio.com/v1/docs). The staging environment (`https://api.portal.biznetgio.dev/v1`) is available for testing new endpoints.
## Contributing
Open issues and pull requests in the respective repository:
* [terraform-provider-biznetgio](https://github.com/shirasakaren/terraform-provider-biznetgio)
* [pulumi-biznetgio](https://github.com/shirasakaren/pulumi-biznetgio)
* [biznetgio-docs](https://github.com/shirasakaren/biznetgio-docs) (this site)
# FAQ
Source: https://biznetgio.creations.ren/guides/faq
Common questions and troubleshooting for the Biznet GIO providers
## Configuration
Terraform: set `api_key` in the provider block or export `BIZNETGIO_API_KEY`. Pulumi: run `pulumi config set --secret biznetgio:apiToken ` or export `BIZNETGIO_API_KEY`. Tokens are issued from the [portal](https://portal.biznetgio.com) - see [Authentication](/authentication).
Yes. Set `BIZNETGIO_BASE_URL=https://api.portal.biznetgio.dev/v1` (Terraform `base_url` / Pulumi `biznetgio:baseUrl` override it per-configuration).
An unpaid invoice keeps resources `Pending`. With `pay_with_credit_card = false` the order is placed without payment - pay it in the [portal](https://portal.biznetgio.com), then run apply/up again; the providers resume polling. See [Billing](/guides/billing).
## Secrets and state
The API returns those values only once, at creation. Both providers preserve them in state across refreshes. If they are lost from state (e.g. a fresh import), you cannot recover them - create a new keypair/credential.
No. `api_key`/`apiToken`, passwords, and key material are marked sensitive, and every `raw` JSON output is redacted - values under keys like `password`, `private_key`, `secret_key`, `token`, and `pem` are masked as `***` before entering state.
`raw` holds the last API response JSON (redacted). The upstream API publishes no response schemas for some endpoints, so `raw` is the escape hatch for anything unmodeled - e.g. the change-package and storage-upgrade option data sources expose only `raw`.
## Resources
No. Keypair pools are per service (NEO Lite, NEO Lite Pro, NEO Metal, NEO GPU), and ids are not interchangeable. Create one keypair resource per service.
Use the rebuild action: `rebuild_os` / `rebuildOs` on NEO Lite/Pro/Metal, or `rebuild_trigger` / `rebuildTrigger` on GPU. This is destructive - the disk is wiped. See [Triggers](/guides/triggers).
Set `migrate_to_pro` / `migrateToPro` on the NEO Lite VM to the target NEO Lite Pro `product_id`. It's a one-shot action - change the value to re-fire.
Storage is grow-only on this API. Recreate the resource to shrink (destroys the data).
Only for small, one-off uploads. The control-plane upload path isn't built for bulk data - use S3-compatible tooling with the credential resource against `nos..neo.id` endpoints instead.
Anything without a public portal API: NEO Virtual Compute, NEO Kubernetes, NEO DNS, domains, web hosting, NEO Sense, GIO Private, GIO Enterprise Cloud, and backup products. Manage those from the [portal](https://portal.biznetgio.com) or the official CLI (`npx @biznetgio/cli`).
## Operations
Most creates poll every 5 seconds until the resource reports `Active` - typically 1-5 minutes, capped by the create timeout (20m default in Terraform).
Yes. On timeout the provider returns an initialization error with partial state, and the next `pulumi up` resumes from where it left off.
`gpuConsole` mints a new session on every read - it's an action, not a pure lookup. Keep it out of values evaluated during plan diffing.
## Support
* Biznet GIO support: [support@biznetgio.com](mailto:support@biznetgio.com)
* Terraform provider issues: [github.com/shirasakaren/terraform-provider-biznetgio/issues](https://github.com/shirasakaren/terraform-provider-biznetgio/issues)
* Pulumi provider issues: [github.com/shirasakaren/pulumi-biznetgio/issues](https://github.com/shirasakaren/pulumi-biznetgio/issues)
* Documentation issues: [github.com/shirasakaren/biznetgio-docs/issues](https://github.com/shirasakaren/biznetgio-docs/issues)
# Triggers and actions
Source: https://biznetgio.creations.ren/guides/triggers
One-shot actions and declarative power state in both providers
Some API operations are one-off actions with no idempotent "get" - reset, rebuild, migration, hour reservation. Both providers model these as **trigger strings**: the action fires only when the value *changes*, and you re-fire it by changing the value again.
## One-shot triggers
| Action | Terraform attribute | Pulumi input | Resource |
| ----------------------------- | ---------------------------------- | ------------------------------- | ------------------------------------- |
| Reset / reboot | `reset_trigger` | `resetTrigger` | baremetal |
| OS rebuild (wipe + reinstall) | `rebuild_os` | `rebuildOs` | baremetal, neolite VM, neolite pro VM |
| GPU OS rebuild | `rebuild_trigger` | `rebuildTrigger` | gpu instance |
| GPU reserve additional hours | `reserve_additional_hours_trigger` | `reserveAdditionalHoursTrigger` | gpu instance |
| Migrate to NEO Lite Pro | `migrate_to_pro` | `migrateToPro` | neolite VM |
### Terraform
```hcl theme={null}
resource "biznetgio_neolite_vm" "main" {
# ...
rebuild_os = "ubuntu-22" # fires once, when the value changes
}
```
To rebuild again, change the value - a common pattern is timestamps or counters:
```hcl theme={null}
rebuild_os = "ubuntu-22#${timestamp()}"
```
Rebuilds wipe the VM disk. Use them deliberately.
### Pulumi
```typescript theme={null}
const vm = new biznetgio.NeoliteVm("demo-vm", {
// ...
rebuildOs: "ubuntu-22", // fires when this string changes
});
```
Change the string to re-fire - e.g. `rebuildOs: "ubuntu-22-" + Date.now()` (computed at program evaluation).
## Declarative power state
Power actions are *declarative*, not triggers: the provider calls the API only when the desired state differs.
| Service | Values | Terraform | Pulumi |
| -------------- | -------------------------------------------- | ------------- | ------------ |
| NEO Lite / Pro | `start` `stop` `suspend` `resume` `shutdown` | `power_state` | `powerState` |
| NEO Metal | `on` `off` | `power_state` | `powerState` |
```hcl theme={null}
resource "biznetgio_neolite_vm" "main" {
# ...
power_state = "stop"
}
```
```typescript theme={null}
const vm = new biznetgio.NeoliteVm("demo-vm", {
// ...
powerState: "stop",
});
```
If the portal (or someone else) changes the power state out of band, the next apply/up reconciles it.
## Side-effecting data sources
`gpu_console` / `gpuConsole` mints a new one-time console session on every read. Treat it as an action, not as a lookup: reference it where a fresh session is wanted, and never inside values evaluated during plan diffing.
# Introduction
Source: https://biznetgio.creations.ren/index
Manage Biznet GIO cloud infrastructure with Terraform and Pulumi
Biznet GIO is an Indonesian cloud provider offering VPS (NEO Lite), bare-metal servers (NEO Metal), GPU instances (NEO GPU), and S3-compatible object storage (NEO Object Storage).
**Unofficial, community-maintained project.** These providers and this documentation are built by [Shirasaka Ren](/about) and are **not affiliated with or endorsed by PT Biznet Gio Nusantara** - Biznet GIO and NEO are trademarks of their respective owners. Use at your own risk; every create/upgrade places a real paid order on your account.
This site documents two Infrastructure-as-Code providers that wrap the [Biznet GIO Portal API](https://api.portal.biznetgio.com/v1/docs):
* **Terraform** - `biznetgio` provider (`registry.terraform.io/shirasakaren/biznetgio`), protocol 6.0 (Plugin Framework), requires Terraform ≥ 1.0
* **Pulumi** - `biznetgio` provider (native Go, `pulumi-go-provider`), SDKs for TypeScript, Python, Go, .NET, and Java
Both providers share the same API surface, the same authentication model, and the same semantics - pick the tool you already use.
**New to all of this?** Start with [What is Infrastructure as Code?](/what-is-iac), a from-scratch explainer of IaC, Terraform, and Pulumi.
## What you can manage
| Service | Product | Resources | Catalog data sources |
| ----------------- | -------------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `neolites` | NEO Lite VPS | VM, keypair, snapshot, VM from snapshot, additional disk | products, OS list, change-package options, storage upgrade options, IP availability |
| `neolite-pros` | NEO Lite Pro VPS | VM, keypair, snapshot, additional disk | products, OS list, change-package options, storage upgrade options, IP availability |
| `baremetals` | NEO Metal bare-metal | server, keypair, additional IP, IP assignment, elastic storage | products, rebuild OS list, OpenVPN config |
| `neo-gpus` | NEO GPU | instance, keypair | products, console access, monitoring graph |
| `object-storages` | NEO Object Storage | instance, bucket, credential, object | instances, buckets, credentials |
Each provider exposes **20 resources** and **19 data sources / functions** covering these five API groups. Products without a public API (NEO Virtual Compute, NEO Kubernetes, NEO DNS, web hosting, GIO Private, GIO Enterprise Cloud, NEO Backup) are out of scope.
New to infrastructure as code? Start here for the full picture.
Spin up a NEO Lite VM with Terraform in about five minutes.
Spin up a NEO Lite VM with Pulumi in about five minutes.
API tokens, environment variables, and how requests are authenticated.
npm, PyPI, NuGet, Maven Central, Go, and the Terraform Registry, all in one place.
What `products[0]` and `oss[0]` actually resolve to, real pricing per package, and how to pick a specific one on purpose.
From a single quickstart file to a reviewed, CI-deployed production stack, one tutorial at a time.
Two repositories with every resource as a runnable, commented example, ready to copy as a template.
Conventions, templates, pipelines, and step-by-step walkthroughs for collaborating on this project.
Shirasaka Ren - who builds and maintains these providers, and how to support the work.
The upstream Biznet GIO Portal API documentation (Swagger UI).
## Repositories
| Project | Repository | License |
| ------------------ | --------------------------------------------------------------------------------------------------------- | ---------- |
| Terraform provider | [shirasakaren/terraform-provider-biznetgio](https://github.com/shirasakaren/terraform-provider-biznetgio) | MPL-2.0 |
| Pulumi provider | [shirasakaren/pulumi-biznetgio](https://github.com/shirasakaren/pulumi-biznetgio) | Apache-2.0 |
| Terraform examples | [shirasakaren/biznetgio-example-terraform](https://github.com/shirasakaren/biznetgio-example-terraform) | MIT |
| Pulumi examples | [shirasakaren/biznetgio-example-pulumi](https://github.com/shirasakaren/biznetgio-example-pulumi) | MIT |
| This documentation | [shirasakaren/biznetgio-docs](https://github.com/shirasakaren/biznetgio-docs) | MIT |
## Where to go next
* [Quickstart](/quickstart) - first resource with Terraform
* [Pulumi quickstart](/pulumi-quickstart) - first resource with Pulumi
* [Authentication](/authentication) - get an API token from the [portal](https://portal.biznetgio.com)
* [Product Catalog](/products/overview) - real pricing, real specs, and how to pick a specific package or OS instead of trusting index `[0]`
* [Tutorials](/tutorials/project-structure) - once the quickstart works, the full path from there to a production deployment with CI/CD
* [Example repos](/tutorials/examples) - complete runnable examples of every resource, in both tools, ready to copy as a template
* [Contribute](/contribute/introduction) - how the project is organized and how to contribute to the providers, examples, and docs
Every create or upgrade call places a **real paid order** on your Biznet GIO account. Read the [billing guide](/guides/billing) before automating anything.
# NEO Metal catalog and pricing
Source: https://biznetgio.creations.ren/products/baremetal
Every NEO Metal server SKU, why the catalog data source only gives you a name and raw JSON, and how to work with that
NEO Metal is Biznet GIO's dedicated bare-metal line. This page is about **what to order and why** - for the resource schema and full code, see the [Terraform](/terraform/resources/baremetal) and [Pulumi](/pulumi/resources/baremetal) reference pages. Read [Understanding the product catalog](/products/overview) first for why `[0]` indexing is risky in general.
Two of the SKUs below (`a1.small.gpu.x86`, `a1.medium.gpu.x86`) have a GPU card in the chassis, but they are ordered through **this same `biznetgio_baremetal` resource** - not `biznetgio_gpu_instance`. That resource is for a completely different product, [NEO GPU](/products/gpu), Biznet GIO's H200 GPU-as-a-Service line. A GPU-equipped bare-metal server is a whole physical machine you rent outright, with a GPU installed in it; NEO GPU is a shared-infrastructure GPU rental billed by subscription or by the hour. Do not confuse the two when deciding what to order.
## Pricing (source: [biznetgio.com/pricelist#neo-metal](https://www.biznetgio.com/pricelist#neo-metal))
| Package | Processor | CPU | RAM | Storage | Network | GPU | Price / month |
| ----------------- | --------------------- | ------------------- | ------ | ---------------------- | ------------- | --------- | ------------- |
| t1.small.x86 | Intel Xeon E-2278G | 8 cores (3.4 GHz) | 32 GB | SSD 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp4.699.000 |
| t2.small.x86 | Intel Xeon E-2388G | 8 cores (3.2 GHz) | 32 GB | SSD 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp4.699.000 |
| m1.small.x86 | AMD EPYC 7352 | 24 cores (2.3 GHz) | 64 GB | SSD 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp5.609.000 |
| a1.small.x86 | AMD EPYC 7302P | 16 cores (3.0 GHz) | 64 GB | SSD 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp5.699.000 |
| m2.small.x86 | AMD EPYC 7402P | 24 cores (2.8 GHz) | 64 GB | SSD 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp6.119.000 |
| a1.medium.x86 | AMD EPYC 7313P | 16 cores (3.0 GHz) | 128 GB | SSD 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp6.599.000 |
| m3.small.x86 | AMD EPYC 7443P | 24 cores (2.85 GHz) | 128 GB | SSD 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp7.199.000 |
| a1.small.gpu.x86 | AMD EPYC 7302P | 16 cores (3.0 GHz) | 64 GB | SSD 480 GB x2 (RAID1) | up to 10 Gbps | NVIDIA T4 | Rp9.899.000 |
| m1.medium.x86 | AMD EPYC 7702P | 64 cores (2.0 GHz) | 128 GB | SSD 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp10.559.000 |
| m4.medium.x86 | AMD EPYC 7643P | 48 cores (2.3 GHz) | 192 GB | SSD 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp10.559.000 |
| m1.large.x86 | AMD EPYC 7702P | 64 cores (2.0 GHz) | 256 GB | SSD 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp13.199.000 |
| a1.medium.gpu.x86 | AMD EPYC 9124 | 16 cores (3.0 GHz) | 128 GB | NVMe 480 GB x2 (RAID1) | up to 10 Gbps | NVIDIA L4 | Rp13.499.000 |
| m5.small.x86 | AMD EPYC 9355P | 32 cores (3.55 GHz) | 128 GB | NVMe 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp13.829.000 |
| t3.medium.x86 | Intel Xeon Gold 5220 | 36 cores (2.2 GHz) | 256 GB | SSD 960 GB x2 (RAID1) | up to 10 Gbps | - | Rp16.999.000 |
| t4.xlarge.x86 | Intel Xeon Gold 6238R | 56 cores (2.2 GHz) | 256 GB | SSD 960 GB x2 (RAID1) | up to 10 Gbps | - | Rp19.999.000 |
| n1.small.x86 | AMD EPYC 9634 | 84 cores (2.25 GHz) | 384 GB | NVMe 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp21.999.000 |
| m1.xlarge.x86 | AMD EPYC 9554P | 64 cores (3.1 GHz) | 512 GB | NVMe 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp22.799.000 |
| n2.small.x86 | AMD EPYC 9654P | 96 cores (2.4 GHz) | 384 GB | NVMe 480 GB x2 (RAID1) | up to 10 Gbps | - | Rp22.999.000 |
| m5.medium.x86 | AMD EPYC 9455P | 48 cores (3.15 GHz) | 256 GB | NVMe 960 GB x2 (RAID1) | up to 10 Gbps | - | Rp25.999.000 |
| t5.xlarge.x86 | Intel Xeon Gold 6238R | 56 cores (2.2 GHz) | 512 GB | SSD 960 GB x2 (RAID1) | up to 10 Gbps | - | Rp26.999.000 |
Public list prices, current as of this writing (all 20 tiers, verified directly against the live pricelist page's own data - some cached scrapes of this page only show a 10-tier subset). NEO Metal bills `m` (monthly) or `a` (annual) only - no other cycle. Confirm the actual charge against your own account's catalog output; see [the two price sources](/products/overview#two-different-prices-two-different-jobs).
## What `biznetgio_baremetal_products` actually gives you
Unlike NEO Lite and NEO Lite Pro, the bare-metal catalog is **not fully typed**. Each item only has:
| Field | Meaning |
| ------------- | ----------------------------------------------------------------------------------------- |
| `product_id` | The number `biznetgio_baremetal.product_id` / `BaremetalArgs.productId` actually uses |
| `name` | Product name, aliased from whichever of `name` / `product_name` / `label` the API returns |
| `description` | Free-text description, when present |
| `raw` | The full JSON of that product item, unmodeled |
There is no `options.cores`, no `memory`, no `storage` field to filter on programmatically. Two ways to work with that:
### Inspect `raw` (recommended for a first look)
`raw` carries whatever the API actually returned for that product, including fields the provider has not modeled yet - quite possibly CPU, RAM, and storage details matching the pricing table above.
```hcl theme={null}
data "biznetgio_baremetal_products" "all" {}
output "baremetal_catalog" {
value = [
for p in data.biznetgio_baremetal_products.all.products : {
product_id = p.product_id
name = p.name
raw = jsondecode(p.raw)
}
]
}
```
`terraform plan` prints every product's full decoded JSON body alongside its `product_id` and `name`.
```typescript theme={null}
import * as biznetgio from "@shirasakaren/biznetgio";
const products = biznetgio.baremetalProductsOutput();
export const baremetalCatalog = products.products.apply((items) =>
items.map((p) => ({
productId: p.productId,
name: p.name,
raw: JSON.parse(p.raw),
})),
);
```
The exact shape of that decoded JSON is not documented upstream and may vary by product - read what your own account actually returns rather than assuming a structure.
### Match on name (the only typed, filterable field)
The `name` values for NEO Metal read like literal SKU identifiers rather than marketing copy (`t2.small.x86`, `m5.small.x86`, and so on) - closer, and more likely to match exactly, than NEO Lite's more marketing-flavored `"XS 1.1"` style names. Still confirm the exact string against your own catalog output before hardcoding it.
```hcl theme={null}
locals {
matches = [
for p in data.biznetgio_baremetal_products.all.products :
p if p.name == "m3.small.x86" # confirmed against your own catalog output
]
m3_product_id = local.matches[0].product_id
}
resource "biznetgio_baremetal_keypair" "main" {
name = "neo-metal-key"
}
resource "biznetgio_baremetal" "main" {
product_id = local.m3_product_id
cycle = "m"
select_os = "ubuntu-22"
keypair_id = biznetgio_baremetal_keypair.main.keypair_id
label = "neo-metal-main"
public_ip = 1
}
```
```typescript theme={null}
const products = biznetgio.baremetalProductsOutput();
const m3ProductId = products.products.apply((items) => {
const match = items.find((p) => p.name === "m3.small.x86");
if (!match) throw new Error("no baremetal product named 'm3.small.x86' found");
return match.productId;
});
const keypair = new biznetgio.BaremetalKeypair("metal-keypair", { name: "neo-metal-key" });
const server = new biznetgio.Baremetal("metal-main", {
productId: m3ProductId,
cycle: "m",
selectOs: "ubuntu-22",
keypairId: keypair.keypairId,
label: "neo-metal-main",
publicIp: 1,
});
```
## Rebuild OS list
`biznetgio_baremetal_rebuild_os_list` / `baremetalRebuildOsList` takes the `account_id` of a server you already own and returns the valid OS values for `rebuild_os` / `rebuildOs` - a narrower list than "every OS this hardware could run," scoped to what fits that specific server's current disk layout. It returns a plain list of strings (for example `centos7-base`) plus `raw`. There is no equivalent list for the *initial* `select_os` at create time - that value is not validated against a data source at all; get it right from Biznet GIO's documentation or the portal before you order.
## NEO Elastic Storage
SAN storage volumes that attach to one NEO Metal server, ordered through `biznetgio_baremetal_elastic_storage` / `BaremetalElasticStorage`.
| Package | IOPS | Price |
| ----------------------------- | ------ | -------------------------- |
| NEO Elastic Storage | 5.000 | Rp220.000 / 100 GB / month |
| NEO Elastic Storage UltraFast | 10.000 | Rp330.000 / 100 GB / month |
Source: [biznetgio.com/pricelist#neo-elastic-storage](https://www.biznetgio.com/pricelist#neo-elastic-storage).
There is **no catalog data source at all** for elastic storage products, even though the upstream API has one (`GET /baremetal-neo-elastic-storages/products`). Discover it manually:
```bash theme={null}
curl -sH "x-token: $BIZNETGIO_API_KEY" \
https://api.portal.biznetgio.com/v1/baremetal-neo-elastic-storages/products | jq
```
Match what you see against the IOPS tier you want, then hardcode that `product_id` - the [example repo](https://github.com/shirasakaren/biznetgio-example-terraform) does the same (`product_id = 20`). Elastic storage's `product_id` also triggers change-package on change once created - the same hazard described in the [catalog overview](/products/overview#why-0-is-a-real-hazard-not-just-an-unclear-example).
## Additional (floating) IPs
`biznetgio_baremetal_additional_ip` / `BaremetalAdditionalIp` orders a floating IP independent of any server; `biznetgio_baremetal_additional_ip_assignment` attaches it. Neither the `product_id` nor the `region` (`GET /baremetal-additional-ips/products` and `GET /baremetal-additional-ips/regions` upstream) has a catalog data source. Discover both manually:
```bash theme={null}
curl -sH "x-token: $BIZNETGIO_API_KEY" \
https://api.portal.biznetgio.com/v1/baremetal-additional-ips/products | jq
curl -sH "x-token: $BIZNETGIO_API_KEY" \
https://api.portal.biznetgio.com/v1/baremetal-additional-ips/regions | jq
```
Wrapping any of these three unwrapped endpoints (elastic storage products, additional IP products, additional IP regions) as a proper data source is a good, contained first contribution - see the [Terraform provider guide](/contribute/terraform-guide) and [Pulumi provider guide](/contribute/pulumi-guide).
## OpenVPN out-of-band access
`biznetgio_baremetal_openvpn` / `baremetalOpenvpn` returns the OpenVPN client configuration for out-of-band access to your bare-metal servers, account-wide (no arguments). Returns `config` (sensitive) and `raw`. See the [Terraform](/terraform/resources/baremetal#biznetgio_baremetal_openvpn) reference for details.
# NEO GPU catalog and pricing
Source: https://biznetgio.creations.ren/products/gpu
The H200 GPU-as-a-Service catalog, subscription vs on-demand cost, and what is and is not confirmed about it
NEO GPU is Biznet GIO's NVIDIA H200 GPU-as-a-Service line, billed either by subscription cycle or by the hour. For the resource schema and full code, see the [Terraform](/terraform/resources/gpu) and [Pulumi](/pulumi/resources/gpu) reference pages.
This is a different product from NEO Metal's two GPU-equipped bare-metal SKUs (`a1.small.gpu.x86` with an NVIDIA T4, `a1.medium.gpu.x86` with an NVIDIA L4). Those are whole physical servers with a GPU card installed, ordered through `biznetgio_baremetal` - see the [NEO Metal catalog](/products/baremetal). NEO GPU, described on this page, is shared H200 GPU capacity ordered through `biznetgio_gpu_instance` / `GpuInstance`.
## Pricing (source: [biznetgio.com/pricelist#neo-gpu](https://www.biznetgio.com/pricelist#neo-gpu))
| Package | CPU | RAM | Disk | GPU RAM | Price / hour | Price / month |
| ---------- | --------- | ------- | ------- | ------- | ------------ | ------------- |
| 1 GPU H200 | 22 cores | 224 GB | 750 GB | 141 GB | Rp74.000 | Rp52.999.000 |
| 2 GPU H200 | 44 cores | 448 GB | 1500 GB | 282 GB | Rp147.000 | Rp105.999.000 |
| 3 GPU H200 | 66 cores | 672 GB | 2250 GB | 423 GB | Rp219.000 | Rp158.999.000 |
| 4 GPU H200 | 88 cores | 896 GB | 3000 GB | 564 GB | Rp299.000 | Rp211.999.000 |
| 5 GPU H200 | 110 cores | 1120 GB | 3750 GB | 705 GB | Rp369.000 | Rp264.999.000 |
| 6 GPU H200 | 132 cores | 1344 GB | 4500 GB | 846 GB | Rp439.000 | Rp317.999.000 |
| 7 GPU H200 | 154 cores | 1568 GB | 5250 GB | 987 GB | Rp509.000 | Rp369.999.000 |
| 8 GPU H200 | 176 cores | 1792 GB | 6000 GB | 1128 GB | Rp589.000 | Rp423.999.000 |
Public list prices, current as of this writing. The **hourly** figure applies to `on_demand` instances (accrues continuously until deleted); the **monthly** figure applies to `subscription` instances billed at `cycle = "m"`. Confirm the actual charge against your own account's catalog output - see [the two price sources](/products/overview#two-different-prices-two-different-jobs).
## What `biznetgio_gpu_products` gives you, and what is genuinely unclear
```
products[] = {
product_id, name, description, category_name, raw,
flavors[] = { flavor_id, name, raw }
}
```
`product_id` and `name` work the same way as every other catalog: `product_id` is what you pass to `biznetgio_gpu_instance.product_id`. What is **not** documented anywhere upstream, and not something this documentation will guess at, is exactly what a "flavor" represents. It could be a GPU-count tier matching the pricing table above, a region, a configuration variant, or something else entirely - the provider source only says it comes from `GET /neo-gpus/products/{product_id}/flavors` and passes the fields through unchanged.
Before you build anything that depends on `flavors`, print your own account's output and read it directly:
```hcl theme={null}
data "biznetgio_gpu_products" "all" {}
output "gpu_catalog" {
value = [
for p in data.biznetgio_gpu_products.all.products : {
product_id = p.product_id
name = p.name
raw = jsondecode(p.raw)
flavors = [
for f in p.flavors : {
flavor_id = f.flavor_id
name = f.name
raw = jsondecode(f.raw)
}
]
}
]
}
```
```typescript theme={null}
import * as biznetgio from "@shirasakaren/biznetgio";
const products = biznetgio.gpuProductsOutput();
export const gpuCatalog = products.products.apply((items) =>
items.map((p) => ({
productId: p.productId,
name: p.name,
raw: JSON.parse(p.raw),
flavors: p.flavors.map((f) => ({ flavorId: f.flavorId, name: f.name, raw: JSON.parse(f.raw) })),
})),
);
```
Match `product_id` against the pricing table above by `name` once you have confirmed the exact string, the same way as [NEO Metal](/products/baremetal#match-on-name-the-only-typed-filterable-field). Note that `biznetgio_gpu_instance` / `GpuInstance` itself takes only `product_id`, not a `flavor_id` - the flavors list is exposed for you to read, but nothing in the current resource schema consumes it. Whatever a "flavor" changes about your order, it is not something you select through these providers today.
## Subscription vs on-demand
Exactly one of `subscription` or `on_demand` must be set on `biznetgio_gpu_instance` / `GpuInstance` - the provider rejects both being set, and rejects neither.
```hcl theme={null}
subscription = {
cycle = "m" # or "a" - NEO GPU takes no other cycle value
}
```
```hcl theme={null}
on_demand = {
additional_hours = 0
}
```
`subscription` bills the monthly or annual figure from the pricing table above. `on_demand` accrues the hourly figure continuously from creation until you delete the instance; `reserve_additional_hours_trigger` is a one-shot action that reserves additional discrete hour blocks on an already-running on-demand instance. See the [billing guide](/guides/billing) for the general cycle/payment model and the [Terraform](/terraform/resources/gpu) / [Pulumi](/pulumi/resources/gpu) reference for the full input schema.
## The OS list gap
Unlike NEO Lite, NEO Lite Pro, and NEO Metal, **NEO GPU has no OS list data source at all**, even though the upstream API has the endpoint: `GET /neo-gpus/products/{product_id}/select-os`. `select_os` on `biznetgio_gpu_instance` is a plain required string with no catalog to validate it against. Discover valid values manually:
```bash theme={null}
curl -sH "x-token: $BIZNETGIO_API_KEY" \
https://api.portal.biznetgio.com/v1/neo-gpus/products//select-os | jq
```
Wrapping this endpoint as a real `biznetgio_gpu_os_list` data source is a good, contained first contribution - see the [Terraform provider guide](/contribute/terraform-guide) and [Pulumi provider guide](/contribute/pulumi-guide).
## Console and monitoring
* **`biznetgio_gpu_console` / `gpuConsole`** - mints a console access URL for a running instance. **Side-effecting**: every read may create a new session. Do not reference it anywhere that gets evaluated during routine plan diffing.
* **`biznetgio_gpu_graph` / `gpuGraph`** - monitoring graph data for an instance, over `hour` / `day` / `week` / `month` / `year`.
Full schemas in the [Terraform](/terraform/resources/gpu#data-sources) and [Pulumi](/pulumi/resources/gpu#functions) reference pages.
# NEO Lite catalog and pricing
Source: https://biznetgio.creations.ren/products/neolite
Every NEO Lite package, what the catalog data source actually returns, and how to pick one on purpose
NEO Lite is Biznet GIO's entry-level KVM VPS line. This page is about **what to order and why** - for the resource schemas and full multi-language code, see the [Terraform](/terraform/resources/neolite) and [Pulumi](/pulumi/resources/neolite) reference pages. Read [Understanding the product catalog](/products/overview) first if you have not - it explains why `products[0]` is risky and how to inspect your own account's catalog before filtering it.
## Pricing (source: [biznetgio.com/pricelist#neo-lite](https://www.biznetgio.com/pricelist#neo-lite))
| Package | vCPU | RAM | Storage | Price / month |
| -------- | -------- | ----- | ------- | ------------- |
| XS 1.1 | 1 core | 1 GB | 60 GB | Rp59.000 |
| SS 2.1 | 1 core | 2 GB | 60 GB | Rp80.000 |
| SS 2.2 | 2 cores | 2 GB | 60 GB | Rp109.000 |
| MS 4.2 | 2 cores | 4 GB | 60 GB | Rp139.000 |
| MS 4.4 | 4 cores | 4 GB | 60 GB | Rp179.000 |
| MM 8.4 | 4 cores | 8 GB | 60 GB | Rp269.000 |
| MM 8.8 | 8 cores | 8 GB | 60 GB | Rp289.000 |
| LL 16.8 | 8 cores | 16 GB | 60 GB | Rp459.000 |
| LL 16.16 | 16 cores | 16 GB | 60 GB | Rp499.000 |
Add-ons: additional disk Rp1.650/GB/month, snapshot Rp1.500/GB/month. Storage is fixed at 60 GB per tier; you grow it afterward with `biznetgio_neolite_disk` / `NeoliteDisk`, billed separately at the add-on rate above.
These are Biznet GIO's public list prices, current as of this writing. The `billing` field on your own account's `biznetgio_neolite_products` output is the authoritative number for what you will actually be charged - see [the two price sources](/products/overview#two-different-prices-two-different-jobs).
## What `biznetgio_neolite_products` actually gives you
Each item in `products` is one row like the table above, plus the exact billing terms:
| Field | Meaning |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `product_id` | The number every create/upgrade call actually uses |
| `name` | Biznet GIO's label for the product, e.g. something close to `"XS 1.1"` - confirm the exact string against your own output, do not assume it matches the pricelist verbatim |
| `description` | Free-text description |
| `category_id` / `category_name` | Product grouping |
| `options.cores` | vCPU count - the "1" / "2" / "4" / "8" / "16" in the table above |
| `options.memory` | RAM **in megabytes**, not gigabytes - a "1 GB" tier is reported as a number close to 1024, not `1` |
| `options.allow_downgrade` | `1` if downgrading this product is allowed, else `0` |
| `billing[]` | One entry per supported cycle (`label`, `cycle`, `price`, and per-quantity-tier `components` for anything billed by volume, like extra disk) |
## Worked example: picking XS 1.1 for the lowest cost
Say you want the cheapest NEO Lite tier - `XS 1.1`, 1 vCPU, 1 GB RAM - and you want to be sure that is really what gets ordered, not whatever is first in the list. First, print your own catalog (see [Step 1](/products/overview#step-1-look-at-your-own-catalog-before-you-filter-anything)) and confirm the real `name` and `options.memory` value for the smallest tier on your account. Then write the filter:
```hcl theme={null}
data "biznetgio_neolite_products" "all" {}
locals {
# Replace the exact memory ceiling with what you saw in your own
# printed catalog for the 1-core / ~1 GB tier.
xs_matches = [
for p in data.biznetgio_neolite_products.all.products :
p if p.options.cores == 1 && p.options.memory <= 1100
]
# Errors at plan time if nothing matched, instead of guessing.
xs_product_id = local.xs_matches[0].product_id
}
data "biznetgio_neolite_os_list" "ubuntu" {
product_id = local.xs_product_id
}
resource "biznetgio_neolite_keypair" "main" {
name = "neo-lite-key"
}
resource "biznetgio_neolite_vm" "cheap" {
ssh_and_console_user = "adminuser"
console_password = "s3cretP4ssw0rd"
vm_name = "neo-lite-xs"
product_id = local.xs_product_id
select_os = data.biznetgio_neolite_os_list.ubuntu.oss[0].name
keypair_id = biznetgio_neolite_keypair.main.keypair_id
cycle = "m"
}
```
```typescript theme={null}
import * as biznetgio from "@shirasakaren/biznetgio";
const products = biznetgio.neoliteProductsOutput();
const xsProductId = products.products.apply((items) => {
const match = items.find((p) => p.options.cores === 1 && p.options.memory <= 1100);
if (!match) throw new Error("no 1-core / ~1GB NEO Lite product found");
return match.productId;
});
const osList = biznetgio.neoliteOsListOutput({ productId: xsProductId });
const keypair = new biznetgio.NeoliteKeypair("cheap-keypair", { name: "neo-lite-key" });
const vm = new biznetgio.NeoliteVm("cheap-vm", {
vmName: "neo-lite-xs",
productId: xsProductId,
selectOs: osList.oss[0].name,
keypairId: keypair.keypairId,
cycle: "m",
sshAndConsoleUser: "adminuser",
consolePassword: "s3cretP4ssw0rd",
});
```
The `select_os` / `selectOs` line still uses `oss[0]` here - that is a much smaller risk than `products[0]`, because `select_os` only decides the OS image, not a paid change-package order, and OS lists are typically short and dominated by one obvious choice (for example a single `ubuntu-22` entry). Apply the same filter discipline to it if your product has several OS options and you care which one you get - see the OS list section below.
## The OS list
`biznetgio_neolite_os_list` (Terraform) / `neoliteOsList` (Pulumi) takes the `product_id` you just resolved and returns every OS image available for that specific product:
| Field | Meaning |
| -------- | ---------------------------------------------------- |
| `vmid` | Internal template id |
| `node` | The Proxmox node backing that template |
| `name` | The exact string to pass as `select_os` / `selectOs` |
| `maxmem` | Memory ceiling of the OS template (MB) |
| `maxcpu` | CPU ceiling of the OS template |
Different products can offer different OS lists. Print `oss[].name` for your chosen `product_id` the same way you printed the product catalog, and match on the exact string - illustrative examples you are likely to see include Ubuntu, Debian, CentOS/AlmaLinux, and Rocky Linux images, but the only way to know the exact literal names on your account is to read your own `oss` output.
## Catalogs that exist upstream but are not wrapped as data sources
Two more product lists exist in the Biznet GIO API but are **not exposed** through `biznetgio_neolite_*` or `pulumi_biznetgio.neolite*` at all:
* **Additional disk products** (`GET /neolites/disks/products`) - the `product_id` on `biznetgio_neolite_disk` / `NeoliteDisk` has no catalog data source. The [example repo](https://github.com/shirasakaren/biznetgio-example-terraform) hardcodes `product_id = 60` for this reason.
* **Snapshot products** (`GET /neolites/snapshots/products`) - same gap; `biznetgio_neolite_snapshot` itself does not take a `product_id` (it snapshots an existing VM), but restoring one into a new VM via `biznetgio_neolite_vm_from_snapshot` does, and again there is no data source for it.
Discover either one manually with a direct, authenticated request:
```bash theme={null}
curl -sH "x-token: $BIZNETGIO_API_KEY" \
https://api.portal.biznetgio.com/v1/neolites/disks/products | jq
```
Match what you see against the add-on price on the pricing table above, then hardcode the `product_id` you want, exactly like the example repo does. Wrapping either endpoint as a real data source is a good, contained first contribution - see the [Terraform provider guide](/contribute/terraform-guide) and [Pulumi provider guide](/contribute/pulumi-guide).
## Other NEO Lite catalog lookups
* **`biznetgio_neolite_ip_availability` / `neoliteIPAvailability`** - takes `product_id`, returns whether a public IP is currently available for that specific product. Worth checking before you order if IP availability matters to you.
* **`biznetgio_neolite_change_package_options` / `neoliteChangePackageOptions`** - takes the `account_id` of an *existing* VM, returns the valid target packages and prices for a change-package operation on that account, as unmodeled `raw` JSON. This is about upgrading a VM you already own, not about picking your first one.
* **`biznetgio_neolite_storage_upgrade_options` / `neoliteStorageUpgradeOptions`** - same idea, for storage upgrade pricing on an existing account.
Full input/output schemas for every resource on this page are in the [Terraform](/terraform/resources/neolite) and [Pulumi](/pulumi/resources/neolite) reference.
# NEO Lite Pro catalog and pricing
Source: https://biznetgio.creations.ren/products/neolite-pro
Every NEO Lite Pro package, what the catalog data source actually returns, and how to pick one on purpose
NEO Lite Pro is Biznet GIO's higher-tier KVM VPS line: NVMe storage, AMD EPYC CPUs, and higher guaranteed IOPS than plain NEO Lite. Everything on [Understanding the product catalog](/products/overview) applies here too - `product_id` on `biznetgio_neolite_pro_vm` / `NeoliteProVm` triggers a real change-package order if it changes, so do not let `products[0]` decide it for you. For the full resource schemas and multi-language code, see the [Terraform](/terraform/resources/neolite-pro) and [Pulumi](/pulumi/resources/neolite-pro) reference pages.
## Pricing (source: [biznetgio.com/pricelist#neo-lite-pro](https://www.biznetgio.com/pricelist#neo-lite-pro))
| Package | vCPU | RAM | Storage | Price / month |
| -------- | -------- | ----- | --------------- | ------------- |
| SS.1.1 | 1 core | 1 GB | 30 GB SSD NVMe | Rp209.000 |
| SS.2.1 | 1 core | 2 GB | 40 GB SSD NVMe | Rp309.000 |
| MS.2.2 | 2 cores | 2 GB | 40 GB SSD NVMe | Rp389.000 |
| MS.4.2 | 2 cores | 4 GB | 60 GB SSD NVMe | Rp559.000 |
| MM.4.4 | 4 cores | 4 GB | 60 GB SSD NVMe | Rp699.000 |
| MM.8.4 | 4 cores | 8 GB | 80 GB SSD NVMe | Rp999.000 |
| ML.16.8 | 8 cores | 16 GB | 90 GB SSD NVMe | Rp1.799.000 |
| ML.24.8 | 8 cores | 24 GB | 100 GB SSD NVMe | Rp2.099.000 |
| LL.24.12 | 12 cores | 24 GB | 100 GB SSD NVMe | Rp2.299.000 |
Add-ons: additional disk Rp2.200/GB/month, snapshot Rp2.000/GB/month.
Public list prices, current as of this writing. Treat your own account's `biznetgio_neolite_pro_products.all.products[].billing` as the authoritative charge - see [the two price sources](/products/overview#two-different-prices-two-different-jobs).
## What `biznetgio_neolite_pro_products` gives you
Field-for-field identical shape to plain NEO Lite's catalog: `product_id`, `name`, `description`, `category_id`, `category_name`, `options` (`type`, `cores`, `memory` in **megabytes**, `allow_downgrade`), and `billing[]` per cycle. See the [NEO Lite catalog](/products/neolite#what-biznetgio_neolite_products-actually-gives-you) page for the full field table - it applies here unchanged, just against the `_pro_` products endpoint.
## Worked example: picking a specific tier
Same recipe as NEO Lite: print your own catalog first, then filter on the typed spec fields rather than trusting position.
```hcl theme={null}
data "biznetgio_neolite_pro_products" "all" {}
locals {
# Replace the exact figures with what you saw in your own printed
# catalog - this example targets the MS.4.2 tier (2 cores / 4 GB).
# The memory band must exclude MS.2.2 (2 cores / ~2048 MB), which also
# has cores == 2 - a loose "<= 4200" alone would match both tiers.
matches = [
for p in data.biznetgio_neolite_pro_products.all.products :
p if p.options.cores == 2 && p.options.memory >= 3900 && p.options.memory <= 4200
]
pro_product_id = local.matches[0].product_id
}
data "biznetgio_neolite_pro_os_list" "ubuntu" {
product_id = local.pro_product_id
}
resource "biznetgio_neolite_pro_keypair" "main" {
name = "neo-lite-pro-key"
}
resource "biznetgio_neolite_pro_vm" "main" {
ssh_and_console_user = "adminuser"
console_password = "s3cretP4ssw0rd"
vm_name = "neo-lite-pro-1"
product_id = local.pro_product_id
select_os = data.biznetgio_neolite_pro_os_list.ubuntu.oss[0].name
keypair_id = biznetgio_neolite_pro_keypair.main.keypair_id
cycle = "m"
}
```
```typescript theme={null}
import * as biznetgio from "@shirasakaren/biznetgio";
const products = biznetgio.neoliteProProductsOutput();
// The memory band must exclude MS.2.2 (2 cores / ~2048 MB), which also
// has cores === 2 - a loose "<= 4200" alone would match both tiers.
const proProductId = products.products.apply((items) => {
const match = items.find(
(p) => p.options.cores === 2 && p.options.memory >= 3900 && p.options.memory <= 4200,
);
if (!match) throw new Error("no matching NEO Lite Pro product found");
return match.productId;
});
const osList = biznetgio.neoliteProOsListOutput({ productId: proProductId });
const keypair = new biznetgio.NeoliteProKeypair("pro-keypair", { name: "neo-lite-pro-key" });
const vm = new biznetgio.NeoliteProVm("pro-vm", {
vmName: "neo-lite-pro-1",
productId: proProductId,
selectOs: osList.oss[0].name,
keypairId: keypair.keypairId,
cycle: "m",
sshAndConsoleUser: "adminuser",
consolePassword: "s3cretP4ssw0rd",
});
```
## Catalogs not wrapped as data sources
Same gap as NEO Lite: additional disk products (`GET /neolite-pros/disks/products`) and snapshot products have no catalog data source. Discover manually:
```bash theme={null}
curl -sH "x-token: $BIZNETGIO_API_KEY" \
https://api.portal.biznetgio.com/v1/neolite-pros/disks/products | jq
```
`biznetgio_neolite_pro_change_package_options` and `biznetgio_neolite_pro_storage_upgrade_options` cover upgrade pricing for an *existing* account, the same way their plain NEO Lite counterparts do - see the [NEO Lite catalog](/products/neolite#other-neo-lite-catalog-lookups) page.
## Look-alike, not confirmed the same: VPS Windows
Biznet GIO's public pricelist also lists a **VPS Windows** product using the exact same tier naming convention as NEO Lite Pro (`SS.2.1`, `MS.2.2`, `MM.4.4`, and so on) with the same CPU/RAM numbers, at a higher price that presumably bundles a Windows Server license. It is tempting to assume this is just a NEO Lite Pro VM with a Windows OS selected via `select_os`.
That is not confirmed. Neither provider's source code contains the word "Windows" anywhere - not in the resource schemas, not in the client code, not in the OS-list handling. Before assuming VPS Windows is reachable through `biznetgio_neolite_pro_vm`:
1. Print your account's `neolite_pro_os_list` output for a candidate product id.
2. Look for a Windows-flavored entry in `oss[].name` (something like `windows-2022` or `windows-2025`).
3. If nothing appears, VPS Windows is not orderable through this provider on your account, and you should order it through the [portal](https://portal.biznetgio.com) instead.
Full VPS Windows pricing is on the [Services outside these providers](/products/other-services) page.
# NEO Object Storage catalog and pricing
Source: https://biznetgio.creations.ren/products/object-storage
Why there is no catalog data source for Object Storage plans, and how to discover a product_id manually
NEO Object Storage is Biznet GIO's S3-compatible storage line. For the resource schema and full code, see the [Terraform](/terraform/resources/object-storage) and [Pulumi](/pulumi/resources/object-storage) reference pages.
## Pricing (source: [biznetgio.com/pricelist#neo-object-storage](https://www.biznetgio.com/pricelist#neo-object-storage))
| Package | Price |
| --------------- | -------------------- |
| Single Region 1 | Rp1.000 / GB / month |
| Single Region 2 | Rp1.000 / GB / month |
| Multi Region 1 | Rp2.000 / GB / month |
| Multi Region 2 | Rp2.000 / GB / month |
| Multi Region 3 | Rp3.000 / GB / month |
Public list prices, current as of this writing. Object Storage bills by GB of `quota`, per month, at whichever cycle you choose (`m a q s b t p4 p5`); see the [billing guide](/guides/billing).
## There is no catalog data source for this at all
This is the one product line in these providers with **zero** typed catalog information. `biznetgio_object_storage.product_id` / `ObjectStorage.productId` is a plain required integer. There is no `name`, no region field, no quota tier exposed anywhere in the schema:
```hcl theme={null}
resource "biznetgio_object_storage" "example" {
product_id = 8 # opaque - see below for how this number is chosen
cycle = "m"
label = "data-archive"
quota = 10
}
```
Notably, **the region names in the pricing table above** ("Single Region 1", "Multi Region 2", and so on) are not a separate input anywhere on the resource - `region` does not exist as an attribute. Whichever region and quota tier you get is entirely a function of which `product_id` you pick. There is no `region` argument to set independently.
Neither provider wraps this catalog as a data source, even though the upstream API has the endpoint: `GET /object-storages/products`. Confirmed by reading both providers' source directly - the Terraform provider's `DataSources()` list only registers `biznetgio_object_storage_instances`, `biznetgio_object_storage_buckets`, and `biznetgio_object_storage_credentials`; none of them call the `/products` endpoint. The Pulumi provider's function list is the same, one-to-one.
## Discover a `product_id` manually
```bash theme={null}
curl -sH "x-token: $BIZNETGIO_API_KEY" \
https://api.portal.biznetgio.com/v1/object-storages/products | jq
```
Match what you see against the region/tier you want from the pricing table above, then hardcode that `product_id`. This is exactly what the [example repo](https://github.com/shirasakaren/biznetgio-example-terraform) does (`product_id = 8`) - there is currently no better way. If you place an order through the [portal](https://portal.biznetgio.com) first, the order confirmation or account page there is another way to learn the `product_id` you were assigned, without calling the API directly.
`product_id` on `biznetgio_object_storage` / `ObjectStorage` is **create-only**. Changing it does not trigger an upgrade - it destroys and recreates the entire instance, deleting every bucket, credential, and object inside it. Get the right `product_id` before you `apply`, not after.
Wrapping `GET /object-storages/products` as a real `biznetgio_object_storage_products` data source is a good, contained first contribution, and arguably the highest-value one in either provider - see the [Terraform provider guide](/contribute/terraform-guide) and [Pulumi provider guide](/contribute/pulumi-guide).
## What you *can* list
Once an instance exists, three data sources give you real information about it:
* **`biznetgio_object_storage_instances` / `objectStorageInstances`** - every instance on the account (optionally filtered by `status`), returning `id`, `label`, `status`, `product_id`, `quota`, `raw` per item. This confirms the `product_id` of instances you already own, but does not help you choose a new one.
* **`biznetgio_object_storage_buckets` / `objectStorageBuckets`** - buckets inside a given instance (`name`, `acl`, `raw`).
* **`biznetgio_object_storage_credentials` / `objectStorageCredentials`** - credentials on a given instance (`access_key`, `active` - secret keys are never returned by a list).
Full schemas in the [Terraform](/terraform/resources/object-storage#data-sources) and [Pulumi](/pulumi/resources/object-storage#functions) reference pages.
# Understanding the product catalog
Source: https://biznetgio.creations.ren/products/overview
What data.biznetgio_neolite_products.all.products[0] actually resolves to, and how to pick a specific package on purpose
If you have ever stared at something like this and had no idea what server it actually creates, this section is for you:
```hcl theme={null}
data "biznetgio_neolite_products" "all" {}
resource "biznetgio_neolite_vm" "main" {
product_id = data.biznetgio_neolite_products.all.products[0].product_id
select_os = data.biznetgio_neolite_os_list.ubuntu.oss[0].name
# ...
}
```
`products[0]` and `oss[0]` are not placeholders for "the cheapest one" or "a sensible default." They mean exactly what they say: **whatever item the Biznet GIO API happens to return first, today.** This page explains why that matters, how to look at what you would actually get before you order it, and how to select a specific package or OS on purpose instead of trusting index `0`.
## Why `[0]` is a real hazard, not just an unclear example
The catalog data sources (`biznetgio_neolite_products`, `biznetgio_neolite_pro_products`, `biznetgio_baremetal_products`, `biznetgio_gpu_products`) call a `GET /.../products` endpoint on the Biznet GIO API and append whatever comes back, in the order it comes back, with no sorting applied by the provider. Nothing about that order is documented as stable. If Biznet GIO adds a package, retires one, or the API simply returns results in a different order on a different day, `products[0]` can silently become a different product.
That would just be annoying if picking the wrong one were free to undo. It usually is not:
| Resource | What happens if `product_id` changes on the next plan |
| ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `biznetgio_neolite_vm` / `NeoliteVm` | Triggers a real **change-package** order against your account |
| `biznetgio_neolite_pro_vm` / `NeoliteProVm` | Same - change-package order |
| `biznetgio_baremetal_elastic_storage` / `BaremetalElasticStorage` | Same - change-package order |
| `biznetgio_object_storage` / `ObjectStorage` | `product_id` is create-only - a change **destroys and recreates** the whole S3 tenant, deleting every bucket and object in it |
None of these are dry runs. A `terraform plan` that looks like a no-op change because "the catalog happened to reorder" can become a paid package change or a destroyed storage tenant the moment you `apply`. See the [billing guide](/guides/billing) for what "real paid order" means in practice.
The fix is simple: never let `[0]` decide which real-world product you get. Decide yourself, then write the filter that finds it.
## Step 1: look at your own catalog before you filter anything
The pricelist and the package names in this section come from Biznet GIO's public [pricelist](https://www.biznetgio.com/pricelist) page. That page is marketing copy - it is a close, human-friendly description of what the API sells, but it is not the API response. Before you hardcode a filter, print what your own account's catalog actually contains. Both catalog reads are free: they do not place an order.
```hcl theme={null}
data "biznetgio_neolite_products" "all" {}
output "neolite_catalog" {
value = [
for p in data.biznetgio_neolite_products.all.products : {
product_id = p.product_id
name = p.name
cores = p.options.cores
memory_mb = p.options.memory
}
]
}
```
Run `terraform plan` (no `apply` needed - data sources are read during plan, and reading a catalog places no order). The output prints every real product on your account: its id, its exact `name` string, its core count, and its memory in **megabytes**.
```typescript theme={null}
import * as biznetgio from "@shirasakaren/biznetgio";
const products = biznetgio.neoliteProductsOutput();
export const neoliteCatalog = products.products.apply((items) =>
items.map((p) => ({
productId: p.productId,
name: p.name,
cores: p.options.cores,
memoryMb: p.options.memory,
})),
);
```
Run `pulumi preview` (or `pulumi up` - either works, since this is a read-only function call, not a resource). The exported `neoliteCatalog` output prints the same information.
Do this once, read the real `name` and `options` values Biznet GIO returns for your account, and only then write the filter in the next step. Do not assume the pricelist's package name (for example `"XS 1.1"`) is character-for-character what the `name` field contains - it is very likely close, but confirm it yourself rather than hardcoding a guess.
## Step 2: filter on purpose
There are two ways to pick a specific item out of a catalog list. Prefer the first.
### Match on specs (recommended)
`options.cores` and `options.memory` are typed integers, not free-text labels, so a spec filter cannot be broken by a marketing copy change. `options.memory` is reported in **megabytes** - Biznet GIO's own display (1 GB, 2 GB, and so on) is a rounded, human-friendly view of that number. Use the exact figure you saw in Step 1, not an assumed round number.
```hcl theme={null}
locals {
# Values below are illustrative - use YOUR account's real numbers from Step 1.
matches = [
for p in data.biznetgio_neolite_products.all.products :
p if p.options.cores == 1 && p.options.memory <= 1100
]
# local.matches[0] errors at plan time ("invalid index") if nothing matched,
# instead of silently falling back to some other product.
neolite_product_id = local.matches[0].product_id
}
```
```typescript theme={null}
const products = biznetgio.neoliteProductsOutput();
const chosen = products.products.apply((items) => {
// Values below are illustrative - use YOUR account's real numbers from Step 1.
const match = items.find((p) => p.options.cores === 1 && p.options.memory <= 1100);
if (!match) {
throw new Error("no NEO Lite product matched the requested spec");
}
return match;
});
```
Both idioms exist for the same reason: an empty match should be a plan-time error, not a silent fallback to whatever else happens to be in the list. Terraform's own "invalid index" error on an empty list already does this for you; in Pulumi's TypeScript SDK you have to throw it yourself.
### Match on name (secondary)
Matching on the exact `name` string is fine once you have confirmed that string against your own catalog output in Step 1. Do not skip Step 1 and guess.
```hcl theme={null}
locals {
matches = [
for p in data.biznetgio_neolite_products.all.products :
p if p.name == "XS 1.1" # the exact string you confirmed in Step 1
]
neolite_product_id = local.matches[0].product_id
}
```
```typescript theme={null}
const chosen = products.products.apply((items) => {
const match = items.find((p) => p.name === "XS 1.1"); // confirmed in Step 1
if (!match) throw new Error("no NEO Lite product named 'XS 1.1' was found");
return match;
});
```
Pulumi YAML has no `find`/filter construct over a function's output list. Do the lookup once with the CLI or another language, note the `productId` it prints, and put that literal id in your stack config instead:
```yaml theme={null}
config:
neoliteProductId: 123
```
```yaml theme={null}
resources:
vm:
type: biznetgio:index:NeoliteVm
properties:
productId: ${neoliteProductId}
```
## Two different prices, two different jobs
You will see prices in two places that can legitimately disagree:
* The **public pricelist** (`biznetgio.com/pricelist`) is Biznet GIO's list price. It is the fastest way to compare tiers before you decide what to order, and it is what every pricing table in this Product Catalog section is sourced from.
* The **`billing` field** on a catalog data source item (for example `biznetgio_neolite_products.all.products[0].billing`) is what the API says your account will actually be charged for that product. It can differ from the public list price if your account has a promo, a contract rate, or Biznet GIO has changed pricing since this documentation was written.
`billing` is a **list**, one entry per supported cycle (`m`, `a`, and so on for the product lines that support more than monthly/annual) - it is not a single price. Filter it by the `cycle` you are actually ordering at to get one authoritative number, the same way you filter `products` by name or spec instead of taking `[0]`.
Treat the pricelist as a way to understand and compare products. Treat the matching entry in `billing` as the authoritative number for what you will actually pay - read it from your own account's catalog output before you place an order you care about the cost of.
## What each product line gives you
Not every product has a full catalog data source. Some only expose a bare `product_id` and `name` with no typed specs; a few expose no catalog lookup at all, because the provider has not wrapped that endpoint yet.
| Product line | Biznet GIO service | Catalog data source | What you get | Details |
| -------------------------------------------------------------------- | ---------------------------------------------- | -------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------ |
| NEO Lite | KVM VPS | `biznetgio_neolite_products` | Full: cores, memory (MB), billing | [NEO Lite catalog](/products/neolite) |
| NEO Lite Pro | Higher-tier KVM VPS | `biznetgio_neolite_pro_products` | Full: cores, memory (MB), billing | [NEO Lite Pro catalog](/products/neolite-pro) |
| NEO Metal | Dedicated bare metal (incl. GPU-equipped SKUs) | `biznetgio_baremetal_products` | Partial: `name` + raw JSON only, no typed specs | [NEO Metal catalog](/products/baremetal) |
| NEO GPU | H200 GPU-as-a-Service | `biznetgio_gpu_products` | Partial: `name`, category, and per-product `flavors`, no typed specs | [NEO GPU catalog](/products/gpu) |
| NEO Object Storage | S3-compatible storage | none | Nothing - `product_id` is opaque, discover it manually | [Object Storage catalog](/products/object-storage) |
| NEO Elastic Storage | SAN volumes attached to NEO Metal | none | Nothing - discover manually | [NEO Metal catalog](/products/baremetal) |
| Baremetal additional IP | Floating IPs for NEO Metal | none | Nothing - discover manually | [NEO Metal catalog](/products/baremetal) |
| NEO Lite / Pro additional disk, snapshots | Add-ons on an existing VM | none | Nothing - discover manually | [NEO Lite catalog](/products/neolite) |
| VPS Windows, GIO Enterprise Cloud, GIO Backup, NEO Spark, and others | Various | not exposed by either provider | Not manageable through Terraform or Pulumi at all | [Services outside these providers](/products/other-services) |
Where "none" or "not exposed" appears above, the underlying Biznet GIO API usually still has a real `/products` endpoint - the provider has simply not wrapped it as a data source yet. Each catalog page below shows the exact authenticated HTTP request that gets you the same information manually. Wrapping one of those endpoints as a proper data source is a good, contained first contribution - see the [Terraform](/contribute/terraform-guide) and [Pulumi](/contribute/pulumi-guide) provider deep dives and the [contribution guide](/contribute/introduction).
# Quickstart (Pulumi)
Source: https://biznetgio.creations.ren/pulumi-quickstart
Order a NEO Lite VM with the Biznet GIO Pulumi provider
From zero to a running NEO Lite VM in about five minutes, in any supported language.
## Prerequisites
* [Pulumi CLI](https://www.pulumi.com/docs/iac/cli/) installed
* A [Biznet GIO](https://biznetgio.com) account
* An API token - see [Authentication](/authentication)
## Get started
```bash theme={null}
mkdir biznetgio-demo && cd biznetgio-demo
pulumi new typescript
```
```bash theme={null}
npm install @shirasakaren/biznetgio
```
```bash theme={null}
pip install pulumi-biznetgio
```
```bash theme={null}
go get github.com/shirasakaren/pulumi-biznetgio/sdk/go/pulumi-biznetgio
```
```bash theme={null}
dotnet add package Shirasakaren.Biznetgio
```
```bash theme={null}
# build.gradle
# implementation("ren.shirasaka:biznetgio:0.1.7")
```
No SDK needed - YAML programs use the provider directly.
```bash theme={null}
pulumi config set --secret biznetgio:apiToken
```
Alternatively export `BIZNETGIO_API_KEY`.
```typescript theme={null}
import * as pulumi from "@pulumi/pulumi";
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",
});
export const vmStatus = vm.status;
```
```python theme={null}
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",
)
pulumi.export("vmStatus", vm.status)
```
```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.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"),
})
if err != nil {
return err
}
ctx.Export("vmStatus", vm.Status)
return nil
})
}
```
```csharp theme={null}
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",
});
return new Dictionary
{
["vmStatus"] = vm.Status,
};
});
```
```java theme={null}
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")
.build());
ctx.export("vmStatus", vm.status());
}
}
```
```yaml theme={null}
name: biznetgio
runtime: yaml
description: "Keypair + VM NEO Lite pake function products & osList."
variables:
products:
fn::invoke:
function: biznetgio:index:neoliteProducts
return: products
osList:
fn::invoke:
function: biznetgio:index:neoliteOsList
arguments:
productId: ${products[0].productId}
return: oss
resources:
keypair:
type: biznetgio:index:NeoliteKeypair
properties:
name: neo-lite-key
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
outputs:
vmStatus: ${vm.status}
```
`products[0]` and `oss[0]` take whichever product and OS the API happens to list first - **not necessarily the cheapest or smallest one.** This quickstart uses them so you have something that runs in one copy-paste, but before you leave this as-is on an account you care about the cost of, read [Understanding the product catalog](/products/overview) and replace `[0]` with a filter for the exact package (for example the cheapest NEO Lite tier, `XS 1.1`) and OS you actually want - see the [NEO Lite catalog](/products/neolite) for the full pricing table and a copy-paste filter in TypeScript.
This step places a real order at whatever price the first-listed product happens to be. If you want to guarantee the lowest cost before running `pulumi up`, do the filtering in [Picking a specific package](/products/neolite#worked-example-picking-xs-1-1-for-the-lowest-cost) first.
```bash theme={null}
pulumi up
```
Confirm with `yes`. Creating the VM places a real order on your account; the provider polls until the VM reports `Active` (typically 1-5 minutes).
```bash theme={null}
pulumi stack output vmStatus
```
You should see `"Active"`. Your VM is also visible under NEO Lite in the [portal](https://portal.biznetgio.com).
```bash theme={null}
pulumi destroy
```
Destroying the VM resource deletes the server.
## Next steps
* [Product Catalog](/products/neolite) - real NEO Lite pricing and how to pick an exact package instead of `[0]`
* [Pulumi installation](/pulumi/installation) - all five language SDKs and configuration
* [NEO Lite resources](/pulumi/resources/neolite) - every NEO Lite resource and function
* [Billing](/guides/billing) - how orders and payment work
Stuck? Open an issue on the [provider repository](https://github.com/shirasakaren/pulumi-biznetgio), or contact Biznet GIO support at [support@biznetgio.com](mailto:support@biznetgio.com).
# Importing (Pulumi)
Source: https://biznetgio.creations.ren/pulumi/importing
Bring existing Biznet GIO resources into a Pulumi stack
Every resource supports `pulumi import` with the resource's account id - or a composite id for bucket/credential/object/assignment resources.
## Import
```bash theme={null}
pulumi import biznetgio:index:NeoliteVm demo-vm 12345
```
This writes a matching resource declaration into your stack and adopts the live resource. Run `pulumi preview` afterwards and fix any input diffs.
## ID formats
| Resource token | Import ID |
| ------------------------------------------------- | ----------------------------------------------------------- |
| `biznetgio:index:NeoliteVm` | `` |
| `biznetgio:index:NeoliteKeypair` | `` |
| `biznetgio:index:NeoliteSnapshot` | `` |
| `biznetgio:index:NeoliteVmFromSnapshot` | `` |
| `biznetgio:index:NeoliteDisk` | `` |
| `biznetgio:index:NeoliteProVm` | `` |
| `biznetgio:index:NeoliteProKeypair` | `` |
| `biznetgio:index:NeoliteProSnapshot` | `` |
| `biznetgio:index:NeoliteProDisk` | `` |
| `biznetgio:index:Baremetal` | `` |
| `biznetgio:index:BaremetalKeypair` | `` |
| `biznetgio:index:BaremetalAdditionalIp` | `` |
| `biznetgio:index:BaremetalAdditionalIpAssignment` | `:` |
| `biznetgio:index:BaremetalElasticStorage` | `` |
| `biznetgio:index:GpuInstance` | `` |
| `biznetgio:index:GpuKeypair` | `` |
| `biznetgio:index:ObjectStorage` | `` |
| `biznetgio:index:ObjectStorageBucket` | `:` |
| `biznetgio:index:ObjectStorageCredential` | `:` (literal or 16-hex hashed form) |
| `biznetgio:index:ObjectStorageObject` | `::` |
Keypair ids are not interchangeable across services - a NEO Lite keypair id imports into `NeoliteKeypair` only.
## Composite id examples
```bash theme={null}
# additional IP assignment: server 12345 + additional ip 67890
pulumi import biznetgio:index:BaremetalAdditionalIpAssignment assign 12345:67890
# bucket inside instance 12345
pulumi import biznetgio:index:ObjectStorageBucket assets 12345:my-assets
# credential: access key given literally
pulumi import biznetgio:index:ObjectStorageCredential main 12345:ABCDEFGHIJKLMNOP
# object inside bucket my-assets
pulumi import biznetgio:index:ObjectStorageObject index 12345:my-assets:site/index.html
```
Importing a credential stores the **hashed** form of the access key in the id (`:[:16]`) - the plaintext key is never written to state.
# Installation (Pulumi)
Source: https://biznetgio.creations.ren/pulumi/installation
Install the Biznet GIO Pulumi provider in any supported language
The Pulumi provider is a native Go binary (`pulumi-resource-biznetgio`) with SDKs for five languages. All resources use the `biznetgio` package; resource tokens look like `biznetgio:index:NeoliteVm`.
## Install the SDK
```bash theme={null}
npm install @shirasakaren/biznetgio
```
Requires `@pulumi/pulumi` ^3.142.0.
```bash theme={null}
pip install pulumi-biznetgio
```
Requires Python ≥ 3.9 and `pulumi>=3.231.0,<4.0.0`.
```bash theme={null}
go get github.com/shirasakaren/pulumi-biznetgio/sdk/go/pulumi-biznetgio
```
```bash theme={null}
dotnet add package Shirasakaren.Biznetgio
```
Add to Gradle:
```groovy theme={null}
implementation("ren.shirasaka:biznetgio")
```
Pulumi downloads the `pulumi-resource-biznetgio` plugin automatically from the [GitHub Releases](https://github.com/shirasakaren/pulumi-biznetgio/releases) of this repository (configured via `pluginDownloadURL`) on first use.
This is an unofficial, community-maintained provider by [Shirasaka Ren](/about) - not affiliated with PT Biznet Gio Nusantara.
## Configure
Set the API token (see [Authentication](/authentication)):
```bash theme={null}
pulumi config set --secret biznetgio:apiToken
```
| Config key | Type | Required | Default | Env fallback |
| -------------------- | -------------- | -------- | ------------------------------------- | -------------------- |
| `biznetgio:apiToken` | string, secret | yes | - | `BIZNETGIO_API_KEY` |
| `biznetgio:baseUrl` | string | no | `https://api.portal.biznetgio.com/v1` | `BIZNETGIO_BASE_URL` |
If `apiToken` is missing from both config and environment, the provider fails with: `apiToken is required (set via 'pulumi config set --secret biznetgio:apiToken ' or BIZNETGIO_API_KEY)`.
## Provider behavior
* HTTP requests use a 30-second timeout with up to 4 attempts.
* Create/update operations poll every 5 seconds until the resource reports `active` (typically 1-5 minutes).
* On timeout, the operation returns an initialization error with partial state - the next `pulumi up` resumes where it left off.
```bash theme={null}
git clone https://github.com/shirasakaren/pulumi-biznetgio.git
cd pulumi-biznetgio
make build
make install # copies the provider binary into GOPATH/bin and links the Node and .NET SDKs
```
Local SDK packages are generated under `sdk/`; point your project at them with `npm link` / `pip install -e .` as needed. See [Development](/guides/development) for the full workflow.
## Versions
* Current release: **0.1.7** (see the [changelog](https://github.com/shirasakaren/pulumi-biznetgio/blob/main/CHANGELOG.md))
* `pulumi up` resolves the plugin version from your SDK package automatically; pin it per-project with `pulumi plugin install resource biznetgio v0.1.7`.
# NEO Metal (Pulumi)
Source: https://biznetgio.creations.ren/pulumi/resources/baremetal
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.
Every create/upgrade places a **real paid order**. Read the [billing guide](/guides/billing) for `cycle` values and `payWithCreditCard` semantics.
## `biznetgio:index:Baremetal`
```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;
```
```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)
```
```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
})
}
```
```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
{
["serverStatus"] = server.Status,
};
});
```
```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());
}
}
```
```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
```
| 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.
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.
## `biznetgio:index:BaremetalKeypair`
```typescript theme={null}
const keypair = new biznetgio.BaremetalKeypair("metal-key", {
name: "neo-metal-key",
publicKey: "ssh-rsa AAAAB3NzaC1yc2E...", // optional: import; omit to generate
});
```
```python theme={null}
keypair = pulumi_biznetgio.BaremetalKeypair(
"metal-key",
name="neo-metal-key",
public_key="ssh-rsa AAAAB3NzaC1yc2E...", # optional: import; omit to generate
)
```
```go theme={null}
keypair, err := biznetgio.NewBaremetalKeypair(ctx, "metal-key", &biznetgio.BaremetalKeypairArgs{
Name: pulumi.String("neo-metal-key"),
PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2E..."),
})
```
```csharp theme={null}
var keypair = new BaremetalKeypair("metal-key", new BaremetalKeypairArgs
{
Name = "neo-metal-key",
PublicKey = "ssh-rsa AAAAB3NzaC1yc2E...",
});
```
```java theme={null}
var keypair = new BaremetalKeypair("metal-key",
BaremetalKeypairArgs.builder()
.name("neo-metal-key")
.publicKey("ssh-rsa AAAAB3NzaC1yc2E...")
.build());
```
```yaml theme={null}
keypair:
type: biznetgio:index:BaremetalKeypair
properties:
name: neo-metal-key
publicKey: "ssh-rsa AAAAB3NzaC1yc2E..."
```
| 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`
```typescript theme={null}
const ip = new biznetgio.BaremetalAdditionalIp("extra-ip", {
productId: 10,
cycle: "m",
region: "wjv-1",
});
```
```python theme={null}
ip = pulumi_biznetgio.BaremetalAdditionalIp(
"extra-ip",
product_id=10,
cycle="m",
region="wjv-1",
)
```
```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"),
})
```
```csharp theme={null}
var ip = new BaremetalAdditionalIp("extra-ip", new BaremetalAdditionalIpArgs
{
ProductId = 10,
Cycle = "m",
Region = "wjv-1",
});
```
```java theme={null}
var ip = new BaremetalAdditionalIp("extra-ip",
BaremetalAdditionalIpArgs.builder()
.productId(10)
.cycle("m")
.region("wjv-1")
.build());
```
```yaml theme={null}
ip:
type: biznetgio:index:BaremetalAdditionalIp
properties:
productId: 10
cycle: m
region: wjv-1
```
| 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`
```typescript theme={null}
const assignment = new biznetgio.BaremetalAdditionalIpAssignment("assign", {
additionalIpId: ip.id.apply((id) => Number(id)),
metalAccountId: server.id.apply((id) => Number(id)),
});
```
```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),
)
```
```go theme={null}
assignment, err := biznetgio.NewBaremetalAdditionalIpAssignment(ctx, "assign", &biznetgio.BaremetalAdditionalIpAssignmentArgs{
AdditionalIpId: ip.ID().ToIntOutput(),
MetalAccountId: server.ID().ToIntOutput(),
})
```
```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)),
});
```
```java theme={null}
var assignment = new BaremetalAdditionalIpAssignment("assign",
BaremetalAdditionalIpAssignmentArgs.builder()
.additionalIpId(ip.id().applyValue(Integer::parseInt))
.metalAccountId(server.id().applyValue(Integer::parseInt))
.build());
```
```yaml theme={null}
assignment:
type: biznetgio:index:BaremetalAdditionalIpAssignment
properties:
additionalIpId: ${ip.id}
metalAccountId: ${server.id}
```
| Input | Type | Required | Notes |
| ---------------- | ----- | -------- | ---------------------------- |
| `additionalIpId` | int64 | yes | from `BaremetalAdditionalIp` |
| `metalAccountId` | int64 | yes | target server |
Outputs: `status`, `raw` (secret). Composite id `:`; reassigning = replace.
## `biznetgio:index:BaremetalElasticStorage`
```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
});
```
```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
)
```
```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),
})
```
```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,
});
```
```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());
```
```yaml theme={null}
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 | 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.
`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.
## Functions
For real pricing and how to pick a specific package instead of trusting `[0]`, see the [Product Catalog](/products/baremetal) page.
### `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.
# NEO GPU (Pulumi)
Source: https://biznetgio.creations.ren/pulumi/resources/gpu
Pulumi resources and functions for NEO GPU instances
NEO GPU rents NVIDIA H200 instances (`/neo-gpus` API group), billed by subscription cycle or on-demand (hourly). Exactly one billing mode must be set - validation fails otherwise.
Every create places a **real paid order**. On-demand instances accumulate hourly charges until deleted.
## `biznetgio:index:GpuInstance`
```typescript theme={null}
import * as biznetgio from "@shirasakaren/biznetgio";
const products = biznetgio.gpuProductsOutput();
const keypair = new biznetgio.GpuKeypair("gpu-key", {
name: "gpu-key",
});
const gpu = new biznetgio.GpuInstance("gpu-1", {
productId: products.products[0].productId,
selectOs: "ubuntu-22",
keypairId: keypair.id.apply((id) => Number(id)),
serviceName: "neo-gpu-1",
sshAndConsoleUser: "root",
consolePassword: "s3cretP4ssw0rd",
payWithCreditCard: true,
subscription: { cycle: "m" },
// one-shot actions (change value to fire):
// rebuildTrigger: "rebuild-1",
// reserveAdditionalHoursTrigger: "reserve-1",
});
```
```python theme={null}
import pulumi
import pulumi_biznetgio
products = pulumi_biznetgio.gpu_products()
keypair = pulumi_biznetgio.GpuKeypair(
"gpu-key",
name="gpu-key",
)
gpu = pulumi_biznetgio.GpuInstance(
"gpu-1",
product_id=products.products[0].product_id,
select_os="ubuntu-22",
keypair_id=pulumi.Output.from_input(keypair.id).apply(int),
service_name="neo-gpu-1",
ssh_and_console_user="root",
console_password="s3cretP4ssw0rd",
pay_with_credit_card=True,
subscription=pulumi_biznetgio.GpuInstanceSubscriptionArgs(cycle="m"),
# rebuild_trigger="rebuild-1",
# reserve_additional_hours_trigger="reserve-1",
)
```
```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.GpuProducts(ctx, &biznetgio.GpuProductsArgs{})
if err != nil {
return err
}
keypair, err := biznetgio.NewGpuKeypair(ctx, "gpu-key", &biznetgio.GpuKeypairArgs{
Name: pulumi.String("gpu-key"),
})
if err != nil {
return err
}
gpu, err := biznetgio.NewGpuInstance(ctx, "gpu-1", &biznetgio.GpuInstanceArgs{
ProductId: pulumi.Int(products.Products[0].ProductId),
SelectOs: pulumi.String("ubuntu-22"),
KeypairId: keypair.ID().ToIntOutput(),
ServiceName: pulumi.String("neo-gpu-1"),
SshAndConsoleUser: pulumi.String("root"),
ConsolePassword: pulumi.String("s3cretP4ssw0rd"),
PayWithCreditCard: pulumi.Bool(true),
Subscription: &biznetgio.GpuInstanceSubscriptionArgs{
Cycle: pulumi.String("m"),
},
// RebuildTrigger: pulumi.String("rebuild-1"),
// ReserveAdditionalHoursTrigger: pulumi.String("reserve-1"),
})
if err != nil {
return err
}
ctx.Export("gpuStatus", gpu.Status)
return nil
})
}
```
```csharp theme={null}
using System;
using System.Collections.Generic;
using Pulumi;
using Shirasakaren.Biznetgio;
return await Deployment.RunAsync(() =>
{
var products = GpuProducts.Invoke();
var keypair = new GpuKeypair("gpu-key", new GpuKeypairArgs
{
Name = "gpu-key",
});
var gpu = new GpuInstance("gpu-1", new GpuInstanceArgs
{
ProductId = products.Apply(p => p.Products[0].ProductId),
SelectOs = "ubuntu-22",
KeypairId = keypair.Id.Apply(v => int.Parse(v)),
ServiceName = "neo-gpu-1",
SshAndConsoleUser = "root",
ConsolePassword = "s3cretP4ssw0rd",
PayWithCreditCard = true,
Subscription = new GpuInstanceSubscriptionArgs { Cycle = "m" },
// RebuildTrigger = "rebuild-1",
// ReserveAdditionalHoursTrigger = "reserve-1",
});
return new Dictionary
{
["gpuStatus"] = gpu.Status,
};
});
```
```java theme={null}
package demo;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import ren.shirasaka.biznetgio.*;
import ren.shirasaka.biznetgio.inputs.GpuSubscriptionArgs;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
private static void stack(Context ctx) {
var products = BiznetgioFunctions.gpuProducts();
var keypair = new GpuKeypair("gpu-key",
GpuKeypairArgs.builder()
.name("gpu-key")
.build());
var gpu = new GpuInstance("gpu-1",
GpuInstanceArgs.builder()
.productId(products.applyValue(p -> p.products().get(0).productId()))
.selectOs("ubuntu-22")
.keypairId(keypair.id().applyValue(Integer::parseInt))
.serviceName("neo-gpu-1")
.sshAndConsoleUser("root")
.consolePassword("s3cretP4ssw0rd")
.payWithCreditCard(true)
.subscription(GpuSubscriptionArgs.builder().cycle("m").build())
// .rebuildTrigger("rebuild-1")
// .reserveAdditionalHoursTrigger("reserve-1")
.build());
ctx.export("gpuStatus", gpu.status());
}
}
```
```yaml theme={null}
resources:
gpu:
type: biznetgio:index:GpuInstance
properties:
productId: ${products[0].productId}
selectOs: ubuntu-22
keypairId: ${fn::toNumber(keypair.id)}
serviceName: neo-gpu-1
sshAndConsoleUser: root
consolePassword: s3cretP4ssw0rd
payWithCreditCard: true
subscription:
cycle: m
```
Hourly billing instead of `subscription`:
```typescript theme={null}
onDemand: { additionalHours: 0 },
```
```python theme={null}
on_demand=pulumi_biznetgio.GpuInstanceOnDemandArgs(additional_hours=0),
```
```go theme={null}
OnDemand: &biznetgio.GpuInstanceOnDemandArgs{
AdditionalHours: pulumi.Int(0),
},
```
```csharp theme={null}
OnDemand = new GpuInstanceOnDemandArgs { AdditionalHours = 0 },
```
```java theme={null}
.onDemand(GpuOnDemandArgs.builder().additionalHours(0).build())
```
```yaml theme={null}
onDemand:
additionalHours: 0
```
| Input | Type | Required | Notes |
| ------------------------------- | -------------- | -------- | ----------------------------------------------------- |
| `productId` | int64 | yes | from `gpuProducts`; create-only |
| `selectOs` | string | yes | from the product's select-OS catalog; create-only |
| `keypairId` | int64 | yes | from `GpuKeypair`; create-only |
| `sshAndConsoleUser` | string | yes | create-only |
| `consolePassword` | string, secret | yes | create-only |
| `serviceName` | string | no | create-only |
| `promocode` | string | no | create-only |
| `payWithCreditCard` | bool | no | default `true`; create-only |
| `subscription` | object | one-of | `{ cycle: "m" \| "a" }`; create-only |
| `onDemand` | object | one-of | `{ additionalHours?: number }` default 0; create-only |
| `rebuildTrigger` | string | no | one-shot destructive OS reinstall |
| `reserveAdditionalHoursTrigger` | string | no | one-shot: reserves additional hour(s) |
`keypairId` comes from `GpuKeypair`'s `id` converted to a number, as in the examples above - `GpuKeypair` exposes no separate `keypairId` output, unlike the other keypair resources.
Outputs: `status`, `orderId`, `raw` (secret, redacted). Import with the numeric account id.
Every input above except the two triggers is create-only in Pulumi - a change destroys and recreates the instance. The Terraform provider's equivalent resource does not handle this safely: changing `product_id`, `select_os`, or `keypair_id` there causes a permanent, unresolvable plan diff instead of a replace - see the [Terraform reference](/terraform/resources/gpu#biznetgio_gpu_instance) if you also use Terraform for NEO GPU.
## `biznetgio:index:GpuKeypair`
```typescript theme={null}
const keypair = new biznetgio.GpuKeypair("gpu-key", {
name: "gpu-key",
});
export const privateKey = keypair.privateKey;
```
```python theme={null}
keypair = pulumi_biznetgio.GpuKeypair(
"gpu-key",
name="gpu-key",
)
pulumi.export("privateKey", keypair.private_key)
```
```go theme={null}
keypair, err := biznetgio.NewGpuKeypair(ctx, "gpu-key", &biznetgio.GpuKeypairArgs{
Name: pulumi.String("gpu-key"),
})
ctx.Export("privateKey", keypair.PrivateKey)
```
```csharp theme={null}
var keypair = new GpuKeypair("gpu-key", new GpuKeypairArgs
{
Name = "gpu-key",
});
// keypair.PrivateKey
```
```java theme={null}
var keypair = new GpuKeypair("gpu-key",
GpuKeypairArgs.builder()
.name("gpu-key")
.build());
ctx.export("privateKey", keypair.privateKey());
```
```yaml theme={null}
keypair:
type: biznetgio:index:GpuKeypair
properties:
name: gpu-key
```
Input `name`; outputs `publicKey`, `privateKey` (secret - returned only at creation), `raw` (secret). No update.
## Functions
For real pricing and how to pick a specific package instead of trusting `[0]`, see the [Product Catalog](/products/gpu) page.
### `biznetgio:index:gpuProducts`
No arguments. Returns `products`: `productId`, `name`, `description`, `categoryName`, `flavors` (`flavorId`, `name`, `raw`), `raw` (secret).
### `biznetgio:index:gpuConsole`
Argument `accountId` (string). Returns `url` (secret) and `raw` (secret). **Side-effecting:** each call mints a new one-time console session - do not use it inside plan diffing.
### `biznetgio:index:gpuGraph`
Arguments `accountId` (string), `timeframe` (optional, default `hour`; `hour` / `day` / `week` / `month` / `year`). Returns `graph` and `raw` (secret) from `GET /neo-gpus/accounts/{id}/graph-monitor`.
# NEO Lite (Pulumi)
Source: https://biznetgio.creations.ren/pulumi/resources/neolite
Pulumi resources and functions for NEO Lite VPS
NEO Lite resources under the `biznetgio` package (`/neolites` API group). The typical flow chains catalog functions into a create: `neoliteProducts` → `neoliteOsList` → `NeoliteKeypair` → `NeoliteVm`.
Every create/upgrade places a **real paid order**. Read the [billing guide](/guides/billing) for `cycle` values and `payWithCreditCard` semantics.
## `biznetgio:index:NeoliteVm`
```typescript theme={null}
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;
```
```python theme={null}
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)
```
```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.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
})
}
```
```csharp theme={null}
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
{
["vmStatus"] = vm.Status,
};
});
```
```java theme={null}
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());
}
}
```
```yaml theme={null}
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 | set at create |
| `consolePassword` | string, secret | yes | write-only: never re-fetched from the API |
| `productId` | int64 | yes | from `neoliteProducts`; change triggers change-package |
| `selectOs` | string | yes | from `neoliteOsList`; OS change = rebuild |
| `keypairId` | int64 | yes | from `NeoliteKeypair`; change triggers change-keypair |
| `cycle` | string | yes | `m a q s b t p4 p5` |
| `vmName` | string | no | default `server-name`; updatable via change-vm-name |
| `description` | string | no | default `""` |
| `payWithCreditCard` | bool | no | default `true`; `false` leaves the invoice unpaid |
| `promocode` | string | no | default `""` |
| `powerState` | string | no | `start` / `stop` / `suspend` / `resume` / `shutdown`; API called only on change |
| `rebuildOs` | string | no | one-shot destructive OS reinstall |
| `migrateToPro` | string | no | one-shot migration; value = NEO Lite Pro `productId` |
| `diskSize` | int64 | no | absolute GB target, grow-only |
Outputs: `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, redacted).
Import with `pulumi import biznetgio:index:NeoliteVm demo-vm `.
## `biznetgio:index:NeoliteKeypair`
```typescript theme={null}
const keypair = new biznetgio.NeoliteKeypair("demo-keypair", {
name: "neo-lite-key",
});
export const privateKey = keypair.privateKey;
```
```python theme={null}
keypair = pulumi_biznetgio.NeoliteKeypair(
"demo-keypair",
name="neo-lite-key",
)
pulumi.export("privateKey", keypair.private_key)
```
```go theme={null}
keypair, err := biznetgio.NewNeoliteKeypair(ctx, "demo-keypair", &biznetgio.NeoliteKeypairArgs{
Name: pulumi.String("neo-lite-key"),
})
ctx.Export("privateKey", keypair.PrivateKey)
```
```csharp theme={null}
var keypair = new NeoliteKeypair("demo-keypair", new NeoliteKeypairArgs
{
Name = "neo-lite-key",
});
// keypair.PrivateKey
```
```java theme={null}
var keypair = new NeoliteKeypair("demo-keypair",
NeoliteKeypairArgs.builder()
.name("neo-lite-key")
.build());
ctx.export("privateKey", keypair.privateKey());
```
```yaml theme={null}
keypair:
type: biznetgio:index:NeoliteKeypair
properties:
name: neo-lite-key
```
| Input | Type | Required | Notes |
| ------ | ------ | -------- | ------------ |
| `name` | string | yes | keypair name |
Outputs: `keypairId`, `publicKey`, `privateKey` (secret - generated server-side, returned only at creation, preserved across refreshes). No update support. Keypairs are per-service: NEO Lite keypairs can't be used on Pro/Metal/GPU.
## `biznetgio:index:NeoliteSnapshot`
```typescript theme={null}
const snapshot = new biznetgio.NeoliteSnapshot("pre-upgrade", {
neoliteAccountId: vm.id.apply((id) => Number(id)),
name: "snapshot-1",
description: "before upgrade",
cycle: "m",
});
```
```python theme={null}
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",
)
```
```go theme={null}
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"),
})
```
```csharp theme={null}
var snapshot = new NeoliteSnapshot("pre-upgrade", new NeoliteSnapshotArgs
{
NeoliteAccountId = vm.Id.Apply(v => int.Parse(v)),
Name = "snapshot-1",
Description = "before upgrade",
Cycle = "m",
});
```
```java theme={null}
var snapshot = new NeoliteSnapshot("pre-upgrade",
NeoliteSnapshotArgs.builder()
.neoliteAccountId(vm.id().applyValue(Integer::parseInt))
.name("snapshot-1")
.description("before upgrade")
.cycle("m")
.build());
```
```yaml theme={null}
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 to 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 `""` |
Outputs: `orderId`, `status`. No update - any input change replaces the snapshot.
## `biznetgio:index:NeoliteVmFromSnapshot`
```typescript theme={null}
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",
});
```
```python theme={null}
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",
)
```
```go theme={null}
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"),
})
```
```csharp theme={null}
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",
});
```
```java theme={null}
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());
```
```yaml theme={null}
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 | from `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` |
Outputs: `orderId`, `status`. **Deleting this resource deletes the restored VM - never the snapshot.** No update support.
## `biznetgio:index:NeoliteDisk`
```typescript theme={null}
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
});
```
```python theme={null}
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
)
```
```go theme={null}
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),
})
```
```csharp theme={null}
var disk = new NeoliteDisk("extra", new NeoliteDiskArgs
{
ProductId = 60,
Cycle = "m",
NeoliteAccountId = vm.Id.Apply(v => int.Parse(v)),
ServiceName = "extra-disk",
Size = 60,
});
```
```java theme={null}
var disk = new NeoliteDisk("extra",
NeoliteDiskArgs.builder()
.productId(60)
.cycle("m")
.neoliteAccountId(vm.id().applyValue(Integer::parseInt))
.serviceName("extra-disk")
.size(60)
.build());
```
```yaml theme={null}
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 | from `/neolites/disks/products`; see warning below |
| `cycle` | string | yes | see warning below |
| `neoliteAccountId` | int64 | yes | target VM |
| `serviceName` | string | no | default `service-name` |
| `size` | int64 | no | default `60` GB, grow-only |
| `promocode` | string | no | |
| `payWithCreditCard` | bool | no | default `true` |
Outputs: `orderId`, `status`, `raw` (secret). Update upgrades size only - the API receives the increment (`newSize - oldSize`), not the absolute target; shrinking errors.
`productId` and `cycle` have no `replaceOnChanges` tag. If you change either without also changing `size`, `Update` discards the change and writes the *old* value back into state, so the next `pulumi preview` shows the same diff again - it never resolves and never errors. The Terraform equivalent (`biznetgio_neolite_disk`) correctly marks both `RequiresReplace()`. If you need a different disk product or cycle in Pulumi, destroy and recreate the resource.
## Functions
For real pricing and how to pick a specific package instead of trusting `[0]`, see the [Product Catalog](/products/neolite) page.
### `biznetgio:index:neoliteProducts`
No arguments. Returns `products`: `productId`, `name`, `description`, `categoryId`, `categoryName`, `options` (`type`, `cores`, `memory`, `allowDowngrade`), `billing` (`label`, `cycle`, `price`, `components` with per-quantity `prices`).
### `biznetgio:index:neoliteOsList`
Argument `productId` (int64). Returns `oss`: `vmid`, `node`, `name` (use for `selectOs`), `maxmem`, `maxcpu`.
```typescript theme={null}
const products = biznetgio.neoliteProductsOutput();
const osList = biznetgio.neoliteOsListOutput({
productId: products.products[0].productId,
});
```
```python theme={null}
products = pulumi_biznetgio.neolite_products()
os_list = pulumi_biznetgio.neolite_os_list_output(
product_id=products.products[0].product_id,
)
```
```go theme={null}
products, _ := biznetgio.NeoliteProducts(ctx, &biznetgio.NeoliteProductsArgs{})
osList, _ := biznetgio.NeoliteOsList(ctx, &biznetgio.NeoliteOsListArgs{
ProductId: products.Products[0].ProductId,
})
```
```csharp theme={null}
var products = NeoliteProducts.Invoke();
var osList = NeoliteOsList.Invoke(new NeoliteOsListInvokeArgs
{
ProductId = products.Apply(p => p.Products[0].ProductId),
});
```
```java theme={null}
var products = BiznetgioFunctions.neoliteProducts();
var osList = BiznetgioFunctions.neoliteOsList(
NeoliteOsListArgs.builder()
.productId(products.applyValue(p -> p.products().get(0).productId()))
.build());
```
```yaml theme={null}
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`. Returns `raw` (secret) - the upstream response is unmodeled and exported as JSON.
### `biznetgio:index:neoliteStorageUpgradeOptions`
Argument `accountId`. Returns `raw` (secret).
### `biznetgio:index:neoliteIPAvailability`
Argument `productId`. Returns `available` (bool).
# NEO Lite Pro (Pulumi)
Source: https://biznetgio.creations.ren/pulumi/resources/neolite-pro
Pulumi resources and functions for NEO Lite Pro VPS
NEO Lite Pro is the premium VPS tier (`/neolite-pros` API group). The resource set mirrors NEO Lite with its own keypair, snapshot, and disk pools, and no `migrateToPro` (Pro is the migration *destination*).
Every create/upgrade places a **real paid order**. Read the [billing guide](/guides/billing) for `cycle` values and `payWithCreditCard` semantics.
## `biznetgio:index:NeoliteProVm`
```typescript theme={null}
import * as biznetgio from "@shirasakaren/biznetgio";
const products = biznetgio.neoliteProProductsOutput();
const osList = biznetgio.neoliteProOsListOutput({
productId: products.products[0].productId,
});
const keypair = new biznetgio.NeoliteProKeypair("pro-keypair", {
name: "neo-lite-pro-key",
});
const vm = new biznetgio.NeoliteProVm("pro-vm", {
vmName: "neo-pro-1",
productId: products.products[0].productId,
selectOs: osList.oss[0].name,
keypairId: keypair.id.apply((id) => Number(id)),
cycle: "m",
sshAndConsoleUser: "adminuser",
consolePassword: "s3cretP4ssw0rd",
// optional in-place actions (change value to fire):
// powerState: "stop",
// rebuildOs: "ubuntu-22",
// diskSize: 100,
});
export const vmStatus = vm.status;
```
```python theme={null}
import pulumi
import pulumi_biznetgio
products = pulumi_biznetgio.neolite_pro_products()
os_list = pulumi_biznetgio.neolite_pro_os_list_output(
product_id=products.products[0].product_id,
)
keypair = pulumi_biznetgio.NeoliteProKeypair(
"pro-keypair",
name="neo-lite-pro-key",
)
vm = pulumi_biznetgio.NeoliteProVm(
"pro-vm",
vm_name="neo-pro-1",
product_id=products.products[0].product_id,
select_os=os_list.oss[0].name,
keypair_id=pulumi.Output.from_input(keypair.id).apply(int),
cycle="m",
ssh_and_console_user="adminuser",
console_password="s3cretP4ssw0rd",
# power_state="stop",
# rebuild_os="ubuntu-22",
# disk_size=100,
)
pulumi.export("vmStatus", vm.status)
```
```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.NeoliteProProducts(ctx, &biznetgio.NeoliteProProductsArgs{})
if err != nil {
return err
}
osList, err := biznetgio.NeoliteProOsList(ctx, &biznetgio.NeoliteProOsListArgs{
ProductId: products.Products[0].ProductId,
})
if err != nil {
return err
}
keypair, err := biznetgio.NewNeoliteProKeypair(ctx, "pro-keypair", &biznetgio.NeoliteProKeypairArgs{
Name: pulumi.String("neo-lite-pro-key"),
})
if err != nil {
return err
}
vm, err := biznetgio.NewNeoliteProVm(ctx, "pro-vm", &biznetgio.NeoliteProVmArgs{
VmName: pulumi.String("neo-pro-1"),
ProductId: pulumi.Int(products.Products[0].ProductId),
SelectOs: pulumi.String(osList.Oss[0].Name),
KeypairId: keypair.ID().ToIntOutput(),
Cycle: pulumi.String("m"),
SshAndConsoleUser: pulumi.String("adminuser"),
ConsolePassword: pulumi.String("s3cretP4ssw0rd"),
// PowerState: pulumi.String("stop"),
// RebuildOs: pulumi.String("ubuntu-22"),
// DiskSize: pulumi.Int(100),
})
if err != nil {
return err
}
ctx.Export("vmStatus", vm.Status)
return nil
})
}
```
```csharp theme={null}
using System;
using System.Collections.Generic;
using Pulumi;
using Shirasakaren.Biznetgio;
return await Deployment.RunAsync(() =>
{
var products = NeoliteProProducts.Invoke();
var osList = NeoliteProOsList.Invoke(new NeoliteProOsListInvokeArgs
{
ProductId = products.Apply(p => p.Products[0].ProductId),
});
var keypair = new NeoliteProKeypair("pro-keypair", new NeoliteProKeypairArgs
{
Name = "neo-lite-pro-key",
});
var vm = new NeoliteProVm("pro-vm", new NeoliteProVmArgs
{
VmName = "neo-pro-1",
ProductId = products.Apply(p => p.Products[0].ProductId),
SelectOs = osList.Apply(o => o.Oss[0].Name),
KeypairId = keypair.Id.Apply(v => int.Parse(v)),
Cycle = "m",
SshAndConsoleUser = "adminuser",
ConsolePassword = "s3cretP4ssw0rd",
// PowerState = "stop",
// RebuildOs = "ubuntu-22",
// DiskSize = 100,
});
return new Dictionary
{
["vmStatus"] = vm.Status,
};
});
```
```java theme={null}
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.neoliteProProducts();
var osList = BiznetgioFunctions.neoliteProOsList(
NeoliteProOsListArgs.builder()
.productId(products.applyValue(p -> p.products().get(0).productId()))
.build());
var keypair = new NeoliteProKeypair("pro-keypair",
NeoliteProKeypairArgs.builder()
.name("neo-lite-pro-key")
.build());
var vm = new NeoliteProVm("pro-vm",
NeoliteProVmArgs.builder()
.vmName("neo-pro-1")
.productId(products.applyValue(p -> p.products().get(0).productId()))
.selectOs(osList.applyValue(o -> o.oss().get(0).name()))
.keypairId(keypair.id().applyValue(Integer::parseInt))
.cycle("m")
.sshAndConsoleUser("adminuser")
.consolePassword("s3cretP4ssw0rd")
// .powerState("stop")
// .rebuildOs("ubuntu-22")
// .diskSize(100)
.build());
ctx.export("vmStatus", vm.status());
}
}
```
```yaml theme={null}
resources:
vm:
type: biznetgio:index:NeoliteProVm
properties:
vmName: neo-pro-1
productId: ${products[0].productId}
selectOs: ${osList[0].name}
keypairId: ${fn::toNumber(keypair.id)}
cycle: m
sshAndConsoleUser: adminuser
consolePassword: s3cretP4ssw0rd
```
Identical inputs to [`NeoliteVm`](/pulumi/resources/neolite#biznetgioindexneolitevm) minus `migrateToPro`:
| Input | Type | Required | Notes |
| ------------------- | -------------- | -------- | --------------------------------------------------------- |
| `sshAndConsoleUser` | string | yes | |
| `consolePassword` | string, secret | yes | write-only |
| `productId` | int64 | yes | from `neoliteProProducts`; change triggers change-package |
| `selectOs` | string | yes | from `neoliteProOsList` |
| `keypairId` | int64 | yes | from `NeoliteProKeypair`; change triggers change-keypair |
| `cycle` | string | yes | `m a q s b t p4 p5` |
| `vmName` | string | no | default `server-name`; updatable |
| `description` | string | no | default `""` |
| `payWithCreditCard` | bool | no | default `true` |
| `promocode` | string | no | default `""` |
| `powerState` | string | no | `start` / `stop` / `suspend` / `resume` / `shutdown` |
| `rebuildOs` | string | no | one-shot destructive reinstall |
| `diskSize` | int64 | no | absolute GB target, grow-only |
Outputs identical to `NeoliteVm` (including `lastInvoice` and redacted `raw`). Import with the numeric account id.
## `biznetgio:index:NeoliteProKeypair`
Same shape as [`NeoliteKeypair`](/pulumi/resources/neolite#biznetgioindexneolitekeypair), in the Pro pool:
```typescript theme={null}
const keypair = new biznetgio.NeoliteProKeypair("pro-keypair", {
name: "neo-lite-pro-key",
});
```
```python theme={null}
keypair = pulumi_biznetgio.NeoliteProKeypair(
"pro-keypair",
name="neo-lite-pro-key",
)
```
```go theme={null}
keypair, err := biznetgio.NewNeoliteProKeypair(ctx, "pro-keypair", &biznetgio.NeoliteProKeypairArgs{
Name: pulumi.String("neo-lite-pro-key"),
})
```
```csharp theme={null}
var keypair = new NeoliteProKeypair("pro-keypair", new NeoliteProKeypairArgs
{
Name = "neo-lite-pro-key",
});
```
```java theme={null}
var keypair = new NeoliteProKeypair("pro-keypair",
NeoliteProKeypairArgs.builder()
.name("neo-lite-pro-key")
.build());
```
```yaml theme={null}
keypair:
type: biznetgio:index:NeoliteProKeypair
properties:
name: neo-lite-pro-key
```
Input `name`; outputs `keypairId`, `publicKey`, `privateKey` (secret, once). No update.
## `biznetgio:index:NeoliteProSnapshot`
Same shape as [`NeoliteSnapshot`](/pulumi/resources/neolite#biznetgioindexneolitesnapshot):
```typescript theme={null}
const snapshot = new biznetgio.NeoliteProSnapshot("pro-snapshot", {
neoliteAccountId: vm.id.apply((id) => Number(id)),
name: "pro-snapshot",
cycle: "m",
});
```
```python theme={null}
snapshot = pulumi_biznetgio.NeoliteProSnapshot(
"pro-snapshot",
neolite_account_id=pulumi.Output.from_input(vm.id).apply(int),
name="pro-snapshot",
cycle="m",
)
```
```go theme={null}
snapshot, err := biznetgio.NewNeoliteProSnapshot(ctx, "pro-snapshot", &biznetgio.NeoliteProSnapshotArgs{
NeoliteAccountId: vm.ID().ToIntOutput(),
Name: pulumi.String("pro-snapshot"),
Cycle: pulumi.String("m"),
})
```
```csharp theme={null}
var snapshot = new NeoliteProSnapshot("pro-snapshot", new NeoliteProSnapshotArgs
{
NeoliteAccountId = vm.Id.Apply(v => int.Parse(v)),
Name = "pro-snapshot",
Cycle = "m",
});
```
```java theme={null}
var snapshot = new NeoliteProSnapshot("pro-snapshot",
NeoliteProSnapshotArgs.builder()
.neoliteAccountId(vm.id().applyValue(Integer::parseInt))
.name("pro-snapshot")
.cycle("m")
.build());
```
```yaml theme={null}
snapshot:
type: biznetgio:index:NeoliteProSnapshot
properties:
neoliteAccountId: ${fn::toNumber(vm.id)}
name: pro-snapshot
cycle: m
```
Inputs `neoliteAccountId` (required), `cycle` (required), `name` (default `snapshot-name`), `description`, `payWithCreditCard` (default `true`), `promocode`; outputs `orderId`, `status`. No update.
## `biznetgio:index:NeoliteProDisk`
Same shape as [`NeoliteDisk`](/pulumi/resources/neolite#biznetgioindexneolitedisk) with a 30 GB minimum/default:
```typescript theme={null}
const disk = new biznetgio.NeoliteProDisk("pro-extra", {
productId: 60,
cycle: "m",
neoliteAccountId: vm.id.apply((id) => Number(id)),
serviceName: "pro-extra-disk",
size: 30,
});
```
```python theme={null}
disk = pulumi_biznetgio.NeoliteProDisk(
"pro-extra",
product_id=60,
cycle="m",
neolite_account_id=pulumi.Output.from_input(vm.id).apply(int),
service_name="pro-extra-disk",
size=30,
)
```
```go theme={null}
disk, err := biznetgio.NewNeoliteProDisk(ctx, "pro-extra", &biznetgio.NeoliteProDiskArgs{
ProductId: pulumi.Int(60),
Cycle: pulumi.String("m"),
NeoliteAccountId: vm.ID().ToIntOutput(),
ServiceName: pulumi.String("pro-extra-disk"),
Size: pulumi.Int(30),
})
```
```csharp theme={null}
var disk = new NeoliteProDisk("pro-extra", new NeoliteProDiskArgs
{
ProductId = 60,
Cycle = "m",
NeoliteAccountId = vm.Id.Apply(v => int.Parse(v)),
ServiceName = "pro-extra-disk",
Size = 30,
});
```
```java theme={null}
var disk = new NeoliteProDisk("pro-extra",
NeoliteProDiskArgs.builder()
.productId(60)
.cycle("m")
.neoliteAccountId(vm.id().applyValue(Integer::parseInt))
.serviceName("pro-extra-disk")
.size(30)
.build());
```
```yaml theme={null}
disk:
type: biznetgio:index:NeoliteProDisk
properties:
productId: 60
cycle: m
neoliteAccountId: ${fn::toNumber(vm.id)}
serviceName: pro-extra-disk
size: 30
```
Upgrades send the increment (`additional_size`); shrinking errors.
`productId` and `cycle` have no `replaceOnChanges` tag. If you change either without also changing `size`, `Update` discards the change and writes the *old* value back into state, so the next `pulumi preview` shows the same diff again - it never resolves and never errors. The Terraform equivalent (`biznetgio_neolite_pro_disk`) correctly marks both `RequiresReplace()`. If you need a different disk product or cycle in Pulumi, destroy and recreate the resource.
## Functions
For real pricing and how to pick a specific package instead of trusting `[0]`, see the [Product Catalog](/products/neolite-pro) page.
All five mirror the NEO Lite functions against `/neolite-pros`:
### `biznetgio:index:neoliteProProducts`
No arguments. Same nested structure as `neoliteProducts` (`options`, `billing`, `components`, `prices`).
### `biznetgio:index:neoliteProOsList`
Argument `productId`; returns `oss` (`vmid`, `node`, `name`, `maxmem`, `maxcpu`).
### `biznetgio:index:neoliteProChangePackageOptions`
Argument `accountId`; returns `raw` (secret).
### `biznetgio:index:neoliteProStorageUpgradeOptions`
Argument `accountId`; returns `raw` (secret).
### `biznetgio:index:neoliteProIPAvailability`
Argument `productId`; returns `available` (bool).
# Object Storage (Pulumi)
Source: https://biznetgio.creations.ren/pulumi/resources/object-storage
Pulumi resources and functions for NEO Object Storage
NEO Object Storage is Biznet GIO's S3-compatible storage (`/object-storages` API group). The provider manages the subscription, buckets, S3 credentials, and individual objects through the control-plane API.
Every create/upgrade places a **real paid order**. Quota upgrades are grow-only and bill the increment.
## `biznetgio:index:ObjectStorage`
```typescript theme={null}
import * as biznetgio from "@shirasakaren/biznetgio";
const storage = new biznetgio.ObjectStorage("archive", {
productId: 8,
cycle: "m",
label: "data-archive",
quota: 10, // grow-only; upgrade sends the increment
payWithCreditCard: true,
});
export const storageStatus = storage.status;
```
```python theme={null}
import pulumi
import pulumi_biznetgio
storage = pulumi_biznetgio.ObjectStorage(
"archive",
product_id=8,
cycle="m",
label="data-archive",
quota=10, # grow-only; upgrade sends the increment
pay_with_credit_card=True,
)
pulumi.export("storageStatus", storage.status)
```
```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 {
storage, err := biznetgio.NewObjectStorage(ctx, "archive", &biznetgio.ObjectStorageArgs{
ProductId: pulumi.Int(8),
Cycle: pulumi.String("m"),
Label: pulumi.String("data-archive"),
Quota: pulumi.Int(10),
PayWithCreditCard: pulumi.Bool(true),
})
if err != nil {
return err
}
ctx.Export("storageStatus", storage.Status)
return nil
})
}
```
```csharp theme={null}
using System;
using System.Collections.Generic;
using Pulumi;
using Shirasakaren.Biznetgio;
return await Deployment.RunAsync(() =>
{
var storage = new ObjectStorage("archive", new ObjectStorageArgs
{
ProductId = 8,
Cycle = "m",
Label = "data-archive",
Quota = 10,
PayWithCreditCard = true,
});
return new Dictionary
{
["storageStatus"] = storage.Status,
};
});
```
```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 storage = new ObjectStorage("archive",
ObjectStorageArgs.builder()
.productId(8)
.cycle("m")
.label("data-archive")
.quota(10)
.payWithCreditCard(true)
.build());
ctx.export("storageStatus", storage.status());
}
}
```
```yaml theme={null}
resources:
storage:
type: biznetgio:index:ObjectStorage
properties:
productId: 8
cycle: m
label: data-archive
quota: 10
payWithCreditCard: true
```
| Input | Type | Required | Notes |
| ------------------- | ------ | -------- | ---------------------------------------------------------- |
| `productId` | int64 | yes | see warning below - not create-only, not actionable either |
| `cycle` | string | yes | `m a q s b t p4 p5`; same warning as `productId` |
| `label` | string | yes | 6-16 chars, `[a-zA-Z0-9-_]`; create-only |
| `quota` | int64 | no | default `10` GB, grow-only |
| `promocode` | string | no | create-only |
| `payWithCreditCard` | bool | no | default `true` |
Outputs: `orderId`, `status` (`Active`/`Pending`/`Suspended`/`Terminated`), `raw` (secret). Reads error if the instance status is `terminated`. Import with the numeric account id.
`productId` and `cycle` have no `replaceOnChanges` tag, unlike `label` and `promocode` in the same resource - so a change does not destroy and recreate the instance the way you would expect from every other create-only field on this page. Instead Pulumi calls `Update`, which only ever acts on a `quota` increase; a changed `productId` or `cycle` is written straight into state without any API call, so `pulumi up` reports success and the *next* preview shows no diff, even though the real instance is still on the old plan and cycle. This is the opposite of the [Terraform provider](/terraform/resources/object-storage#biznetgio_object_storage)'s behavior for the same field, which correctly destroys and recreates on a `product_id` change. If you need a different plan or cycle in Pulumi, destroy and recreate the resource yourself - do not rely on changing these two inputs in place.
## `biznetgio:index:ObjectStorageBucket`
```typescript theme={null}
const bucket = new biznetgio.ObjectStorageBucket("assets", {
accountId: storage.id,
name: "my-assets",
acl: "private",
});
```
```python theme={null}
bucket = pulumi_biznetgio.ObjectStorageBucket(
"assets",
account_id=storage.id,
name="my-assets",
acl="private",
)
```
```go theme={null}
bucket, err := biznetgio.NewObjectStorageBucket(ctx, "assets", &biznetgio.ObjectStorageBucketArgs{
AccountId: storage.ID(),
Name: pulumi.String("my-assets"),
Acl: pulumi.String("private"),
})
```
```csharp theme={null}
var bucket = new ObjectStorageBucket("assets", new ObjectStorageBucketArgs
{
AccountId = storage.Id,
Name = "my-assets",
Acl = "private",
});
```
```java theme={null}
var bucket = new ObjectStorageBucket("assets",
ObjectStorageBucketArgs.builder()
.accountId(storage.id())
.name("my-assets")
.acl("private")
.build());
```
```yaml theme={null}
bucket:
type: biznetgio:index:ObjectStorageBucket
properties:
accountId: ${storage.id}
name: my-assets
acl: private
```
| Input | Type | Required | Notes |
| ----------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------- |
| `accountId` | string | yes | instance account id |
| `name` | string | yes | min 3 chars, `[a-zA-Z0-9-_]`; immutable |
| `acl` | string | no | default `""`; one of `private`, `public-read`, `public-read-write`, `authenticated-read`, `log-delivery-write` |
Output: `raw` (secret). Composite id `:`; only `acl` updates in place.
## `biznetgio:index:ObjectStorageCredential`
```typescript theme={null}
const credential = new biznetgio.ObjectStorageCredential("main", {
accountId: storage.id,
active: true, // set false to disable without deleting
});
export const accessKey = credential.accessKey;
export const secretKey = credential.secretKey;
```
```python theme={null}
credential = pulumi_biznetgio.ObjectStorageCredential(
"main",
account_id=storage.id,
active=True, # set false to disable without deleting
)
pulumi.export("accessKey", credential.access_key)
pulumi.export("secretKey", credential.secret_key)
```
```go theme={null}
credential, err := biznetgio.NewObjectStorageCredential(ctx, "main", &biznetgio.ObjectStorageCredentialArgs{
AccountId: storage.ID(),
Active: pulumi.Bool(true),
})
ctx.Export("accessKey", credential.AccessKey)
ctx.Export("secretKey", credential.SecretKey)
```
```csharp theme={null}
var credential = new ObjectStorageCredential("main", new ObjectStorageCredentialArgs
{
AccountId = storage.Id,
Active = true,
});
// credential.AccessKey, credential.SecretKey
```
```java theme={null}
var credential = new ObjectStorageCredential("main",
ObjectStorageCredentialArgs.builder()
.accountId(storage.id())
.active(true)
.build());
ctx.export("accessKey", credential.accessKey());
ctx.export("secretKey", credential.secretKey());
```
```yaml theme={null}
credential:
type: biznetgio:index:ObjectStorageCredential
properties:
accountId: ${storage.id}
active: true
```
| Input | Type | Required | Notes |
| ----------- | ------ | -------- | --------------------------------------------- |
| `accountId` | string | yes | |
| `active` | bool | no | default `true`; update toggles enable/disable |
Outputs: `accessKey` (secret - returned once at create), `secretKey` (secret - shown only once; last state value kept on refresh), `raw` (secret).
Composite id `:<16-hex sha256 prefix of accessKey>` - the plaintext access key never appears in the id; deletion resolves the key from the credentials list.
## `biznetgio:index:ObjectStorageObject`
Exactly one of `source` or `content` must be set - validation fails otherwise.
```typescript theme={null}
const obj = new biznetgio.ObjectStorageObject("index", {
accountId: storage.id,
bucket: bucket.name,
key: "site/index.html",
source: "./index.html",
acl: "public-read",
});
```
```python theme={null}
obj = pulumi_biznetgio.ObjectStorageObject(
"index",
account_id=storage.id,
bucket=bucket.name,
key="site/index.html",
source="./index.html",
acl="public-read",
)
```
```go theme={null}
obj, err := biznetgio.NewObjectStorageObject(ctx, "index", &biznetgio.ObjectStorageObjectArgs{
AccountId: storage.ID(),
Bucket: bucket.Name,
Key: pulumi.String("site/index.html"),
Source: pulumi.String("./index.html"),
Acl: pulumi.String("public-read"),
})
```
```csharp theme={null}
var obj = new ObjectStorageObject("index", new ObjectStorageObjectArgs
{
AccountId = storage.Id,
Bucket = bucket.Name,
Key = "site/index.html",
Source = "./index.html",
Acl = "public-read",
});
```
```java theme={null}
var obj = new ObjectStorageObject("index",
ObjectStorageObjectArgs.builder()
.accountId(storage.id())
.bucket(bucket.name())
.key("site/index.html")
.source("./index.html")
.acl("public-read")
.build());
```
```yaml theme={null}
obj:
type: biznetgio:index:ObjectStorageObject
properties:
accountId: ${storage.id}
bucket: ${bucket.name}
key: site/index.html
source: ./index.html
acl: public-read
```
| Input | Type | Required | Notes |
| ----------- | -------------- | -------- | ---------------------------------------------- |
| `accountId` | string | yes | |
| `bucket` | string | yes | |
| `key` | string | yes | object path (directory + filename) |
| `source` | string | no | local file path; one-of with `content` |
| `content` | string, secret | no | inline content; one-of with `source` |
| `acl` | string | no | default `""`; same canned values as bucket ACL |
Output: `raw` (secret). Composite id `::`; content changes replace the object, only `acl` updates in place.
This resource is **not** suited to large objects or bulk sync. For real workloads, use S3-compatible tooling (AWS CLI, rclone, SDKs) with the credential from `ObjectStorageCredential` - Biznet GIO publishes per-region S3 endpoints of the form `nos..neo.id`.
## Functions
For real pricing and how to pick a specific package instead of trusting `[0]`, see the [Product Catalog](/products/object-storage) page.
### `biznetgio:index:objectStorageInstances`
Argument `status` (optional filter). Returns `instances`: `id`, `label`, `status`, `productId`, `quota`, `raw` (secret).
### `biznetgio:index:objectStorageBuckets`
Argument `accountId` (string). Returns `buckets`: `name`, `acl`, `raw` (secret).
### `biznetgio:index:objectStorageCredentials`
Argument `accountId` (string). Returns `credentials`: `accessKey` (secret), `active`. Secret keys are never returned.
# Quickstart (Terraform)
Source: https://biznetgio.creations.ren/quickstart
Order a NEO Lite VM with the Biznet GIO Terraform provider
From zero to a running NEO Lite VM in about five minutes.
## Prerequisites
* [Terraform](https://developer.hashicorp.com/terraform/install) ≥ 1.0
* A [Biznet GIO](https://biznetgio.com) account
* An API token - see [Authentication](/authentication)
## Get started
The provider reads credentials from environment variables, so no provider block is required:
```bash theme={null}
export BIZNETGIO_API_KEY=""
```
Create `main.tf`:
```hcl theme={null}
terraform {
required_providers {
biznetgio = {
source = "registry.terraform.io/shirasakaren/biznetgio"
}
}
}
provider "biznetgio" {}
data "biznetgio_neolite_products" "all" {}
data "biznetgio_neolite_os_list" "ubuntu" {
product_id = data.biznetgio_neolite_products.all.products[0].product_id
}
resource "biznetgio_neolite_keypair" "main" {
name = "neo-lite-key"
}
resource "biznetgio_neolite_vm" "main" {
ssh_and_console_user = "adminuser"
console_password = "s3cretP4ssw0rd"
vm_name = "neo-lite-1"
product_id = data.biznetgio_neolite_products.all.products[0].product_id
select_os = data.biznetgio_neolite_os_list.ubuntu.oss[0].name
keypair_id = biznetgio_neolite_keypair.main.keypair_id
cycle = "m"
}
output "vm_status" {
value = biznetgio_neolite_vm.main.status
}
```
`products[0]` and `oss[0]` take whichever product and OS the API happens to list first - **not necessarily the cheapest or smallest one.** This quickstart uses them so you have something that runs in one copy-paste, but before you leave this as-is on an account you care about the cost of, read [Understanding the product catalog](/products/overview) and replace `[0]` with a filter for the exact package (for example the cheapest NEO Lite tier, `XS 1.1`) and OS you actually want - see the [NEO Lite catalog](/products/neolite) for the full pricing table and a copy-paste filter.
This step places a real order at whatever price the first-listed product happens to be. If you want to guarantee the lowest cost before running `terraform apply`, do the filtering in [Picking a specific package](/products/neolite#worked-example-picking-xs-1-1-for-the-lowest-cost) first.
```bash theme={null}
terraform init
terraform plan
terraform apply
```
Confirm the plan with `yes`. Creating the VM places a real order on your account and typically takes 1-5 minutes.
```bash theme={null}
terraform output vm_status
```
You should see `"Active"`. Your VM is also visible under NEO Lite in the [portal](https://portal.biznetgio.com).
```bash theme={null}
terraform destroy
```
Destroying the VM resource deletes the server (`DELETE /neolites/{account_id}`).
## Next steps
* [Product Catalog](/products/neolite) - real NEO Lite pricing and how to pick an exact package instead of `[0]`
* [Terraform installation](/terraform/installation) - full provider configuration reference
* [NEO Lite resources](/terraform/resources/neolite) - every NEO Lite resource and data source
* [Billing](/guides/billing) - how orders and payment work
Lost? Reach out to Biznet GIO support at [support@biznetgio.com](mailto:support@biznetgio.com), or open an issue on the [provider repository](https://github.com/shirasakaren/terraform-provider-biznetgio).
# Package registries
Source: https://biznetgio.creations.ren/registries
Every registry the Biznet GIO providers are published to, with install commands
One page with every package, every registry, and the exact install command for each. If a registry link exists here, the package is live there.
## Terraform
The Terraform provider is published on the [Terraform Registry](https://registry.terraform.io/providers/shirasakaren/biznetgio/latest).
```hcl theme={null}
terraform {
required_providers {
biznetgio = {
source = "registry.terraform.io/shirasakaren/biznetgio"
}
}
}
```
Provider page with docs and install instructions.
GitHub repository for the provider.
## Pulumi
The Pulumi provider ships a plugin binary plus one SDK per language. The plugin downloads itself from GitHub Releases automatically on first use, so you only install the SDK.
Registry: [npm](https://www.npmjs.com/package/@shirasakaren/biznetgio)
```bash theme={null}
npm install @shirasakaren/biznetgio
```
Registry: [PyPI](https://pypi.org/project/pulumi-biznetgio/)
```bash theme={null}
pip install pulumi-biznetgio
```
Registry: [Go module](https://pkg.go.dev/github.com/shirasakaren/pulumi-biznetgio/sdk/go/pulumi-biznetgio) (resolved straight from GitHub)
```bash theme={null}
go get github.com/shirasakaren/pulumi-biznetgio/sdk/go/pulumi-biznetgio
```
Registry: [NuGet](https://www.nuget.org/packages/Shirasakaren.Biznetgio)
```bash theme={null}
dotnet add package Shirasakaren.Biznetgio
```
Registry: [Maven Central](https://central.sonatype.com/artifact/ren.shirasaka/biznetgio)
```groovy theme={null}
// Gradle
implementation("ren.shirasaka:biznetgio")
```
GitHub Releases with `pulumi-resource-biznetgio` for Linux, macOS, and Windows.
Official package listing and API reference.
GitHub repository for the provider.
GitHub repository for this documentation site.
## Package names at a glance
| Registry | Package | Version scheme |
| ------------------ | ------------------------------------------------------------------ | -------------- |
| Terraform Registry | `shirasakaren/biznetgio` | `x.y.z` |
| npm | `@shirasakaren/biznetgio` | `x.y.z` |
| PyPI | `pulumi-biznetgio` | `x.y.z` |
| NuGet | `Shirasakaren.Biznetgio` | `x.y.z` |
| Maven Central | `ren.shirasaka:biznetgio` | `x.y.z` |
| Go module | `github.com/shirasakaren/pulumi-biznetgio/sdk/go/pulumi-biznetgio` | `vx.y.z` tag |
All packages move in lockstep: one provider release publishes every registry at the same version. See [Development](/guides/development) for how releases work.
# Importing (Terraform)
Source: https://biznetgio.creations.ren/terraform/importing
Bring existing Biznet GIO resources into Terraform state
Every resource supports `terraform import`. Most use the numeric account id directly; composite resources use a `:`-separated id.
## Import
```bash theme={null}
terraform import biznetgio_neolite_vm.main 12345
```
After importing, Terraform reads the resource and refreshes all computed attributes. Required inputs must match the live resource - run `terraform plan` and fix any diffs.
## ID formats
| Resource | Import ID |
| ---------------------------------------------- | ----------------------------------------------------------- |
| `biznetgio_neolite_vm` | `` |
| `biznetgio_neolite_keypair` | `` |
| `biznetgio_neolite_snapshot` | `` |
| `biznetgio_neolite_vm_from_snapshot` | `` |
| `biznetgio_neolite_disk` | `` |
| `biznetgio_neolite_pro_vm` | `` |
| `biznetgio_neolite_pro_keypair` | `` |
| `biznetgio_neolite_pro_snapshot` | `` |
| `biznetgio_neolite_pro_disk` | `` |
| `biznetgio_baremetal` | `` |
| `biznetgio_baremetal_keypair` | `` |
| `biznetgio_baremetal_additional_ip` | `` |
| `biznetgio_baremetal_additional_ip_assignment` | `:` |
| `biznetgio_baremetal_elastic_storage` | `` |
| `biznetgio_gpu_instance` | `` |
| `biznetgio_gpu_keypair` | `` |
| `biznetgio_object_storage` | `` |
| `biznetgio_object_storage_bucket` | `:` |
| `biznetgio_object_storage_credential` | `:` (literal or 16-hex hashed form) |
| `biznetgio_object_storage_object` | `::` |
Keypair ids are not interchangeable across services - a NEO Lite keypair id imports into `biznetgio_neolite_keypair` only.
## Composite id examples
```bash theme={null}
# additional IP assignment: server 12345 + additional ip 67890
terraform import biznetgio_baremetal_additional_ip_assignment.main 12345:67890
# bucket inside instance 12345
terraform import biznetgio_object_storage_bucket.assets 12345:my-assets
# credential: access key given literally
terraform import biznetgio_object_storage_credential.main 12345:ABCDEFGHIJKLMNOP
# object inside bucket my-assets
terraform import biznetgio_object_storage_object.index 12345:my-assets:site/index.html
```
Importing a credential stores the **hashed** form of the access key in the id (`:[:16]`) - the plaintext key is never written to state.
# Installation (Terraform)
Source: https://biznetgio.creations.ren/terraform/installation
Install and configure the biznetgio Terraform provider
## Install
Declare the provider in your configuration:
```hcl theme={null}
terraform {
required_providers {
biznetgio = {
source = "registry.terraform.io/shirasakaren/biznetgio"
}
}
}
```
Run `terraform init` to download it. The provider requires **Terraform ≥ 1.0** and speaks protocol 6.0.
Alternatively, build and install from the repository:
```bash theme={null}
git clone https://github.com/shirasakaren/terraform-provider-biznetgio.git
cd terraform-provider-biznetgio
make build
make install
```
Or point Terraform at a development binary with `dev_overrides` in your [CLI config file](https://developer.hashicorp.com/terraform/cli/config/config-file#development-overrides-for-provider-developers):
```hcl theme={null}
provider_installation {
dev_overrides {
"registry.terraform.io/shirasakaren/biznetgio" = "/path/to/terraform-provider-biznetgio"
}
direct {}
}
```
## Configure
This is an unofficial, community-maintained provider by [Shirasaka Ren](/about) - not affiliated with PT Biznet Gio Nusantara.
See [Authentication](/authentication) for the API token. The provider configuration schema:
| Attribute | Type | Required | Default | Env fallback |
| ---------- | ----------------- | -------- | ------------------------------------- | -------------------- |
| `api_key` | string, sensitive | no | - | `BIZNETGIO_API_KEY` |
| `base_url` | string | no | `https://api.portal.biznetgio.com/v1` | `BIZNETGIO_BASE_URL` |
| `timeout` | number (seconds) | no | `30` | - |
```hcl theme={null}
provider "biznetgio" {
api_key = "your-token" # optional if BIZNETGIO_API_KEY is set
base_url = "https://api.portal.biznetgio.com/v1" # optional if BIZNETGIO_BASE_URL is set
timeout = 60 # HTTP request timeout in seconds
}
```
`timeout` is the per-request HTTP timeout - it does not cap the create polling, which uses its own `timeouts` block (see below).
## Resource timeouts
Resources that wait for provisioning accept a `timeouts` block:
```hcl theme={null}
resource "biznetgio_neolite_vm" "main" {
# ...
timeouts {
create = "30m"
update = "30m"
delete = "15m"
}
}
```
Defaults: `create = 20m`, `update = 20m`, `delete = 10m` on resources whose delete path polls; baremetal delete is synchronous. Keypairs, bucket/credential/object resources, and IP assignments provision synchronously and have no timeouts block.
## Versioning
Pin the version:
```hcl theme={null}
terraform {
required_providers {
biznetgio = {
source = "registry.terraform.io/shirasakaren/biznetgio"
version = "0.1.0"
}
}
}
```
See the [repository](https://github.com/shirasakaren/terraform-provider-biznetgio) for releases and the changelog.
# NEO Metal (Terraform)
Source: https://biznetgio.creations.ren/terraform/resources/baremetal
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.
Every create/upgrade places a **real paid order**. Read the [billing guide](/guides/billing) for `cycle` values and `pay_with_credit_card` semantics.
## `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.
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.
## `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 `:` |
| `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:** `:`, 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.
`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.
## Data sources
For real pricing and how to pick a specific package instead of trusting `[0]`, see the [Product Catalog](/products/baremetal) page.
### `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`.
# NEO GPU (Terraform)
Source: https://biznetgio.creations.ren/terraform/resources/gpu
Terraform resources and data sources for NEO GPU instances
NEO GPU rents NVIDIA H200 instances through the `/neo-gpus` API group, billed per subscription cycle or on-demand (hourly). An instance uses exactly one billing mode.
Every create places a **real paid order**. On-demand instances accumulate hourly charges until deleted.
## `biznetgio_gpu_instance`
```hcl theme={null}
data "biznetgio_gpu_products" "all" {}
resource "biznetgio_gpu_keypair" "main" {
name = "gpu-key"
}
resource "biznetgio_gpu_instance" "example" {
product_id = data.biznetgio_gpu_products.all.products[0].product_id
select_os = "ubuntu-22"
keypair_id = biznetgio_gpu_keypair.main.id
service_name = "neo-gpu-1"
ssh_and_console_user = "root"
console_password = "s3cretP4ssw0rd"
pay_with_credit_card = true
subscription = {
cycle = "m"
}
# one-shot actions (change value to fire):
# rebuild_trigger = "rebuild-1"
# reserve_additional_hours_trigger = "reserve-1"
}
```
For hourly billing, replace `subscription` with:
```hcl theme={null}
on_demand = {
additional_hours = 0
}
```
Exactly one of `subscription` or `on_demand` must be set - validation fails otherwise.
| Name | Type | Mode | Notes |
| ---------------------------------- | ---------------- | ------------------- | ------------------------------------------------------------ |
| `id` | string | computed | equals GPU account id |
| `product_id` | int64 | required | from `biznetgio_gpu_products` |
| `select_os` | string | required | from the product's select-OS catalog |
| `keypair_id` | int64 | required | from `biznetgio_gpu_keypair` |
| `ssh_and_console_user` | string | required | |
| `console_password` | string | required, sensitive | create-only |
| `service_name` | string | optional | create-only |
| `promocode` | string | optional | create-only |
| `pay_with_credit_card` | bool | optional | default `true` |
| `subscription` | object attribute | optional | `cycle` (`m` / `a`); one-of with `on_demand` |
| `on_demand` | object attribute | optional | `additional_hours` (default `0`); one-of with `subscription` |
| `rebuild_trigger` | string | optional | one-shot destructive OS reinstall |
| `reserve_additional_hours_trigger` | string | optional | one-shot: reserves additional hour(s) on on-demand instances |
| `status` | string | computed | |
| `order_id` | string | computed | |
| `raw` | string | computed, sensitive | secrets redacted |
| `timeouts` | block | optional | create/update/delete |
Import with the numeric account id.
Changing `product_id`, `select_os`, or `keypair_id` after creation does **nothing** useful, and worse than baremetal's version of this problem: `Update` only ever calls the API for `rebuild_trigger` and `reserve_additional_hours_trigger`, then re-reads the instance from the API and overwrites those three fields back to their real (unchanged) values before saving state. The result is a **permanent, unresolvable plan diff** - every future `terraform plan` shows the same change again, forever, because it's never actually applied and never actually discarded. If you need a different package, OS, or keypair, destroy and recreate the resource.
## `biznetgio_gpu_keypair`
```hcl theme={null}
resource "biznetgio_gpu_keypair" "main" {
name = "gpu-key"
}
```
| Name | Type | Mode | Notes |
| ------------- | ------ | ------------------- | ------------------------------------------- |
| `id` | string | computed | equals `keypair_id` |
| `name` | string | required | create-only |
| `public_key` | string | computed | server-generated |
| `private_key` | string | computed, sensitive | returned once at create; preserved in state |
Update is a no-op. Import with the keypair id.
## Data sources
For real pricing and how to pick a specific package instead of trusting `[0]`, see the [Product Catalog](/products/gpu) page.
### `biznetgio_gpu_products`
GPU catalog with per-product flavors. `products` items: `product_id`, `name`, `description`, `category_name`, and `flavors` (`flavor_id`, `name`).
### `biznetgio_gpu_console`
Mints a console access session for an instance.
```hcl theme={null}
data "biznetgio_gpu_console" "console" {
account_id = biznetgio_gpu_instance.example.id
}
```
Returns `url` (sensitive). **Side-effecting:** every read may create a new session - do not use it in places evaluated during plan diffs.
### `biznetgio_gpu_graph`
Monitoring graph data for an instance.
```hcl theme={null}
data "biznetgio_gpu_graph" "graph" {
account_id = biznetgio_gpu_instance.example.id
timeframe = "hour" # hour | day | week | month | year
}
```
Returns `graph` and `raw` (sensitive).
# NEO Lite (Terraform)
Source: https://biznetgio.creations.ren/terraform/resources/neolite
Terraform resources and data sources for NEO Lite VPS
NEO Lite is Biznet GIO's KVM VPS product, exposed through the `/neolites` API group. The typical workflow chains the catalog data sources into a create: products → OS list → keypair → VM.
Every create/upgrade places a **real paid order**. Read the [billing guide](/guides/billing) for `cycle` values and `pay_with_credit_card` semantics.
## `biznetgio_neolite_vm`
Orders a NEO Lite VM, waits until `Active`, and manages name, keypair, package, storage, power state, and OS rebuild in place.
```hcl theme={null}
data "biznetgio_neolite_products" "all" {}
data "biznetgio_neolite_os_list" "ubuntu" {
product_id = data.biznetgio_neolite_products.all.products[0].product_id
}
resource "biznetgio_neolite_keypair" "main" {
name = "neo-lite-key"
}
resource "biznetgio_neolite_vm" "main" {
ssh_and_console_user = "adminuser"
console_password = "s3cretP4ssw0rd"
vm_name = "neo-lite-1"
product_id = data.biznetgio_neolite_products.all.products[0].product_id
select_os = data.biznetgio_neolite_os_list.ubuntu.oss[0].name
keypair_id = biznetgio_neolite_keypair.main.keypair_id
cycle = "m"
# 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
}
```
| Name | Type | Mode | Notes |
| ------------------------------------- | ------ | ------------------- | ------------------------------------------------------------------------------------- |
| `id` | string | computed | equals `account_id` |
| `ssh_and_console_user` | string | required | 6-32 chars, `[a-zA-Z0-9\-.]`; create-only |
| `console_password` | string | required, sensitive | ≥8 chars, alphanumeric with upper+lower+digit; create-only |
| `product_id` | int64 | required | from `biznetgio_neolite_products`; change triggers change-package |
| `select_os` | string | required | from `biznetgio_neolite_os_list`; create-only (OS change = `rebuild_os`) |
| `keypair_id` | int64 | required | from `biznetgio_neolite_keypair`; change triggers change-keypair |
| `cycle` | string | required | `m a q s b t p4 p5`; create-only |
| `vm_name` | string | optional | default `server-name`; 6-16 chars; updatable |
| `description` | string | optional | default `""`; create-only |
| `pay_with_credit_card` | bool | optional | default `true`; `false` leaves the invoice unpaid |
| `promocode` | string | optional | create-only |
| `power_state` | string | optional | `start stop suspend resume shutdown`; API called only on change |
| `rebuild_os` | string | optional | one-shot destructive OS reinstall; change value to re-fire |
| `migrate_to_pro` | string | optional | one-shot migration; value = NEO Lite Pro `product_id` |
| `disk_size` | int64 | optional | absolute GB target, grow-only |
| `status` | string | computed | `Active` / `Pending` / `Suspended` / `Terminated` |
| `order_id` | string | computed | invoice order id |
| `uptime` | int64 | computed | seconds |
| `maxdisk` / `maxmem` / `mem` / `cpus` | int64 | computed | capacity and current usage |
| `ciuser` | string | computed | cloud-init user |
| `cipassword` | string | computed, sensitive | cloud-init password |
| `osname` | string | computed | installed OS |
| `region` / `region_label` | string | computed | |
| `next_due` | string | computed | next billing date |
| `recurring_amount` | int64 | computed | |
| `billingcycle` | string | computed | |
| `product_name` | string | computed | |
| `last_invoice` | block | computed | `id`, `paid_id`, `status`, `date`, `duedate`, `paybefore`, `datepaid`, `invoice_type` |
| `raw` | string | computed, sensitive | last API response JSON, secrets redacted |
| `timeouts` | block | optional | create/update/delete, defaults 20m/20m/10m |
Import with the numeric account id: `terraform import biznetgio_neolite_vm.main 12345`.
## `biznetgio_neolite_keypair`
SSH keypair in the NEO Lite pool. Key material is generated server-side; the private key appears only once, in the create response.
```hcl theme={null}
resource "biznetgio_neolite_keypair" "main" {
name = "neo-lite-key"
}
```
| Name | Type | Mode | Notes |
| ------------- | ------ | ------------------- | ------------------------------------------- |
| `id` | string | computed | equals `keypair_id` |
| `name` | string | required | create-only |
| `keypair_id` | int64 | computed | |
| `public_key` | string | computed | server-generated |
| `private_key` | string | computed, sensitive | returned once at create; preserved in state |
Updates are rejected - change `name` to recreate. Import with the keypair id. Keypairs are per-service: NEO Lite keypairs cannot be used on NEO Lite Pro, NEO Metal, or NEO GPU.
## `biznetgio_neolite_snapshot`
Paid snapshot of a NEO Lite VM. Snapshots have their own account id and cannot be updated.
```hcl theme={null}
resource "biznetgio_neolite_snapshot" "main" {
neolite_account_id = biznetgio_neolite_vm.main.id
name = "snapshot-1"
description = "pre-upgrade snapshot"
cycle = "m"
}
```
| Name | Type | Mode | Notes |
| ---------------------- | ------ | -------- | ----------------------------------- |
| `id` | string | computed | equals snapshot `account_id` |
| `neolite_account_id` | int64 | required | VM to snapshot |
| `cycle` | string | required | `m a q s b t p4 p5` |
| `name` | string | optional | default `snapshot-name`; 6-16 chars |
| `description` | string | optional | default `""` |
| `pay_with_credit_card` | bool | optional | default `true` |
| `promocode` | string | optional | |
| `status` | string | computed | |
| `order_id` | string | computed | |
| `timeouts` | block | optional | create/delete |
All inputs are create-only; any change recreates the snapshot. Import with the snapshot account id.
## `biznetgio_neolite_vm_from_snapshot`
Restores a snapshot into a brand-new NEO Lite VM. Deleting this resource deletes the new VM (never the snapshot).
```hcl theme={null}
resource "biznetgio_neolite_vm_from_snapshot" "main" {
snapshot_id = biznetgio_neolite_snapshot.main.id
product_id = data.biznetgio_neolite_products.all.products[0].product_id
cycle = "m"
keypair_id = biznetgio_neolite_keypair.main.keypair_id
name = "restored-1"
ssh_and_console_user = "adminuser"
console_password = "s3cretP4ssw0rd"
}
```
| Name | Type | Mode | Notes |
| ---------------------- | ------ | ------------------- | ----------------------------- |
| `id` | string | computed | account id of the restored VM |
| `snapshot_id` | int64 | required | source snapshot account id |
| `product_id` | int64 | required | |
| `cycle` | string | required | `m a q s b t p4 p5` |
| `keypair_id` | int64 | required | |
| `name` | string | required | 6-16 chars |
| `ssh_and_console_user` | string | required | |
| `console_password` | string | required, sensitive | |
| `description` | string | optional | default `""` |
| `promocode` | string | optional | |
| `pay_with_credit_card` | bool | optional | default `true` |
| `status` | string | computed | |
| `order_id` | string | computed | |
| `timeouts` | block | optional | create/delete |
All inputs are create-only. Import with the restored VM's account id.
## `biznetgio_neolite_disk`
Additional (extra) disk attached to a NEO Lite VM. Size is grow-only and upgrades send the increment, not the absolute value.
```hcl theme={null}
resource "biznetgio_neolite_disk" "main" {
product_id = 60
cycle = "m"
neolite_account_id = biznetgio_neolite_vm.main.id
service_name = "extra-disk"
size = 60
}
```
| Name | Type | Mode | Notes |
| ---------------------- | ------ | ------------------- | -------------------------------------- |
| `id` | string | computed | equals disk `account_id` |
| `product_id` | int64 | required | from `GET /neolites/disks/products` |
| `cycle` | string | required | `m a q s b t p4 p5` |
| `neolite_account_id` | int64 | required | target VM |
| `service_name` | string | optional | default `service-name`; 6-16 chars |
| `size` | int64 | optional | default `60` GB, minimum 60, grow-only |
| `promocode` | string | optional | |
| `pay_with_credit_card` | bool | optional | default `true` |
| `status` | string | computed | |
| `order_id` | string | computed | |
| `raw` | string | computed, sensitive | |
| `timeouts` | block | optional | create/update/delete |
Import with the disk account id.
## Data sources
For real pricing and how to pick a specific package instead of trusting `[0]`, see the [Product Catalog](/products/neolite) page.
### `biznetgio_neolite_products`
The product catalog - use it to fill `product_id`.
```hcl theme={null}
data "biznetgio_neolite_products" "all" {}
```
`products` list items: `product_id`, `name`, `description`, `category_id`, `category_name`, plus `options` (`type`, `cores`, `memory` MB, `allow_downgrade`) and nested `billing` (`label`, `cycle`, `price`, and per-component price steps).
### `biznetgio_neolite_os_list`
Available OS images for a product - use `oss[].name` to fill `select_os`.
```hcl theme={null}
data "biznetgio_neolite_os_list" "ubuntu" {
product_id = 123
}
```
Argument: `product_id` (required). `oss` list items: `vmid`, `node`, `name`, `maxmem`, `maxcpu`.
### `biznetgio_neolite_change_package_options`
Target packages and prices for an account's change-package operation. The upstream response is unmodeled, so it is exported as `raw` JSON.
```hcl theme={null}
data "biznetgio_neolite_change_package_options" "opts" {
account_id = biznetgio_neolite_vm.main.id
}
```
### `biznetgio_neolite_storage_upgrade_options`
Per-GB storage upgrade pricing for an account; exported as `raw` JSON. Argument: `account_id`.
### `biznetgio_neolite_ip_availability`
Checks public-IP availability for a product.
```hcl theme={null}
data "biznetgio_neolite_ip_availability" "check" {
product_id = 123
}
```
Returns `available` (bool).
# NEO Lite Pro (Terraform)
Source: https://biznetgio.creations.ren/terraform/resources/neolite-pro
Terraform resources and data sources for NEO Lite Pro VPS
NEO Lite Pro is the premium KVM VPS tier (dedicated vCPU/RAM, NVMe SSD), exposed through the `/neolite-pros` API group. The schema mirrors NEO Lite - with its own keypair, disk, and snapshot pools - and drops `migrate_to_pro` (Pro is the migration *destination*).
Every create/upgrade places a **real paid order**. Read the [billing guide](/guides/billing) for `cycle` values and `pay_with_credit_card` semantics.
## `biznetgio_neolite_pro_vm`
```hcl theme={null}
data "biznetgio_neolite_pro_products" "all" {}
data "biznetgio_neolite_pro_os_list" "ubuntu" {
product_id = data.biznetgio_neolite_pro_products.all.products[0].product_id
}
resource "biznetgio_neolite_pro_keypair" "main" {
name = "neo-lite-pro-key"
}
resource "biznetgio_neolite_pro_vm" "main" {
ssh_and_console_user = "adminuser"
console_password = "s3cretP4ssw0rd"
vm_name = "neo-pro-1"
product_id = data.biznetgio_neolite_pro_products.all.products[0].product_id
select_os = data.biznetgio_neolite_pro_os_list.ubuntu.oss[0].name
keypair_id = biznetgio_neolite_pro_keypair.main.keypair_id
cycle = "m"
}
```
| Name | Type | Mode | Notes |
| ------------------------------------- | ------ | ------------------- | ------------------------------------------------------------------------------------- |
| `id` | string | computed | equals `account_id` |
| `ssh_and_console_user` | string | required | 6-32 chars, `[a-zA-Z0-9\-.]`; create-only |
| `console_password` | string | required, sensitive | ≥8 chars, alphanumeric with upper+lower+digit; create-only |
| `product_id` | int64 | required | from `biznetgio_neolite_pro_products`; change triggers change-package |
| `select_os` | string | required | from `biznetgio_neolite_pro_os_list`; create-only (OS change = `rebuild_os`) |
| `keypair_id` | int64 | required | from `biznetgio_neolite_pro_keypair`; change triggers change-keypair |
| `cycle` | string | required | `m a q s b t p4 p5`; create-only |
| `vm_name` | string | optional | default `server-name`; 6-16 chars; updatable |
| `description` | string | optional | default `""`; create-only |
| `pay_with_credit_card` | bool | optional | default `true` |
| `promocode` | string | optional | create-only |
| `power_state` | string | optional | `start stop suspend resume shutdown`; API called only on change |
| `rebuild_os` | string | optional | one-shot destructive OS reinstall; change value to re-fire |
| `disk_size` | int64 | optional | absolute GB target, grow-only |
| `status` | string | computed | `Active` / `Pending` / `Suspended` / `Terminated` |
| `order_id` | string | computed | |
| `uptime` | int64 | computed | seconds |
| `maxdisk` / `maxmem` / `mem` / `cpus` | int64 | computed | |
| `ciuser` | string | computed | |
| `cipassword` | string | computed, sensitive | |
| `osname` | string | computed | |
| `region` / `region_label` | string | computed | |
| `next_due` | string | computed | next billing date |
| `recurring_amount` | int64 | computed | |
| `billingcycle` | string | computed | |
| `product_name` | string | computed | |
| `last_invoice` | block | computed | `id`, `paid_id`, `status`, `date`, `duedate`, `paybefore`, `datepaid`, `invoice_type` |
| `raw` | string | computed, sensitive | secrets redacted |
| `timeouts` | block | optional | create/update/delete, defaults 20m/20m/10m |
Import with the numeric account id. To migrate a NEO Lite VM into this tier, use `migrate_to_pro` on `biznetgio_neolite_vm` instead of creating here.
## `biznetgio_neolite_pro_keypair`
Identical to `biznetgio_neolite_keypair`, but in the NEO Lite Pro pool.
```hcl theme={null}
resource "biznetgio_neolite_pro_keypair" "main" {
name = "neo-lite-pro-key"
}
```
| Name | Type | Mode | Notes |
| ------------- | ------ | ------------------- | ------------------------------------------- |
| `id` | string | computed | equals `keypair_id` |
| `name` | string | required | create-only |
| `keypair_id` | int64 | computed | |
| `public_key` | string | computed | |
| `private_key` | string | computed, sensitive | returned once at create; preserved in state |
Updates are rejected. Import with the keypair id.
## `biznetgio_neolite_pro_snapshot`
Identical to `biznetgio_neolite_snapshot`, for Pro VMs.
```hcl theme={null}
resource "biznetgio_neolite_pro_snapshot" "main" {
neolite_account_id = biznetgio_neolite_pro_vm.main.id
name = "pro-snapshot"
cycle = "m"
}
```
| Name | Type | Mode | Notes |
| ---------------------- | ------ | -------- | ---------------------------- |
| `id` | string | computed | equals snapshot `account_id` |
| `neolite_account_id` | int64 | required | |
| `cycle` | string | required | `m a q s b t p4 p5` |
| `name` | string | optional | default `snapshot-name` |
| `description` | string | optional | default `""` |
| `pay_with_credit_card` | bool | optional | default `true` |
| `promocode` | string | optional | |
| `status` | string | computed | |
| `order_id` | string | computed | |
| `timeouts` | block | optional | create/delete |
All inputs create-only. Import with the snapshot account id.
## `biznetgio_neolite_pro_disk`
Additional disk for a NEO Lite Pro VM. Same semantics as `biznetgio_neolite_disk`, with a 30 GB minimum.
```hcl theme={null}
resource "biznetgio_neolite_pro_disk" "main" {
product_id = 60
cycle = "m"
neolite_account_id = biznetgio_neolite_pro_vm.main.id
service_name = "pro-extra-disk"
size = 30
}
```
| Name | Type | Mode | Notes |
| ---------------------- | ------ | ------------------- | --------------------------------------- |
| `id` | string | computed | equals disk `account_id` |
| `product_id` | int64 | required | from `GET /neolite-pros/disks/products` |
| `cycle` | string | required | `m a q s b t p4 p5` |
| `neolite_account_id` | int64 | required | |
| `service_name` | string | optional | default `service-name` |
| `size` | int64 | optional | default `30` GB, minimum 30, grow-only |
| `promocode` | string | optional | |
| `pay_with_credit_card` | bool | optional | default `true` |
| `status` | string | computed | |
| `order_id` | string | computed | |
| `raw` | string | computed, sensitive | |
| `timeouts` | block | optional | create/update/delete |
Import with the disk account id.
## Data sources
For real pricing and how to pick a specific package instead of trusting `[0]`, see the [Product Catalog](/products/neolite-pro) page.
All five mirror the NEO Lite data sources, targeting the `/neolite-pros` group:
### `biznetgio_neolite_pro_products`
Product catalog; `products` items include `product_id`, `name`, `description`, `category_id`, `category_name`, `options`, and nested `billing`.
### `biznetgio_neolite_pro_os_list`
OS images for a product (`product_id` argument required); `oss` items: `vmid`, `node`, `name`, `maxmem`, `maxcpu`.
### `biznetgio_neolite_pro_change_package_options`
Raw JSON of change-package options for an account (`account_id` argument).
### `biznetgio_neolite_pro_storage_upgrade_options`
Raw JSON of storage upgrade pricing for an account (`account_id` argument).
### `biznetgio_neolite_pro_ip_availability`
`product_id` argument; returns `available` (bool).
# Object Storage (Terraform)
Source: https://biznetgio.creations.ren/terraform/resources/object-storage
Terraform resources and data sources for NEO Object Storage
NEO Object Storage is Biznet GIO's S3-compatible storage (`/object-storages` API group). The provider manages the subscription itself, buckets, S3 credentials, and individual objects through the control-plane API.
Every create/upgrade places a **real paid order**. Quota upgrades are grow-only and bill the increment.
## `biznetgio_object_storage`
The subscribed Object Storage instance (S3 tenant). Quota is grow-only; updates send the increment.
```hcl theme={null}
resource "biznetgio_object_storage" "example" {
product_id = 8
cycle = "m"
label = "data-archive"
quota = 10
pay_with_credit_card = true
}
```
| Name | Type | Mode | Notes |
| ---------------------- | ------ | ------------------- | ------------------------------------------------- |
| `id` | string | computed | equals numeric `account_id` |
| `product_id` | int64 | required | create-only |
| `cycle` | string | required | `m a q s b t p4 p5`; create-only |
| `label` | string | required | 6-16 chars, `[a-zA-Z0-9\-_]`; create-only |
| `quota` | int64 | optional | default `10` GB, minimum 10, grow-only |
| `promocode` | string | optional | create-only |
| `pay_with_credit_card` | bool | optional | default `true` |
| `order_id` | string | computed | |
| `status` | string | computed | `Active` / `Pending` / `Suspended` / `Terminated` |
| `raw` | string | computed, sensitive | |
| `timeouts` | block | optional | create/update/delete |
Import with the numeric account id.
`product_id` and `cycle` are correctly create-only here: a change destroys and recreates the whole instance, deleting every bucket, credential, and object inside it. This is the opposite of the [Pulumi provider](/pulumi/resources/object-storage#biznetgio:index:ObjectStorage)'s behavior for the same fields, which silently ignores a `productId`/`cycle` change instead of replacing the resource - if you use both providers, do not assume they behave the same way here.
## `biznetgio_object_storage_bucket`
A bucket inside an instance. Only the ACL is mutable.
```hcl theme={null}
resource "biznetgio_object_storage_bucket" "assets" {
account_id = biznetgio_object_storage.example.id
name = "my-assets"
acl = "private"
}
```
| Name | Type | Mode | Notes |
| ------------ | ------ | ------------------- | -------------------------------------------------------------------------------------------------------------- |
| `id` | string | computed | composite `:` |
| `account_id` | string | required | instance account id |
| `name` | string | required | min 3 chars, `[a-zA-Z0-9\-_]`; immutable |
| `acl` | string | optional | default `""`; one of `private`, `public-read`, `public-read-write`, `authenticated-read`, `log-delivery-write` |
| `raw` | string | computed, sensitive | |
**Import ID format:** `:`, e.g. `terraform import biznetgio_object_storage_bucket.assets 12345:my-assets`.
## `biznetgio_object_storage_credential`
An S3 access/secret key pair. The secret key is shown only once at creation and can never be re-fetched.
```hcl theme={null}
resource "biznetgio_object_storage_credential" "main" {
account_id = biznetgio_object_storage.example.id
active = true # set false to disable without deleting
}
```
| Name | Type | Mode | Notes |
| ------------ | ------ | ------------------- | -------------------------------------------------------------------------------------------------------- |
| `id` | string | computed | `:<16-hex sha256 prefix of access_key>` - the plaintext access key is never stored in the id |
| `account_id` | string | required | |
| `access_key` | string | computed, sensitive | returned once at create |
| `secret_key` | string | computed, sensitive | shown only once; preserved from state on refresh |
| `active` | bool | optional | default `true`; update toggles enable/disable |
| `raw` | string | computed, sensitive | |
**Import ID format:** `:` - the access key may be given literally or in its 16-hex hashed form.
## `biznetgio_object_storage_object`
Convenience wrapper that uploads a single object through the control-plane API. Exactly one of `source` or `content` must be set.
```hcl theme={null}
resource "biznetgio_object_storage_object" "index" {
account_id = biznetgio_object_storage.example.id
bucket = biznetgio_object_storage_bucket.assets.name
key = "site/index.html"
source = "./index.html"
acl = "public-read"
}
```
| Name | Type | Mode | Notes |
| ------------ | ------ | ------------------- | ---------------------------------------------- |
| `id` | string | computed | composite `::` |
| `account_id` | string | required | |
| `bucket` | string | required | |
| `key` | string | required | object path |
| `source` | string | optional | local file path; one-of with `content` |
| `content` | string | optional, sensitive | inline content; one-of with `source` |
| `acl` | string | optional | default `""`; same canned values as bucket ACL |
| `raw` | string | computed, sensitive | |
Content changes replace the object; only `acl` updates in place.
This resource is **not** suited to large objects or bulk sync. For real workloads, use S3-compatible tooling (AWS CLI, rclone, SDKs) with the credential from `biznetgio_object_storage_credential` - Biznet GIO publishes per-region S3 endpoints of the form `nos..neo.id`.
**Import ID format:** `::`, e.g. `terraform import biznetgio_object_storage_object.index 12345:my-assets:site/index.html`.
## Data sources
For real pricing and how to pick a specific package instead of trusting `[0]`, see the [Product Catalog](/products/object-storage) page.
### `biznetgio_object_storage_instances`
```hcl theme={null}
data "biznetgio_object_storage_instances" "all" {
status = "Active" # optional filter: Active | Pending | Suspended | Terminated
}
```
`instances` items: `id`, `label`, `status`, `product_id`, `quota`, `raw`.
### `biznetgio_object_storage_buckets`
Buckets inside an instance (`account_id` argument required). Items: `name`, `acl`, `raw`.
### `biznetgio_object_storage_credentials`
Credentials of an instance (`account_id` argument required). Items: `access_key` (sensitive), `active`. Secret keys are never returned.
# CI/CD with GitHub Actions
Source: https://biznetgio.creations.ren/tutorials/cicd
Automate plan and apply (or preview and up) with pull request review
The goal: open a pull request, a bot posts the plan/preview as a comment automatically, a human reviews it, and merging to `main` applies it for real, gated behind a required approval. This tutorial wires that up for both providers.
This assumes the [project structure](/tutorials/project-structure) tutorial's `infra/` folder, and a token already stored as a GitHub Actions secret per [Manage secrets the right way](/tutorials/secrets-management).
## Terraform
`.github/workflows/terraform.yml`:
````yaml theme={null}
name: terraform
on:
pull_request:
paths: ["infra/**"]
push:
branches: [main]
paths: ["infra/**"]
permissions:
contents: read
pull-requests: write
jobs:
plan:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
defaults:
run:
working-directory: infra
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- run: terraform init
env:
BIZNETGIO_API_KEY: ${{ secrets.BIZNETGIO_API_KEY }}
- run: terraform plan -no-color -out=tfplan
env:
BIZNETGIO_API_KEY: ${{ secrets.BIZNETGIO_API_KEY }}
- run: terraform show -no-color tfplan > plan.txt
- uses: actions/github-script@v7
with:
script: |
const fs = require('fs')
const plan = fs.readFileSync('infra/plan.txt', 'utf8')
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "```\n" + plan.slice(0, 60000) + "\n```"
})
apply:
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment: production
defaults:
run:
working-directory: infra
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- run: terraform init
env:
BIZNETGIO_API_KEY: ${{ secrets.BIZNETGIO_API_KEY }}
- run: terraform apply -auto-approve
env:
BIZNETGIO_API_KEY: ${{ secrets.BIZNETGIO_API_KEY }}
````
The `environment: production` line on the `apply` job is what lets you require an approval before it runs: in the repository's **Settings → Environments → production**, add required reviewers, and the job pauses until one of them approves it, even though it already passed CI.
## Pulumi
Pulumi ships an official action that already knows how to comment a preview onto a pull request, so there's no manual scripting step. It needs a second secret, `PULUMI_ACCESS_TOKEN`, a Pulumi Cloud token separate from your Biznet GIO one, because the action logs in to Pulumi Cloud to read and write the stack's state.
`.github/workflows/pulumi.yml`:
```yaml theme={null}
name: pulumi
on:
pull_request:
paths: ["infra/**"]
push:
branches: [main]
paths: ["infra/**"]
jobs:
preview:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pulumi/actions@v7
with:
command: preview
stack-name: production
work-dir: infra
comment-on-pr: true
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
BIZNETGIO_API_KEY: ${{ secrets.BIZNETGIO_API_KEY }}
up:
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: pulumi/actions@v7
with:
command: up
stack-name: production
work-dir: infra
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
BIZNETGIO_API_KEY: ${{ secrets.BIZNETGIO_API_KEY }}
```
Same trick as Terraform: `environment: production` on the `up` job gates it behind required reviewers configured in the repository settings.
## Require the check before merge
Turn on branch protection for `main`, and mark the `plan` (Terraform) or `preview` (Pulumi) job as a required status check. That makes it impossible to merge a pull request whose diff nobody has seen.
## Next steps
* [Reusable modules and components](/tutorials/modules-and-components) - package the resources this pipeline deploys so staging and production stay in sync
# Environments: dev, staging, and production
Source: https://biznetgio.creations.ren/tutorials/environments
Keep environments isolated with Terraform workspaces and Pulumi stacks
One set of configuration files, run against several separate environments, each with its own state and its own settings. That's the whole idea: the same `main.tf` or `index.ts` from the [project structure](/tutorials/project-structure) tutorial, applied three times with three different answers to "how big" and "who pays."
## Terraform workspaces
A workspace is an isolated slot of state within the same backend. Every workspace shares the same configuration files.
```bash theme={null}
terraform workspace new staging
terraform workspace new production
terraform workspace list
terraform workspace select staging
```
Reference the current workspace inside your configuration with `terraform.workspace`. The `data` blocks and the `biznetgio_neolite_keypair` resource are exactly what the [quickstart](/quickstart) already declared in full - what's different here is that `product_id` is no longer `products[0]`. It's picked deliberately per workspace, using the real package names from the [NEO Lite catalog](/products/neolite):
```hcl theme={null}
data "biznetgio_neolite_products" "all" {}
locals {
# Real NEO Lite package names - see /products/neolite for the full pricing table.
# dev gets the cheapest tier on purpose; staging matches production so it
# actually catches production-shaped bugs.
tier_by_workspace = {
dev = "XS 1.1" # 1 vCPU / 1 GB - enough to smoke-test a plan/apply cycle
staging = "MS 4.2" # 2 vCPU / 4 GB - same tier as production
production = "MS 4.2"
}
matching_products = [
for p in data.biznetgio_neolite_products.all.products :
p if p.name == local.tier_by_workspace[terraform.workspace]
]
# Errors at plan time if the name above doesn't match anything on your
# account, instead of silently falling back to whatever products[0] is.
selected_product = local.matching_products[0]
}
data "biznetgio_neolite_os_list" "ubuntu" {
product_id = local.selected_product.product_id
}
resource "biznetgio_neolite_vm" "main" {
vm_name = "web-${terraform.workspace}"
product_id = local.selected_product.product_id
select_os = data.biznetgio_neolite_os_list.ubuntu.oss[0].name
keypair_id = biznetgio_neolite_keypair.main.keypair_id
cycle = "m"
ssh_and_console_user = "adminuser"
console_password = var.console_password
# cheap and reversible while testing, real money in production
pay_with_credit_card = terraform.workspace == "production"
}
```
Confirm `"XS 1.1"` and `"MS 4.2"` against your own account's catalog output before relying on them - see [Step 1 in the catalog overview](/products/overview#step-1-look-at-your-own-catalog-before-you-filter-anything). `select_os` still uses `oss[0]` here since OS lists are usually short and dominated by one obvious choice; apply the same name-filter pattern to it if that's not true for your account.
Always check which workspace is selected before applying: `terraform workspace show`. Applying to the wrong workspace is the single most common way people accidentally touch production. Consider wrapping `apply` in a script or CI job that requires the workspace name as an explicit argument instead of trusting whatever is currently selected.
If dev, staging, and production ever need genuinely different resources (not just different values), workspaces stop being the right tool, since all workspaces share one configuration. At that point, move to a directory per environment (`envs/dev`, `envs/staging`, `envs/production`), each with its own backend configuration and `tfvars`, all calling the same shared [module](/tutorials/modules-and-components).
## Pulumi stacks
A stack is Pulumi's native equivalent, and it's the primitive the quickstart already used without naming it.
```bash theme={null}
pulumi stack init dev
pulumi stack init staging
pulumi stack init production
pulumi stack ls
pulumi stack select staging
```
Each stack gets its own `Pulumi..yaml` config file and independent state. Set config per stack explicitly with `--stack`:
```bash theme={null}
pulumi config set --stack dev biznetgio:apiToken --secret
pulumi config set --stack production biznetgio:apiToken --secret
```
Read the current stack's name inside your program with `pulumi.getStack()`. `keypair` and `config` are exactly what the [Pulumi quickstart](/pulumi-quickstart) already declared in full - what's different here is that `productId` is no longer `products[0]`. It's picked deliberately per stack, using the real package names from the [NEO Lite catalog](/products/neolite):
```typescript theme={null}
import * as pulumi from "@pulumi/pulumi";
import * as biznetgio from "@shirasakaren/biznetgio";
const stack = pulumi.getStack();
const products = biznetgio.neoliteProductsOutput();
// Real NEO Lite package names - see /products/neolite for the full pricing table.
// dev gets the cheapest tier on purpose; staging matches production so it
// actually catches production-shaped bugs.
const tierByStack: Record = {
dev: "XS 1.1", // 1 vCPU / 1 GB - enough to smoke-test a preview/up cycle
staging: "MS 4.2", // 2 vCPU / 4 GB - same tier as production
production: "MS 4.2",
};
const productId = products.products.apply((items) => {
const match = items.find((p) => p.name === tierByStack[stack]);
if (!match) throw new Error(`no NEO Lite product named '${tierByStack[stack]}' found`);
return match.productId;
});
const osList = biznetgio.neoliteOsListOutput({ productId: productId });
const vm = new biznetgio.NeoliteVm("main", {
vmName: `web-${stack}`,
productId: productId,
selectOs: osList.oss[0].name,
keypairId: keypair.keypairId,
cycle: "m",
sshAndConsoleUser: "adminuser",
consolePassword: config.requireSecret("consolePassword"),
payWithCreditCard: stack === "production",
});
```
Confirm `"XS 1.1"` and `"MS 4.2"` against your own account's catalog output before relying on them - see [Step 1 in the catalog overview](/products/overview#step-1-look-at-your-own-catalog-before-you-filter-anything). `selectOs` still uses `oss[0]` here since OS lists are usually short and dominated by one obvious choice; apply the same name-filter pattern to it if that's not true for your account.
Same rule as Terraform: check `pulumi stack ls` (the current one is marked) before `pulumi up`. Pass `--stack ` explicitly in CI rather than relying on whichever stack was last selected on that runner.
## A practical dev/staging/production split
A pattern that works well for these providers specifically:
| Environment | `pay_with_credit_card` / `payWithCreditCard` | Product tier | Purpose |
| ----------- | -------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------- |
| dev | `false` | cheapest available | validate plans/previews without a real charge; resource sits `Pending` until paid |
| staging | `true` | same tier as production | catch real-world behavior before it matters |
| production | `true` | the real tier | what customers actually use |
Read the [billing guide](/guides/billing) for exactly what `pay_with_credit_card = false` does; it's the cheapest way to rehearse a whole apply/up cycle before committing real money.
## Next steps
* [State, remote backends, and team collaboration](/tutorials/state-and-collaboration) - get each environment's state off your laptop
# Run it yourself: the example repos
Source: https://biznetgio.creations.ren/tutorials/examples
Two companion repositories with every resource, data source, and function as a runnable example
Every tutorial in this track shows you small, focused snippets. When you want to see the whole thing working end to end, each provider ships a companion repository of complete, runnable examples. One repo per tool:
* **Terraform**: [shirasakaren/biznetgio-example-terraform](https://github.com/shirasakaren/biznetgio-example-terraform)
* **Pulumi**: [shirasakaren/biznetgio-example-pulumi](https://github.com/shirasakaren/biznetgio-example-pulumi)
Both are beginner-first: every file is commented line by line in English and Bahasa Indonesia, every program carries the cost-safety defaults from [Billing and orders](/guides/billing), and each comes with a manual CI/CD pipeline (workflow dispatch) so you can rehearse the full validate, plan, and apply flow from the Actions tab before you ever run it on your laptop.
## What's inside
Six examples, one per Biznet GIO product line plus one "complete" stack, so you can start from the smallest, cheapest thing and grow:
| Example | Covers | Why start here |
| ----------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `object-storage/` | instance, bucket, credential, object | cheapest and safest, no server to delete |
| `neolite/` | all 5 NEO Lite VPS resources + all 5 data sources | the standard quickstart shape, everything included |
| `neolite-pro/` | all 4 NEO Lite Pro resources + all 5 data sources | same ideas as neolite, different API group |
| `baremetal/` | all 5 NEO Metal resources + all 3 data sources | larger machines, rebuild and OpenVPN extras |
| `gpu/` | both NEO GPU resources + all 3 data sources | subscription billing, read its cost warning |
| `complete/` | a production-shaped stack as a reusable module or component | the [modules and components](/tutorials/modules-and-components) pattern, instantiated in full |
In the Terraform repo each example is a folder with `versions.tf`, `variables.tf`, `main.tf`, `outputs.tf`, and a `terraform.tfvars.example` to copy. In the Pulumi repo each example exists once per language, under `typescript/`, `python/`, `go/`, `dotnet/`, `java/`, and `yaml/`, so you can compare the same resource across languages.
## Run one yourself
Terraform, from the [quickstart](/quickstart) you already know:
```bash theme={null}
git clone https://github.com/shirasakaren/biznetgio-example-terraform.git
cd biznetgio-example-terraform/object-storage
cp terraform.tfvars.example terraform.tfvars
export BIZNETGIO_API_KEY="your-token"
terraform init
terraform plan
terraform apply
```
Pulumi, from the [Pulumi quickstart](/pulumi-quickstart):
```bash theme={null}
git clone https://github.com/shirasakaren/biznetgio-example-pulumi.git
cd biznetgio-example-pulumi/typescript/object-storage
npm install
pulumi stack init dev
export BIZNETGIO_API_KEY="your-token"
pulumi preview
pulumi up
```
Swap `typescript` for `python`, `go`, `dotnet`, `java`, or `yaml` to see the same example in another language. YAML needs no install step at all; each folder is an independent Pulumi project, so one stack never affects another.
The examples default `payWithCreditCard` to `false`. The resource is still created for real, the order just stays unpaid in the portal, which is the safe way to rehearse. `baremetal/` and `gpu/` carry extra cost warnings in their own READMEs, read those before running them.
## Use it as a template
These repos are meant to be copied, not just run:
1. Pick the example and language closest to what you're building, or start from `complete/` for the reusable module/component pattern.
2. Copy that folder into your own repository.
3. Rename resources, change product IDs, and delete what you don't need.
4. Reuse the comments as your own documentation, they explain the why as well as the what.
That gives you a working skeleton with the tricky parts already solved, notably the places where this API family differs from the usual: "account id" style inputs are numbers even though a resource's `.id` is always a string, and the GPU keypair exposes only `id`, not a separate `keypairId`. The examples handle both correctly and comment where they do.
## The CI/CD inside them
Both repos ship a `.github/workflows/ci.yml` that runs **on manual dispatch only**, never on push, on purpose. Open the Actions tab and pick:
| Input | Terraform repo | Pulumi repo |
| -------------- | ---------------------------------------------------------------- | ------------------------------------------------------------- |
| Which example | `all` or one of the 6 folders | `all` or one of the 6 folders |
| Which language | (Terraform is HCL only) | `all`, or typescript/python/go/dotnet/java/yaml |
| What to do | `validate` (default, no credentials), `plan`, `apply`, `destroy` | `build` (default, no credentials), `preview`, `up`, `destroy` |
The default action only formats, type-checks, and validates, no credentials needed, so it is safe to run on a fresh clone. The credential-requiring actions read `BIZNETGIO_API_KEY` (plus `EXAMPLE_CONSOLE_PASSWORD` in the Terraform repo and `PULUMI_ACCESS_TOKEN` in the Pulumi repo) from repository secrets, and `apply`/`up`/`destroy` place real orders, so pick those deliberately.
That workflow is the [CI/CD tutorial](/tutorials/cicd) in real form. Read that page to understand what each step does, then use it as the starting point for your own pipeline.
## Contributing to these repos
Both repos accept contributions and are built to teach. The [Contribute section](/contribute/introduction) covers the conventions (bilingual comments, cost safety defaults, version pinning), the commit and PR templates, the CODEOWNERS file, and the pipelines line by line, with step-by-step walkthroughs for adding new examples.
## Next steps
* [Capstone: a production stack on Biznet GIO](/tutorials/production-deployment) - what you just ran, reasoned about end to end as a real deployment
# Reusable modules and components
Source: https://biznetgio.creations.ren/tutorials/modules-and-components
Package repeated infrastructure into a Terraform module or Pulumi component
Once dev, staging, and production each need the same shape, a keypair plus a VM, with only the sizing and a couple of flags different, copy-pasting that shape three times means fixing a bug in it three times too. Terraform modules and Pulumi components let you write the shape once and instantiate it per environment.
## Terraform module
```
infra/
modules/
neolite-vm/
main.tf
variables.tf
outputs.tf
main.tf
```
`modules/neolite-vm/variables.tf`:
```hcl theme={null}
variable "vm_name" {
type = string
}
variable "product_id" {
type = number
}
variable "select_os" {
type = string
}
variable "cycle" {
type = string
}
variable "ssh_and_console_user" {
type = string
}
variable "console_password" {
type = string
sensitive = true
}
variable "pay_with_credit_card" {
type = bool
default = false
}
```
`modules/neolite-vm/main.tf`:
```hcl theme={null}
resource "biznetgio_neolite_keypair" "this" {
name = "${var.vm_name}-key"
}
resource "biznetgio_neolite_vm" "this" {
vm_name = var.vm_name
product_id = var.product_id
select_os = var.select_os
keypair_id = biznetgio_neolite_keypair.this.keypair_id
cycle = var.cycle
ssh_and_console_user = var.ssh_and_console_user
console_password = var.console_password
pay_with_credit_card = var.pay_with_credit_card
}
```
`modules/neolite-vm/outputs.tf`:
```hcl theme={null}
output "vm_status" {
value = biznetgio_neolite_vm.this.status
}
output "keypair_private_key" {
value = biznetgio_neolite_keypair.this.private_key
sensitive = true
}
```
Instantiate it once per environment from the root module. `var.console_password` here is exactly what the [quickstart](/quickstart) and [project structure](/tutorials/project-structure) tutorials already declared in full. `product_id` is picked by name per environment, the same pattern used in [Environments](/tutorials/environments#terraform-workspaces) - never pass a module `products[0]` directly, since a module has no way to warn its caller that the value is arbitrary:
```hcl theme={null}
data "biznetgio_neolite_products" "all" {}
locals {
# Real NEO Lite package names - see /products/neolite for the full pricing table.
staging_product = [
for p in data.biznetgio_neolite_products.all.products : p if p.name == "MS 4.2"
][0]
production_product = [
for p in data.biznetgio_neolite_products.all.products : p if p.name == "MS 4.2"
][0]
}
# staging and production use the same tier, so one OS list covers both
data "biznetgio_neolite_os_list" "ubuntu" {
product_id = local.staging_product.product_id
}
module "web_staging" {
source = "./modules/neolite-vm"
vm_name = "web-staging"
product_id = local.staging_product.product_id
select_os = data.biznetgio_neolite_os_list.ubuntu.oss[0].name
cycle = "m"
ssh_and_console_user = "adminuser"
console_password = var.console_password
pay_with_credit_card = false
}
module "web_production" {
source = "./modules/neolite-vm"
vm_name = "web-production"
product_id = local.production_product.product_id
select_os = data.biznetgio_neolite_os_list.ubuntu.oss[0].name
cycle = "m"
ssh_and_console_user = "adminuser"
console_password = var.console_password
pay_with_credit_card = true
}
```
Confirm `"MS 4.2"` against your own account's catalog output first - see [Step 1 in the catalog overview](/products/overview#step-1-look-at-your-own-catalog-before-you-filter-anything). A local `./modules/...` source is enough for one repository. Publishing to a module registry is possible but only worth it once more than one repository needs the same module.
## Pulumi component
The equivalent in Pulumi is a `ComponentResource`, shown here in TypeScript:
```typescript theme={null}
import * as pulumi from "@pulumi/pulumi";
import * as biznetgio from "@shirasakaren/biznetgio";
export interface NeoliteWebServerArgs {
productId: pulumi.Input;
selectOs: pulumi.Input;
cycle: pulumi.Input;
sshAndConsoleUser: pulumi.Input;
consolePassword: pulumi.Input;
payWithCreditCard?: pulumi.Input;
}
export class NeoliteWebServer extends pulumi.ComponentResource {
public readonly vmStatus: pulumi.Output;
public readonly keypairPrivateKey: pulumi.Output;
constructor(name: string, args: NeoliteWebServerArgs, opts?: pulumi.ComponentResourceOptions) {
super("biznetgio-tutorials:index:NeoliteWebServer", name, {}, opts);
const keypair = new biznetgio.NeoliteKeypair(`${name}-key`, {
name: `${name}-key`,
}, { parent: this });
const vm = new biznetgio.NeoliteVm(`${name}-vm`, {
vmName: name,
productId: args.productId,
selectOs: args.selectOs,
keypairId: keypair.keypairId,
cycle: args.cycle,
sshAndConsoleUser: args.sshAndConsoleUser,
consolePassword: args.consolePassword,
payWithCreditCard: args.payWithCreditCard ?? false,
}, { parent: this });
this.vmStatus = vm.status;
this.keypairPrivateKey = keypair.privateKey;
this.registerOutputs({ vmStatus: this.vmStatus });
}
}
```
`{ parent: this }` registers the keypair and VM as children of the component in Pulumi's resource tree, so `pulumi up` and the Pulumi Cloud console show them nested under it instead of as two unrelated top-level resources.
Instantiate one per stack. `config` is exactly what the [Pulumi quickstart](/pulumi-quickstart) already declared in full. `productId` is picked by name, the same pattern used in [Environments](/tutorials/environments#pulumi-stacks) - never pass a component `products[0]` directly:
```typescript theme={null}
const stack = pulumi.getStack();
const products = biznetgio.neoliteProductsOutput();
// Real NEO Lite package name - see /products/neolite for the full pricing table.
// Confirm it against your own account's catalog output first.
const productId = products.products.apply((items) => {
const match = items.find((p) => p.name === "MS 4.2");
if (!match) throw new Error("no NEO Lite product named 'MS 4.2' found");
return match.productId;
});
const osList = biznetgio.neoliteOsListOutput({ productId: productId });
const web = new NeoliteWebServer(`web-${stack}`, {
productId: productId,
selectOs: osList.oss[0].name,
cycle: "m",
sshAndConsoleUser: "adminuser",
consolePassword: config.requireSecret("consolePassword"),
payWithCreditCard: stack === "production",
});
export const vmStatus = web.vmStatus;
```
## Next steps
* [Testing, validation, and guardrails](/tutorials/testing-and-safety) - catch mistakes before this module ever calls the real API
# Capstone: a production stack on Biznet GIO
Source: https://biznetgio.creations.ren/tutorials/production-deployment
Put every tutorial in this track together into one real deployment
This is where the previous seven tutorials come together into one real thing: a small but genuinely production-shaped deployment, with an environment you iterate on quickly and a production environment that only changes behind review.
## What we're building
* A **NEO Lite Pro VM** as the app tier (`biznetgio_neolite_pro_vm` / `NeoliteProVm`), since it's the dedicated-resource tier meant for real workloads rather than the entry-level NEO Lite.
* A **NEO Object Storage** instance, bucket, and credential (`biznetgio_object_storage*` / `ObjectStorage*`) for the app's data and backups.
* Two environments, **staging** and **production**, same code, different sizing and different money.
* State in a shared backend, secrets in CI, and every change to production going through a reviewed pull request.
```
pull request ──▶ CI: plan/preview (staging + production) ──▶ posted as PR comment
│ │
▼ human review
merge to main │
│ ▼
├──▶ CI: apply/up staging (auto) approve production
└──▶ CI: apply/up production (needs reviewer) ────────────────┘
│
▼
Biznet GIO Portal API (real orders)
│
┌─────────┴─────────┐
▼ ▼
NEO Lite Pro VM NEO Object Storage
(app tier) (bucket + credential)
```
## 1. Repository layout
Following [Structure a real project](/tutorials/project-structure):
```
infra/
modules/
app-stack/
main.tf
variables.tf
outputs.tf
main.tf
variables.tf
outputs.tf
versions.tf
```
## 2. Two environments
Following [Environments](/tutorials/environments), this uses Terraform workspaces named `staging` and `production` (or, in Pulumi, stacks with the same names). Staging runs with `pay_with_credit_card = false` and the smallest product tier, so every plan can be rehearsed for free; production runs with the real tier and real billing.
## 3. Where state lives
Following [State, remote backends, and team collaboration](/tutorials/state-and-collaboration), this deployment uses the recommended path for both tools rather than the advanced, unverified one: **Terraform Cloud** for the Terraform version, **Pulumi Cloud** (the default) for the Pulumi version. Both give you locking and history without needing to verify a third party's S3 compatibility first.
## 4. Secrets
Following [Manage secrets the right way](/tutorials/secrets-management): the Biznet GIO API token lives in two GitHub Actions environments, `staging` and `production`, the latter with required reviewers turned on. The Pulumi version also needs `PULUMI_ACCESS_TOKEN` alongside it.
## 5. The module
Extending [Reusable modules and components](/tutorials/modules-and-components) with storage alongside the VM. `storage_label` is its own input, kept separate from the environment name, because `biznetgio_object_storage`'s `label` field has its own 6-16 character constraint independent of how long your environment names are.
`modules/app-stack/variables.tf`:
```hcl theme={null}
variable "name" {
type = string
} # e.g. "web-staging", 6-16 chars for vm_name
variable "storage_label" {
type = string
} # 6-16 chars, [a-zA-Z0-9-_]
variable "vm_product_id" {
type = number
}
variable "select_os" {
type = string
}
variable "storage_product_id" {
type = number
}
variable "cycle" {
type = string
}
variable "ssh_and_console_user" {
type = string
}
variable "console_password" {
type = string
sensitive = true
}
variable "pay_with_credit_card" {
type = bool
default = false
}
variable "storage_quota" {
type = number
default = 10
}
```
`modules/app-stack/main.tf`:
```hcl theme={null}
resource "biznetgio_neolite_pro_keypair" "this" {
name = "${var.name}-key"
}
resource "biznetgio_neolite_pro_vm" "this" {
vm_name = var.name
product_id = var.vm_product_id
select_os = var.select_os
keypair_id = biznetgio_neolite_pro_keypair.this.keypair_id
cycle = var.cycle
ssh_and_console_user = var.ssh_and_console_user
console_password = var.console_password
pay_with_credit_card = var.pay_with_credit_card
}
resource "biznetgio_object_storage" "this" {
product_id = var.storage_product_id
cycle = var.cycle
label = var.storage_label
quota = var.storage_quota
pay_with_credit_card = var.pay_with_credit_card
}
resource "biznetgio_object_storage_bucket" "this" {
account_id = biznetgio_object_storage.this.id
name = "${var.name}-assets"
acl = "private"
}
resource "biznetgio_object_storage_credential" "this" {
account_id = biznetgio_object_storage.this.id
}
```
`modules/app-stack/outputs.tf`:
```hcl theme={null}
output "vm_status" {
value = biznetgio_neolite_pro_vm.this.status
}
output "bucket_name" {
value = biznetgio_object_storage_bucket.this.name
}
output "access_key" {
value = biznetgio_object_storage_credential.this.access_key
sensitive = true
}
output "secret_key" {
value = biznetgio_object_storage_credential.this.secret_key
sensitive = true
}
output "keypair_private_key" {
value = biznetgio_neolite_pro_keypair.this.private_key
sensitive = true
}
```
Root `main.tf` calls it once per workspace. `vm_product_id` is picked by name rather than `products[0]` - see [Understanding the product catalog](/products/overview) for why, and the [NEO Lite Pro catalog](/products/neolite-pro) for the full pricing table. `storage_product_id = 8` stays a hardcoded literal because Object Storage has no catalog data source at all - see [why](/products/object-storage#there-is-no-catalog-data-source-for-this-at-all):
```hcl theme={null}
data "biznetgio_neolite_pro_products" "all" {}
locals {
# Real NEO Lite Pro package name - see /products/neolite-pro for the
# full pricing table. Confirm it against your own account's catalog
# output before relying on it.
matching_products = [
for p in data.biznetgio_neolite_pro_products.all.products :
p if p.name == "MS.4.2"
]
vm_product_id = local.matching_products[0].product_id
}
data "biznetgio_neolite_pro_os_list" "ubuntu" {
product_id = local.vm_product_id
}
module "app" {
source = "./modules/app-stack"
name = "web-${terraform.workspace}"
storage_label = terraform.workspace == "production" ? "web-prod" : "web-stg"
vm_product_id = local.vm_product_id
select_os = data.biznetgio_neolite_pro_os_list.ubuntu.oss[0].name
storage_product_id = 8
cycle = "m"
ssh_and_console_user = "adminuser"
console_password = var.console_password
pay_with_credit_card = terraform.workspace == "production"
}
```
```typescript theme={null}
import * as pulumi from "@pulumi/pulumi";
import * as biznetgio from "@shirasakaren/biznetgio";
export interface AppStackArgs {
vmProductId: pulumi.Input;
selectOs: pulumi.Input;
storageProductId: pulumi.Input;
storageLabel: pulumi.Input; // 6-16 chars, [a-zA-Z0-9-_]
cycle: pulumi.Input;
sshAndConsoleUser: pulumi.Input;
consolePassword: pulumi.Input;
payWithCreditCard: pulumi.Input;
storageQuota?: pulumi.Input;
}
export class AppStack extends pulumi.ComponentResource {
public readonly vmStatus: pulumi.Output;
public readonly bucketName: pulumi.Output;
public readonly accessKey: pulumi.Output;
public readonly secretKey: pulumi.Output;
public readonly keypairPrivateKey: pulumi.Output;
constructor(name: string, args: AppStackArgs, opts?: pulumi.ComponentResourceOptions) {
super("biznetgio-tutorials:index:AppStack", name, {}, opts);
const keypair = new biznetgio.NeoliteProKeypair(`${name}-key`, {
name: `${name}-key`,
}, { parent: this });
const vm = new biznetgio.NeoliteProVm(`${name}-vm`, {
vmName: name,
productId: args.vmProductId,
selectOs: args.selectOs,
keypairId: keypair.keypairId,
cycle: args.cycle,
sshAndConsoleUser: args.sshAndConsoleUser,
consolePassword: args.consolePassword,
payWithCreditCard: args.payWithCreditCard,
}, { parent: this });
const storage = new biznetgio.ObjectStorage(`${name}-storage`, {
productId: args.storageProductId,
cycle: args.cycle,
label: args.storageLabel,
quota: args.storageQuota ?? 10,
payWithCreditCard: args.payWithCreditCard,
}, { parent: this });
const bucket = new biznetgio.ObjectStorageBucket(`${name}-assets`, {
accountId: storage.id,
name: `${name}-assets`,
acl: "private",
}, { parent: this });
const credential = new biznetgio.ObjectStorageCredential(`${name}-cred`, {
accountId: storage.id,
}, { parent: this });
this.vmStatus = vm.status;
this.bucketName = bucket.name;
this.accessKey = credential.accessKey;
this.secretKey = credential.secretKey;
this.keypairPrivateKey = keypair.privateKey;
this.registerOutputs({ vmStatus: this.vmStatus, bucketName: this.bucketName });
}
}
```
Instantiated once per stack. `vmProductId` is picked by name rather than `products[0]` - see [Understanding the product catalog](/products/overview) for why, and the [NEO Lite Pro catalog](/products/neolite-pro) for the full pricing table. `storageProductId: 8` stays a hardcoded literal because Object Storage has no catalog data source at all - see [why](/products/object-storage#there-is-no-catalog-data-source-for-this-at-all):
```typescript theme={null}
const config = new pulumi.Config();
const products = biznetgio.neoliteProProductsOutput();
// Real NEO Lite Pro package name - see /products/neolite-pro for the
// full pricing table. Confirm it against your own account's catalog
// output before relying on it.
const vmProductId = products.products.apply((items) => {
const match = items.find((p) => p.name === "MS.4.2");
if (!match) throw new Error("no NEO Lite Pro product named 'MS.4.2' found");
return match.productId;
});
const osList = biznetgio.neoliteProOsListOutput({
productId: vmProductId,
});
const stack = pulumi.getStack();
const isProduction = stack === "production";
const app = new AppStack(`web-${stack}`, {
vmProductId: vmProductId,
selectOs: osList.oss[0].name,
storageProductId: 8,
storageLabel: isProduction ? "web-prod" : "web-stg",
cycle: "m",
sshAndConsoleUser: "adminuser",
consolePassword: config.requireSecret("consolePassword"),
payWithCreditCard: isProduction,
});
export const vmStatus = app.vmStatus;
export const bucketName = app.bucketName;
```
## 6. The pipeline, with a deliberate promotion step
Extending [CI/CD with GitHub Actions](/tutorials/cicd) to two environments instead of one. Staging applies automatically on every merge, since nothing there costs real money or serves real traffic; production needs the required reviewer configured on its GitHub environment:
```yaml theme={null}
jobs:
apply_staging:
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- run: terraform init && terraform workspace select staging
working-directory: infra
env:
BIZNETGIO_API_KEY: ${{ secrets.BIZNETGIO_API_KEY }}
- run: terraform apply -auto-approve
working-directory: infra
env:
BIZNETGIO_API_KEY: ${{ secrets.BIZNETGIO_API_KEY }}
apply_production:
if: github.event_name == 'push'
needs: apply_staging
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- run: terraform init && terraform workspace select production
working-directory: infra
env:
BIZNETGIO_API_KEY: ${{ secrets.BIZNETGIO_API_KEY }}
- run: terraform apply -auto-approve
working-directory: infra
env:
BIZNETGIO_API_KEY: ${{ secrets.BIZNETGIO_API_KEY }}
```
`needs: apply_staging` means production only runs after staging has already applied cleanly; the `environment: production` required reviewer still pauses it for approval regardless.
## 7. Guardrails
Everything from [Testing, validation, and guardrails](/tutorials/testing-and-safety) applies here unchanged: `terraform fmt -check` and `terraform validate` on every PR, the plan posted as a comment, and a reviewer specifically checking that no one-shot trigger or create-only field changed by accident before approving production.
## 8. Wiring it into your systems
These providers provision and manage lifecycle; they are not an inventory system, so a couple of things are deliberately not resource attributes:
* **SSH access**: the console user and password you set (`ssh_and_console_user` / `console_password`) plus the keypair's `private_key` output are what authenticate you. The assigned public IP isn't exposed as a resource attribute on `biznetgio_neolite_pro_vm`; find it in the NEO Lite Pro entry in the [portal](https://portal.biznetgio.com) after the first apply, and record it in whatever inventory your systems already use.
* **App configuration**: hand the object storage credential's `access_key` and `secret_key` outputs to your app as environment variables or a secret store, pointed at the region's S3-compatible endpoint (`nos..neo.id`), exactly as the [Object Storage reference](/terraform/resources/object-storage) describes for real workloads.
## 9. Operating it afterward
* **Drift**: a scheduled GitHub Actions workflow (`on: schedule`) running only `plan`/`preview`, not apply, catches changes made outside this pipeline, for example someone editing a resource directly in the portal. Post a comment or alert if the diff is non-empty.
* **Scaling**: grow the VM by changing `vm_product_id` (triggers a change-package call), grow its disk with `disk_size` (grow-only), grow storage with `quota` (grow-only). None of these require recreating the resource.
* **Teardown**: destroying production is exactly as real as applying it. Send it through the same pull request and review flow, never as a one-off local command.
## Where to go from here
* [Run it yourself: the example repos](/tutorials/examples) - this whole stack, plus every other product line, as runnable copy-paste examples with CI/CD included
* [FAQ](/guides/faq) for the operational questions that come up once this is running
* [Triggers and actions](/guides/triggers) for the destructive one-shot actions this stack deliberately doesn't automate
* Every tutorial in this track, if any single step above needs more depth than the summary here gives it
# Structure a real project
Source: https://biznetgio.creations.ren/tutorials/project-structure
Move from a single quickstart file to a project layout that scales
The quickstart put everything in one file on purpose, so the first VM took five minutes. A real project outlives that file fast: more resources, more people, more than one environment. This tutorial is the layout to grow into before that happens.
Start here once you've finished the [Terraform quickstart](/quickstart) or the [Pulumi quickstart](/pulumi-quickstart). Everything below assumes you already have one working resource.
## Terraform layout
Terraform reads every `.tf` file in a directory as one configuration, so file boundaries are for humans, not the tool. A layout that scales:
```
infra/
versions.tf # required_providers, required_version
main.tf # provider block
neolite.tf # NEO Lite resources and data sources
storage.tf # NEO Object Storage resources
variables.tf # input variables
outputs.tf # outputs
terraform.tfvars # local values (gitignored if it holds secrets)
.gitignore
```
`versions.tf`:
```hcl theme={null}
terraform {
required_version = ">= 1.0"
required_providers {
biznetgio = {
source = "registry.terraform.io/shirasakaren/biznetgio"
version = "0.1.0"
}
}
}
```
`main.tf` stays just the provider block once credentials come from the environment (see [Authentication](/authentication)):
```hcl theme={null}
provider "biznetgio" {}
```
`variables.tf` for anything that changes between runs or people:
```hcl theme={null}
variable "vm_name" {
type = string
default = "web-1"
}
variable "console_password" {
type = string
sensitive = true
}
```
`outputs.tf` for anything you or another tool needs after apply:
```hcl theme={null}
output "vm_status" {
value = biznetgio_neolite_vm.main.status
}
```
Once a resource group grows past a handful of blocks, split it into its own file named after the product, `neolite.tf`, `storage.tf`, `baremetal.tf`. Terraform does not care; your reviewers will.
`.gitignore`:
```
.terraform/
*.tfstate
*.tfstate.*
crash.log
override.tf
*.tfvars
```
`terraform.tfvars` is plain text. If it ever holds a real value for `console_password` or a token, it must be gitignored, no exceptions. Prefer environment variables (`BIZNETGIO_API_KEY`) for anything secret and keep tfvars for non-secret defaults only.
## Pulumi layout
A Pulumi project is a regular program in your language, plus two files Pulumi itself reads:
```
infra/
Pulumi.yaml # project metadata + runtime
Pulumi.dev.yaml # per-stack config, one file per stack
index.ts # or main.py, main.go, Program.cs, App.java
neolite.ts # split out once index.ts grows
storage.ts
package.json
```
`Pulumi.yaml`:
```yaml theme={null}
name: biznetgio-demo
runtime: nodejs
description: NEO Lite VM and object storage for the demo app
```
Splitting `index.ts` into `neolite.ts`, `storage.ts`, and importing them back in, is a language convention, not a Pulumi requirement. Do it the same way you'd split any other program once it grows past what fits on one screen.
`Pulumi..yaml` is safe to commit even when it holds a secret set with `pulumi config set --secret`. Pulumi encrypts the value before writing the file. This is the opposite of Terraform's `tfvars`, which is always plain text.
`.gitignore` for a TypeScript project:
```
node_modules/
bin/
*.tsbuildinfo
```
(Swap the language-specific ignores for Python's `venv/`/`__pycache__/`, Go's build output, or your target language's equivalent. `Pulumi.yaml` and every `Pulumi..yaml` stay tracked.)
## Naming things
Both providers share the terminology introduced on [What is Infrastructure as Code?](/what-is-iac): resource names in code formatting, `disk_size` in Terraform vs `diskSize` in Pulumi. Carry that into your own names too:
* One resource block/declaration per real-world thing, named after what it is (`web`, not `resource1`).
* Keep the `-key` suffix convention for keypairs (`web-key`) so it reads clearly next to the VM it belongs to.
* If the same repository holds application code as well, keep infrastructure in its own top-level `infra/` folder next to `app/`, rather than mixed into the app's own directories.
Every code sample elsewhere in this documentation is written as a single flat file, because that reads best on a reference page. That's a documentation choice, not a recommendation, once your own project is real.
## Next steps
* [Environments](/tutorials/environments) - the same layout, three different configurations for dev, staging, and production
# Manage secrets the right way
Source: https://biznetgio.creations.ren/tutorials/secrets-management
Keep API tokens and credentials out of git and safe in CI
The [Authentication](/authentication) page already covers what these providers do for you: `api_key`/`apiToken` are marked sensitive, and every `raw` output is redacted. This tutorial is about the layer above that, keeping the token itself out of git and getting it safely into CI, since that layer is entirely on you.
## Rule one: never commit a real token
* Export it as an environment variable (`BIZNETGIO_API_KEY`) instead of writing it into a committed file.
* Never pass it with `-var` on the Terraform CLI; command-line arguments end up in your shell history.
* Gitignore any `tfvars` file that ever holds a real value, per the [project structure](/tutorials/project-structure) tutorial.
## Terraform Cloud variables
If you followed the [state and collaboration](/tutorials/state-and-collaboration) tutorial's recommended path, set the token as a workspace variable: category "environment variable", key `BIZNETGIO_API_KEY`, and tick the sensitive checkbox. It's injected into every plan and apply run and never appears in logs.
## Pulumi config and ESC
`pulumi config set --secret` encrypts the value before writing it to `Pulumi..yaml`:
```bash theme={null}
pulumi config set --secret biznetgio:apiToken
```
By default the value is encrypted with a key managed by Pulumi Cloud; anyone with access to that stack in your Pulumi Cloud organization can decrypt it through the CLI. If you're self-hosting state with a passphrase instead (see the previous tutorial), you distribute that passphrase yourself, and losing it means losing the ability to read secrets back out, though the stack still updates fine without it.
For one token shared across multiple stacks or projects, **Pulumi ESC** (Environments, Secrets, and Configuration) centralizes it:
```bash theme={null}
esc env set biznetgio/production biznetgio:apiToken --secret
```
Then reference it from `Pulumi.yaml` instead of repeating `config set` per stack:
```yaml theme={null}
environment:
- biznetgio/production
```
## GitHub Actions secrets
Store the token as a repository secret, or better, an **environment secret** scoped to a named environment (for example `production`) with required reviewers turned on. That's what gates the [CI/CD tutorial](/tutorials/cicd)'s apply/up job behind a human approval, since the secret itself is only available once the environment's protection rules pass.
```yaml theme={null}
env:
BIZNETGIO_API_KEY: ${{ secrets.BIZNETGIO_API_KEY }}
```
## Rotating a leaked token
1. Generate a new one in the [portal](https://portal.biznetgio.com) (see [Authentication](/authentication)); the old one stops working immediately.
2. Update every place the old value was stored: the CI secret, the Pulumi ESC environment, the Terraform Cloud variable.
3. Re-run a plan/preview to confirm the new token authenticates before merging anything.
## There's no scoped token
The [Authentication](/authentication) page's warning applies directly here: the API token grants full control of the account, and there's no read-only or scoped variant. That means giving a CI pipeline access to it is equivalent to giving that pipeline full account access. Gate who can trigger the pipeline that has it (branch protection, required reviewers on the production environment) as carefully as you'd gate who has the token itself.
## Next steps
* [CI/CD with GitHub Actions](/tutorials/cicd) - put this token to work in an actual pipeline
# State, remote backends, and team collaboration
Source: https://biznetgio.creations.ren/tutorials/state-and-collaboration
Move state off your laptop so a team can work together safely
State on your laptop works for a solo demo and breaks the moment a second person joins. There's only one copy, nothing locks it while an apply is running, and losing the laptop loses the only record of what's real. This tutorial moves state somewhere a team can share safely.
## Why local state fails for a team
* **No sharing.** A teammate's `plan`/`preview` can't see your local state file, so it doesn't know what already exists.
* **No locking.** Two people running `apply`/`up` at the same moment can corrupt state or double-create resources.
* **No history.** Nothing records who ran what, or lets you roll back to a previous state snapshot.
* **No durability.** One lost laptop is one lost source of truth.
## Terraform: remote backends
**Recommended for beginners heading to production: Terraform Cloud (HCP Terraform).** It's free for small teams, stores state remotely, locks automatically, and keeps a run history.
```hcl theme={null}
terraform {
cloud {
organization = "your-org"
workspaces {
tags = ["biznetgio"]
}
}
}
```
Use `tags`, not `name`, if you want this to keep working with the `terraform workspace new`/`select` pattern from the [environments](/tutorials/environments) tutorial: `name` pins the configuration to exactly one HCP Terraform workspace, so there's nothing left for `terraform workspace new` to switch between. With `tags`, each local CLI workspace maps to its own matching HCP Terraform workspace instead.
The accepted shape for `tags` has changed across Terraform versions (a list of strings in older CLI releases, a map of key/value pairs in newer ones). Check [HashiCorp's current `cloud` block reference](https://developer.hashicorp.com/terraform/cli/cloud/settings) for the version you have installed before relying on the exact syntax above.
Run `terraform login` once, then `terraform init` migrates any existing local state into the cloud workspace automatically.
Terraform's `backend "s3"` block works against any S3-compatible endpoint, not just AWS. Biznet GIO's own [NEO Object Storage](/terraform/resources/object-storage) is S3-compatible, so it's possible to point state at a bucket you provisioned with `biznetgio_object_storage` and `biznetgio_object_storage_bucket`:
```hcl theme={null}
terraform {
backend "s3" {
bucket = "my-tfstate"
key = "production/terraform.tfstate"
region = "us-east-1" # required by the backend syntax; not meaningful to most S3-compatible endpoints
endpoints = {
s3 = "https://nos..neo.id"
}
use_path_style = true
skip_credentials_validation = true
skip_region_validation = true
skip_metadata_api_check = true
}
}
```
Terraform's S3 backend needs the storage endpoint to support conditional writes for its locking to actually work. Confirm with [Biznet GIO support](mailto:support@biznetgio.com) whether NEO Object Storage supports that behavior before trusting this for a team running concurrent applies. Until you've confirmed it, treat this setup as storage for one operator at a time, not a substitute for a backend with verified locking like Terraform Cloud.
## Pulumi: state backends
**The default is Pulumi Cloud**, and it's what the quickstart already used without any extra configuration; running `pulumi login` with no arguments logs in there. It stores state, locks automatically, keeps history, and manages secret encryption for you. The free tier covers small teams.
Pulumi can also store state in a local folder or an S3-compatible bucket, useful if you want to keep state entirely off Pulumi Cloud:
```bash theme={null}
# local folder - fine for solo experimentation, no locking, no sharing
pulumi login file://~/.pulumi-state
# S3-compatible bucket
pulumi login "s3://my-bucket?endpoint=nos..neo.id&s3ForcePathStyle=true"
```
Same caveat as the Terraform S3 backend: verify with [Biznet GIO support](mailto:support@biznetgio.com) that the storage endpoint's write semantics actually give you safe concurrent locking before relying on a self-hosted bucket backend for a team. When in doubt, use Pulumi Cloud.
Self-managed backends also need a passphrase for secret encryption instead of Pulumi Cloud's managed key:
```bash theme={null}
export PULUMI_CONFIG_PASSPHRASE="a passphrase only your team has"
```
Losing that passphrase means losing the ability to decrypt secret config values; the stack can still be updated, but you can't read secrets back out of it.
## Moving state between backends
Both tools can export and re-import a snapshot, which is how you migrate without starting over:
```bash theme={null}
# Terraform
terraform state pull > state.json # back up before any backend change
# Pulumi
pulumi stack export --file stack.json
pulumi stack import --file stack.json
```
## The one rule that matters more than which backend you pick
Never hand-edit a state file. If state and reality disagree, fix it with `terraform import` / `pulumi import`, or by adjusting your configuration to match reality, not by opening the JSON. And whichever backend you land on, always run `plan`/`preview` before `apply`/`up`, so someone sees the diff before it becomes real, which is exactly what the [CI/CD tutorial](/tutorials/cicd) automates.
## Next steps
* [Manage secrets the right way](/tutorials/secrets-management) - get your API token into that shared backend and into CI safely
# Testing, validation, and guardrails
Source: https://biznetgio.creations.ren/tutorials/testing-and-safety
Catch mistakes before they place a real order
Every create or upgrade in these providers is a real paid order, with no dry-run mode on the API itself. The guardrails that matter most are the ones that catch a mistake before `apply`/`up` ever runs, not after.
## Static checks, on every pull request
**Terraform:**
```bash theme={null}
terraform fmt -check
terraform validate
```
`fmt -check` catches style drift, `validate` catches syntax and type errors, both without touching the API or needing a real token. The optional community linter `tflint` adds general HCL best-practice rules; there's no biznetgio-specific plugin, so it only checks universal Terraform patterns.
**Pulumi:** a preview already is your dry run, it computes a real diff against a valid token (needed for read-only data source calls) but never mutates anything. On top of that, your program is just code in your language, so its own tools apply: `tsc --noEmit`, `mypy`, `go vet`, `dotnet build`.
## The diff is the real safety check
Never merge a pull request whose plan or preview you haven't read. That's the entire point of posting it as a PR comment in the [CI/CD tutorial](/tutorials/cicd): review happens in the same place as the code review, not as a separate step someone skips.
## Guardrails specific to these providers
* **Test with `pay_with_credit_card = false` / `payWithCreditCard: false`.** The resource is created but stays `Pending` until paid in the portal, so a whole plan-to-apply cycle can be rehearsed without a real charge landing. See the [billing guide](/guides/billing).
* **Read one-shot triggers and create-only fields as irreversible in review.** `rebuild_os`, `reset_trigger`, and the other [triggers](/guides/triggers) fire destructively the moment their value changes, and Terraform's `fmt`/`validate` or a Pulumi type checker cannot warn you that a plan reinstalls an OS; a human reviewing the diff has to catch that.
* **Preview a destroy before running one for real.** `terraform plan -destroy` and `pulumi preview --diff` show exactly what disappears, before `destroy`/`down` makes it permanent.
## Policy as code, once manual review isn't enough
For a team that's outgrown "someone reads every diff," both ecosystems support enforcing rules automatically: Pulumi CrossGuard (`pulumi policy new`) or Terraform's Sentinel/OPA tooling (Terraform Cloud's paid tiers, or the open-source `conftest` against `terraform show -json`) can reject a plan that violates a rule, for example "production stacks must never set `payWithCreditCard` to false," or "no bare-metal resources in the dev environment." Worth adopting once manual review becomes the bottleneck, not before.
## Next steps
* [Capstone: a production stack on Biznet GIO](/tutorials/production-deployment) - put every tutorial in this track together into one real deployment
# What is Infrastructure as Code?
Source: https://biznetgio.creations.ren/what-is-iac
A beginner-friendly introduction to IaC, Terraform, and Pulumi
New to managing servers with code? This page explains the whole idea from scratch: what Infrastructure as Code (IaC) is, why it beats clicking around in a portal, how Terraform and Pulumi work, and how to pick between them. No prior experience needed.
## The problem IaC solves
Without IaC, you provision cloud resources by hand: open a portal, click through forms to order a VPS, wait, repeat for every server, every disk, every keypair. It works, but:
* **No record.** Nothing captures what you clicked last time, so recreating an environment means doing it all again from memory.
* **No review.** Typos and wrong settings are easy to miss, and nothing is checked before it goes live.
* **No repeatability.** Two environments drift apart because they were built by hand at different times.
* **No automation.** Every change needs a human sitting at a browser.
Infrastructure as Code fixes all four by describing your infrastructure in files that tools read and apply, the same way application code describes software.
Think of it like a recipe instead of cooking from memory. The recipe file is checked into git, anyone can read it, and everyone who follows it gets the same dish.
## The core ideas
Every IaC tool shares a small set of concepts:
| Concept | What it means | Biznet GIO example |
| --------------- | --------------------------------------------- | ---------------------------------------------------------- |
| **Resource** | One thing you want to exist | A NEO Lite VM, a keypair, an object storage bucket |
| **Provider** | The plugin that talks to a specific cloud | `biznetgio`, which wraps the Biznet GIO Portal API |
| **State** | The tool's memory of what it already created | Which VM belongs to which keypair, and their real ids |
| **Declarative** | You describe the destination, not the journey | "A VM with Ubuntu 22.04", not "POST here, then poll there" |
The workflow is always the same three steps:
1. **Write** configuration files that describe what you want.
2. **Plan** (Terraform) or **preview** (Pulumi): the tool compares your files against reality and shows what it would change.
3. **Apply**: the tool calls the cloud API to make reality match your files, and records the result in state.
## How the tools actually work
The three step workflow above is the surface. Underneath, Terraform and Pulumi both work the same way, built from three moving parts.
**The provider is a separate program.** `biznetgio` is not baked into Terraform or Pulumi. It is its own compiled binary (`terraform-provider-biznetgio` / `pulumi-resource-biznetgio`) that the CLI downloads once and then launches as a subprocess every time you run a command. Your `.tf` files or your TypeScript program never call the Biznet GIO API directly - they describe a resource, and the CLI sends that description to the provider process over a local RPC connection. The provider is the only thing that speaks HTTP to `api.portal.biznetgio.com`. This is why the same provider works from Terraform's HCL and, in Pulumi's case, from five different programming languages: the language only has to produce the same RPC calls, not implement the API client itself.
**Everything you declare becomes a graph, not a list.** When your configuration says a VM's `keypair_id` comes from a keypair resource, the tool records that as an edge: keypair before VM. Spread across a whole file, this turns into a dependency graph, and the CLI walks it to decide order - creating a keypair before the VM that needs its id, and reversing the order on `destroy`/`down` so the VM is removed before the keypair it depended on. Resources with no relationship to each other create in parallel, which is why a plan with ten unrelated VMs finishes far faster than ten sequential API calls would.
```
biznetgio_neolite_keypair.main ──┐
├──▶ biznetgio_neolite_vm.main
data.biznetgio_neolite_products ─┘
destroy order: reverse the arrows
```
**State is what turns "run twice" into "converge", not "duplicate".** After every apply/up, the tool writes down the ids and attribute values it now knows about into a state file (Terraform) or a stack's state (Pulumi). The next time you run a plan or preview, three things get compared side by side: your configuration (what you want), the last known state (what the tool remembers creating), and a fresh read from the real API (what is actually there right now, called a refresh). The diff between those three is exactly what becomes your plan. This is also why changing one field rarely means destroy and recreate - if only `label` changed on a bare metal server, the provider's diff logic calls the one API endpoint that renames it, and every other field is left alone. Full replacement only happens for attributes explicitly marked create-only in a resource's reference page, because the upstream API has no in-place way to change them.
This is the mechanical reason two rules from the [FAQ](/guides/faq) exist: secrets returned only once at creation (keypair private keys, object storage secret keys) survive in state precisely because state is the tool's only persistent memory of them, and a Pulumi update that times out is safe to retry because the partial state it already wrote lets the next run continue instead of starting over.
## What is Terraform?
[Terraform](https://developer.hashicorp.com/terraform) is an IaC tool from HashiCorp that uses its own configuration language, HCL. You write `.tf` files, run `terraform plan` to see changes, then `terraform apply` to make them.
* **Language**: HCL, a purpose-built declarative language (not general purpose code)
* **State**: stored in a state file, often shared with a team via a remote backend
* **Ecosystem**: the [Terraform Registry](https://registry.terraform.io) hosts thousands of providers, including [this one](https://registry.terraform.io/providers/shirasakaren/biznetgio)
* **Best fit**: teams that want one standard tool with the same workflow everywhere
```hcl theme={null}
resource "biznetgio_neolite_vm" "web" {
vm_name = "web-1"
# ... product, OS, keypair, billing settings
}
```
## What is Pulumi?
[Pulumi](https://www.pulumi.com) is an IaC tool that lets you write infrastructure in general purpose programming languages: TypeScript, Python, Go, C#, and Java. It also has a declarative YAML mode for when you want Terraform-style config without a full SDK - see the [Pulumi quickstart](/pulumi-quickstart) for a YAML example next to the five language ones.
* **Language**: your language, with loops, functions, and types from day one
* **State**: stored on the Pulumi Cloud service (or a self-hosted backend)
* **Ecosystem**: the [Pulumi Registry](https://www.pulumi.com/registry) indexes packages, including [this one](https://www.pulumi.com/registry/packages/biznetgio)
* **Best fit**: teams that want to share code, use abstractions, and write unit tests for their infrastructure
```typescript theme={null}
const vm = new biznetgio.NeoliteVm("web", {
vmName: "web-1",
// ... product, OS, keypair, billing settings
});
```
## Terraform vs Pulumi
| | Terraform | Pulumi |
| --------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| Language | HCL (declarative DSL) | TypeScript, Python, Go, C#, Java, or declarative YAML |
| Preview command | `terraform plan` | `pulumi preview` |
| Apply command | `terraform apply` | `pulumi up` |
| State | file or backend | Pulumi Cloud or self-hosted |
| Community | larger for HCL examples | stronger for code-first teams |
| This provider | [terraform-provider-biznetgio](https://github.com/shirasakaren/terraform-provider-biznetgio) | [pulumi-biznetgio](https://github.com/shirasakaren/pulumi-biznetgio) |
**How to choose**: if your team already writes a lot of Python, Go, or TypeScript, Pulumi fits naturally. If you prefer a minimal language built only for infrastructure, or your company standardizes on HCL, pick Terraform. Both providers here expose the same Biznet GIO resources, so you can switch tools without changing what you can manage.
## How the Biznet GIO providers fit in
Both providers wrap the same [Biznet GIO Portal API](https://api.portal.biznetgio.com/v1/docs). That means:
* You order real services (VPS, bare metal, GPU, storage) through the same API the web portal uses.
* You authenticate with an API token from the [portal](https://portal.biznetgio.com). See [Authentication](/authentication).
* Creates and upgrades place real paid orders. Read the [billing guide](/guides/billing) before your first apply.
## Glossary
| Term | One-line meaning |
| -------------- | ---------------------------------------------------------------- |
| IaC | Infrastructure as Code: describing servers and services in files |
| HCL | HashiCorp Configuration Language, the Terraform language |
| Provider | Plugin that translates your config into API calls for one cloud |
| Resource | One thing under management (VM, keypair, bucket) |
| Data source | Read-only lookup (product catalogs, OS lists) |
| State | The tool's record of what it manages and the real ids it knows |
| Plan / Preview | The before-applying diff between files and reality |
| Apply / Up | The step that makes the API changes for real |
| Drift | Reality changed outside the tool; the next plan shows it |
## Next steps
* [Quickstart (Terraform)](/quickstart) - order your first VM in about five minutes
* [Quickstart (Pulumi)](/pulumi-quickstart) - same, with Pulumi
* [Authentication](/authentication) - get an API token
* [Package registries](/registries) - every place these providers are published