Restore from Gitea ZIP snapshot (12.08.2026) after full instance reinstall

Git history was lost when the previous Gitea instance was wiped and
reinstalled due to an unresolved corruption bug — this commit is the
last known-good file content, exported before the reinstall. Prior
commit history is not recoverable through this path.
This commit is contained in:
Claude Sonnet 5
2026-08-12 19:24:02 +00:00
commit 8ff6d59ba6
34 changed files with 2239 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
data "vsphere_datacenter" "dc" {
name = var.vsphere_datacenter
}
data "vsphere_virtual_machine" "vm" {
name = var.vm_name
datacenter_id = data.vsphere_datacenter.dc.id
}
locals {
current_disk_size_gb = data.vsphere_virtual_machine.vm.disks[0].size
target_disk_size_gb = local.current_disk_size_gb + var.increase_gb
}
resource "vsphere_virtual_machine" "resize" {
name = data.vsphere_virtual_machine.vm.name
resource_pool_id = data.vsphere_virtual_machine.vm.resource_pool_id
datastore_id = data.vsphere_virtual_machine.vm.datastore_id
num_cpus = data.vsphere_virtual_machine.vm.num_cpus
memory = data.vsphere_virtual_machine.vm.memory
guest_id = data.vsphere_virtual_machine.vm.guest_id
firmware = data.vsphere_virtual_machine.vm.firmware
scsi_type = data.vsphere_virtual_machine.vm.scsi_type
network_interface {
network_id = data.vsphere_virtual_machine.vm.network_interface_types[0] != "" ? data.vsphere_virtual_machine.vm.network_interface[0].network_id : null
adapter_type = data.vsphere_virtual_machine.vm.network_interface_types[0]
}
disk {
label = var.disk_label
size = local.target_disk_size_gb
unit_number = 0
thin_provisioned = data.vsphere_virtual_machine.vm.disks[0].thin_provisioned
}
lifecycle {
ignore_changes = [
annotation,
clone,
extra_config,
hv_mode,
vapp,
network_interface,
]
}
}
output "current_disk_size_gb" {
value = local.current_disk_size_gb
}
output "target_disk_size_gb" {
value = local.target_disk_size_gb
}
+6
View File
@@ -0,0 +1,6 @@
provider "vsphere" {
user = var.vsphere_user
password = var.vsphere_password
vsphere_server = var.vsphere_server
allow_unverified_ssl = true
}
+30
View File
@@ -0,0 +1,30 @@
variable "vsphere_user" {
type = string
sensitive = true
}
variable "vsphere_password" {
type = string
sensitive = true
}
variable "vsphere_server" {
type = string
}
variable "vsphere_datacenter" {
type = string
}
variable "vm_name" {
type = string
}
variable "increase_gb" {
type = number
}
variable "disk_label" {
type = string
default = "disk0"
}
+8
View File
@@ -0,0 +1,8 @@
terraform {
required_providers {
vsphere = {
source = "vmware/vsphere"
version = "~> 2.15"
}
}
}