provider "digitalocean" { token = var.do_token spaces_access_id = var.spaces_access_id spaces_secret_key = var.spaces_secret_key } module "packer_droplet" { source = "../../../terraform-modules/packer_droplet" name = "gitea" do_token = var.do_token spaces_access_id = var.spaces_access_id spaces_secret_key = var.spaces_secret_key } resource "digitalocean_volume" "gitea_volume" { name = "gitea-volume" description = "The volume to hold Gitea repositories and data" region = "nyc1" size = 20 initial_filesystem_label = "gitea-volume" initial_filesystem_type = "ext4" tags = ["terraform"] lifecycle { prevent_destroy = true } } resource "digitalocean_volume_attachment" "gitea" { droplet_id = module.packer_droplet.droplet_id volume_id = digitalocean_volume.gitea_volume.id }