-
Notifications
You must be signed in to change notification settings - Fork 0
/
halo.tf
44 lines (37 loc) · 876 Bytes
/
halo.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = "~> 2.0"
}
}
backend "remote" {
hostname = "app.terraform.io"
organization = "haloword"
workspaces {
name = "iac"
}
}
}
provider "digitalocean" {}
resource "digitalocean_droplet" "halo" {
image = "ubuntu-20-04-x64"
name = "haloword"
region = "sfo3"
size = "s-1vcpu-1gb-amd"
monitoring = true
ipv6 = true
}
resource "digitalocean_floating_ip" "halo" {
droplet_id = digitalocean_droplet.halo.id
region = digitalocean_droplet.halo.region
}
data "digitalocean_project" "halo" {
}
resource "digitalocean_project_resources" "halos" {
project = data.digitalocean_project.halo.id
resources = [
digitalocean_droplet.halo.urn,
digitalocean_floating_ip.halo.urn,
]
}