Format
This commit is contained in:
@@ -6,8 +6,8 @@ build {
|
||||
]
|
||||
|
||||
provisioner "file" {
|
||||
direction = "upload"
|
||||
source = "./rootfs"
|
||||
direction = "upload"
|
||||
source = "./rootfs"
|
||||
destination = "/tmp"
|
||||
}
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
source "hcloud" "main" {
|
||||
token = var.hcloud_api_token
|
||||
|
||||
image = "ubuntu-20.04"
|
||||
image = "ubuntu-20.04"
|
||||
server_name = "wireguard-{{timestamp}}"
|
||||
server_type = "cx11"
|
||||
location = "fsn1"
|
||||
location = "fsn1"
|
||||
|
||||
snapshot_name = "wireguard-{{timestamp}}"
|
||||
snapshot_labels = {
|
||||
@@ -13,19 +13,19 @@ source "hcloud" "main" {
|
||||
|
||||
user_data_file = "./hetzner/seed/user-data"
|
||||
|
||||
ssh_port = "22"
|
||||
ssh_username = "root"
|
||||
ssh_timeout = "10m"
|
||||
ssh_port = "22"
|
||||
ssh_username = "root"
|
||||
ssh_timeout = "10m"
|
||||
ssh_clear_authorized_keys = true
|
||||
}
|
||||
|
||||
source "digitalocean" "main" {
|
||||
api_token = var.digitalocean_api_token
|
||||
|
||||
image = "ubuntu-20-04-x64"
|
||||
image = "ubuntu-20-04-x64"
|
||||
droplet_name = "wireguard-{{timestamp}}"
|
||||
size = "s-1vcpu-1gb"
|
||||
region = "fra1"
|
||||
size = "s-1vcpu-1gb"
|
||||
region = "fra1"
|
||||
|
||||
snapshot_name = "wireguard-{{timestamp}}"
|
||||
tags = [
|
||||
@@ -34,40 +34,40 @@ source "digitalocean" "main" {
|
||||
|
||||
user_data_file = "./digitalocean/seed/user-data"
|
||||
|
||||
ssh_port = "22"
|
||||
ssh_username = "root"
|
||||
ssh_timeout = "10m"
|
||||
ssh_port = "22"
|
||||
ssh_username = "root"
|
||||
ssh_timeout = "10m"
|
||||
ssh_clear_authorized_keys = true
|
||||
}
|
||||
|
||||
source "qemu" "main" {
|
||||
iso_url = "https://cloud-images.ubuntu.com/daily/server/focal/current/focal-server-cloudimg-amd64.img"
|
||||
iso_url = "https://cloud-images.ubuntu.com/daily/server/focal/current/focal-server-cloudimg-amd64.img"
|
||||
iso_checksum = "file:https://cloud-images.ubuntu.com/daily/server/focal/current/SHA256SUMS"
|
||||
disk_image = true
|
||||
disk_image = true
|
||||
|
||||
vm_name = "wireguard.qcow2"
|
||||
http_directory = "./qemu/http/"
|
||||
vm_name = "wireguard.qcow2"
|
||||
http_directory = "./qemu/http/"
|
||||
output_directory = "./dist/qemu/"
|
||||
|
||||
accelerator = "kvm"
|
||||
cpus = 1
|
||||
memory = 512
|
||||
headless = true
|
||||
cpus = 1
|
||||
memory = 512
|
||||
headless = true
|
||||
qemuargs = [
|
||||
["-smbios", "type=1,serial=ds=nocloud-net;s=http://{{.HTTPIP}}:{{.HTTPPort}}/seed/"]
|
||||
]
|
||||
|
||||
net_device = "virtio-net"
|
||||
|
||||
format = "qcow2"
|
||||
disk_size = "4G"
|
||||
disk_interface = "virtio"
|
||||
format = "qcow2"
|
||||
disk_size = "4G"
|
||||
disk_interface = "virtio"
|
||||
disk_compression = false
|
||||
|
||||
ssh_port = "22"
|
||||
ssh_username = "root"
|
||||
ssh_password = "toor"
|
||||
ssh_timeout = "10m"
|
||||
ssh_port = "22"
|
||||
ssh_username = "root"
|
||||
ssh_password = "toor"
|
||||
ssh_timeout = "10m"
|
||||
ssh_clear_authorized_keys = true
|
||||
|
||||
shutdown_command = "shutdown -P now"
|
||||
|
@@ -1,11 +1,11 @@
|
||||
variable "hcloud_api_token" {
|
||||
type = string
|
||||
type = string
|
||||
description = "Hetzner Cloud API token"
|
||||
default = ""
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "digitalocean_api_token" {
|
||||
type = string
|
||||
type = string
|
||||
description = "DigitalOcean API token"
|
||||
default = ""
|
||||
default = ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user