professional-service/modules/test-machine
Mauritz Uphoff 41762cf7dc
All checks were successful
Default CI / Check for Open TODOs (pull_request) Successful in 48s
Default CI / Secret Scanner (TruffleHog) (pull_request) Successful in 1m12s
Default CI / Pre-Commit Hooks (pull_request) Successful in 2m2s
example(vpn): implement usecases
2026-05-13 13:21:22 +02:00
..
main.tf example(iaas): add example for cross az loadbalancer 2026-04-20 12:29:08 +00:00
outputs.tf chore: add examples and modules 2026-04-15 09:43:08 +02:00
provider.tf chore: add examples and modules 2026-04-15 09:43:08 +02:00
README.md docs: rework test-machine module docs 2026-04-15 11:29:58 +02:00
variables.tf example(vpn): implement usecases 2026-05-13 13:21:22 +02:00

Test Machine Module

This module is used to quickly spin up a test virtual machine. Internally, we use this module to debug network connectivity and cloud-init configurations in a fast, frictionless manner.

⚠️ SECURITY WARNING Be careful: By default, port security is disabled (security_enabled = false) on the network interface to allow unrestricted traffic for debugging purposes. Do not use this module in a production environment without explicitly setting security_enabled = true and applying proper security group rules.

Usage

module "test-machine" {
  source = "../modules/test-machine"

  project_id        = stackit_resourcemanager_project.this.project_id
  network_id        = stackit_network.this.network_id
  availability_zone = var.default_zone

  name         = "vm-debug"
  machine_type = var.jumphost_flavor
  disk_size    = 500

  user_data = templatefile("${path.module}/../cloud-init/vm-debug.yaml", {})
}

Requirements

Name Version
stackit >= 0.87.0

Providers

Name Version
stackit >= 0.87.0

Modules

No modules.

Resources

Name Type
stackit_network_interface.nic resource
stackit_server.server resource
stackit_volume.boot_volume resource

Inputs

Name Description Type Default Required
availability_zone The availability zone (e.g. eu01-1) string n/a yes
disk_performance_class Storage performance class string "storage_premium_perf4" no
disk_size Boot volume size in GB number 50 no
image_id Image UUID (Default: Debian 12) string "c751cde7-e648-4f81-9722-ce9c7848bed0" no
machine_type Flavor of the machine string "g1.1" no
name Hostname of the server string "test-machine" no
network_id The Network ID (UUID) where the machine should be spawned string n/a yes
project_id The STACKIT Project ID string n/a yes
security_enabled Enable security (port security) on the network interface bool false no
user_data Cloud-init configuration string string "" no

Outputs

Name Description
primary_ip The primary ipv4 internal address assigned to the interface
server_id n/a
server_name n/a