From 15b9dea7a95765f1f3c09fe0dcb2ea5b5cb669c1 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 4 Aug 2023 14:18:08 +0200 Subject: import some common modules --- digitalocean/data_volume/main.tf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 digitalocean/data_volume/main.tf (limited to 'digitalocean/data_volume/main.tf') diff --git a/digitalocean/data_volume/main.tf b/digitalocean/data_volume/main.tf new file mode 100644 index 0000000..9a58c50 --- /dev/null +++ b/digitalocean/data_volume/main.tf @@ -0,0 +1,16 @@ +resource "digitalocean_volume" "this" { + region = var.region + name = var.name + size = var.size + initial_filesystem_type = "ext4" + initial_filesystem_label = "data" + + lifecycle { + prevent_destroy = true + } +} + +resource "digitalocean_project_resources" "this" { + project = var.project_id + resources = [digitalocean_volume.this.urn] +} -- cgit v1.2.3