yumeami/infra/hetzner
2025-11-04 22:28:05 -06:00
..
main.tf feat: added hetzner cloud terraform configuration 2025-11-04 22:28:05 -06:00
outputs.tf feat: added hetzner cloud terraform configuration 2025-11-04 22:28:05 -06:00
README.md feat: added hetzner cloud terraform configuration 2025-11-04 22:28:05 -06:00
variables.tf feat: added hetzner cloud terraform configuration 2025-11-04 22:28:05 -06:00

Hetzner Cloud Terraform Setup

This directory manages Hetzner Cloud resources using Terraform.

Prerequisites

Usage

  1. Set your API token as an environment variable:
    export TF_VAR_hcloud_token="<your-token>"
    
  2. (Optional) Set SSH key names, image, and location:
    export TF_VAR_hcloud_ssh_keys='["your-key-name"]'
    
  3. Run Terraform:
    terraform init
    terraform plan
    terraform apply
    

Outputs

  • The server's public IPv4 address and ID will be shown after apply.

Destroying the Server

terraform destroy