From 56ecc25c4b9b8c80e5432b2f7c64e65a8a2d75ce Mon Sep 17 00:00:00 2001 From: jdormit Date: Fri, 25 Oct 2024 00:29:02 -0400 Subject: [PATCH] Add monitoring to droplets --- terraform-modules/packer_droplet/interface.tf | 6 ++++++ terraform-modules/packer_droplet/main.tf | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/terraform-modules/packer_droplet/interface.tf b/terraform-modules/packer_droplet/interface.tf index b56fca8..2d4dd68 100644 --- a/terraform-modules/packer_droplet/interface.tf +++ b/terraform-modules/packer_droplet/interface.tf @@ -45,6 +45,12 @@ variable "tags" { default = ["terraform"] } +variable "monitoring" { + description = "Whether to enable droplet monitoring" + type = bool + default = true +} + output "droplet_id" { description = "Droplet ID" value = digitalocean_droplet.droplet.id diff --git a/terraform-modules/packer_droplet/main.tf b/terraform-modules/packer_droplet/main.tf index 98f4e8d..17c4f87 100644 --- a/terraform-modules/packer_droplet/main.tf +++ b/terraform-modules/packer_droplet/main.tf @@ -31,12 +31,13 @@ locals { } resource "digitalocean_droplet" "droplet" { - name = var.name - image = local.packer_image - region = var.region - size = var.droplet_size - backups = var.backups - tags = var.tags + name = var.name + image = local.packer_image + region = var.region + size = var.droplet_size + backups = var.backups + tags = var.tags + monitoring = var.monitoring ssh_keys = [ data.terraform_remote_state.do_ssh_keys.outputs.jdormit_laptop_ssh_key_id, data.terraform_remote_state.do_ssh_keys.outputs.jdormit_macbook_ssh_key_id,