# Simple VM with Floating IP

Source: https://docs.quake.ai/resources/iac-templates/simple-vm
Markdown: https://docs.quake.ai/resources/iac-templates/simple-vm.md

---

# Simple VM with Floating IP

This pattern composes Compute and Network.

## What this template does

Provisions a single compute instance with:

- A private network, subnet (with DNS resolvers), and a router to the external network
- A neutron port that binds the instance to the private network
- A security group allowing SSH (port 22) and HTTP (port 80)
- A volume-backed boot disk, so the instance works with zero-disk flavors
- A floating IP for SSH and application access

The instance uses an existing SSH keypair named by the `key_name` variable, so you keep the private key. This is the simplest reliable pattern for a publicly reachable VM on Quake AI.

## Parameters

| Parameter | Description | Default |
| --- | --- | --- |
| `flavor_name` | Instance size | `s1a.small` |
| `image_name` | Operating system image | `Ubuntu-24.04` |
| `key_name` | SSH keypair name (must already exist in your project) | No default |
| `instance_name` | Display name for the instance | `simple-vm` |
| `external_network` | External network for the router gateway and floating IP | `PublicEphemeral` |
| `private_cidr` | CIDR for the private subnet | `10.10.10.0/24` |

## When to use this pattern

Reach for this pattern when you need one publicly reachable VM with a private network, security group, and floating IP. Choose [Development Environment](/resources/iac-templates/dev-environment) when you want multiple subnets, a bastion, and shared storage for a team sandbox.

## Estimated cost

<PricingCompanion
  components={[
    { kind: "template", slug: "simple-vm", required: true },
  ]}
/>

## Template source

<TemplateSource slug="simple-vm" />

<TemplateVariations base="simple-vm" />

<TemplateResourceMap template="simple-vm" format="opentofu" />

## Customize this pattern

- [Customize a template's image and flavor](/docs/automation/how-to/customize-template-image-flavor)
- [Add a block volume to a template](/docs/automation/how-to/add-volume-to-template)
- [Parameterize a template with a tfvars file](/docs/automation/how-to/parameterize-template-tfvars)

## See also

- [Introduction to Terraform on Quake AI](/docs/automation/concepts/terraform)
- [Create simple VMs with Terraform](/docs/automation/how-to/terraform-simple)
- [Deploy the Simple VM template with OpenTofu](/resources/deployments/deploy-simple-vm-template)
