Initial terraform config.

This commit is contained in:
2025-08-06 15:01:02 -07:00
parent c0970d4af1
commit 89484886b1

28
main.tf Normal file
View File

@@ -0,0 +1,28 @@
terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = "2.62.0"
}
}
}
variable "do_token"{
description = "DigitalOcean token"
type = string
}
provider "digitalocean" {
token = var.do_token
}
resource "digitalocean_droplet" "web" {
image = "ubuntu-25-04-x64"
name = "web-1"
region = "sfo3"
size = "s-1vcpu-1gb"
}
output "web_ip" {
value = digitalocean_droplet.web.ipv4_address
}