diff --git a/main.tf b/main.tf new file mode 100644 index 0000000..bdd03e9 --- /dev/null +++ b/main.tf @@ -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 +}