You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
464 B
HCL
29 lines
464 B
HCL
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
|
|
}
|