aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/digitalocean/domain/main.tf
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-08-04 14:18:08 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-08-04 14:18:08 +0200
commit15b9dea7a95765f1f3c09fe0dcb2ea5b5cb669c1 (patch)
treec0c192e00c419ade1779ae62b3aed91bbb3e8778 /digitalocean/domain/main.tf
parentinitial commit (diff)
downloadinfra-terraform-15b9dea7a95765f1f3c09fe0dcb2ea5b5cb669c1.tar.gz
infra-terraform-15b9dea7a95765f1f3c09fe0dcb2ea5b5cb669c1.zip
import some common modulesv0.0.1
Diffstat (limited to '')
-rw-r--r--digitalocean/domain/main.tf16
1 files changed, 16 insertions, 0 deletions
diff --git a/digitalocean/domain/main.tf b/digitalocean/domain/main.tf
new file mode 100644
index 0000000..a5980ea
--- /dev/null
+++ b/digitalocean/domain/main.tf
@@ -0,0 +1,16 @@
+resource "digitalocean_domain" "this" {
+ name = var.name
+}
+
+resource "digitalocean_project_resources" "domain" {
+ project = var.project_id
+ resources = [digitalocean_domain.this.urn]
+}
+
+resource "digitalocean_record" "a" {
+ type = "A"
+ domain = digitalocean_domain.this.id
+ value = var.ip_address
+ name = "@"
+ ttl = 3600
+}