From 567e4afdfc1446844edbf079fadacc3e2aa3dda1 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Thu, 9 Jun 2022 12:17:44 +0300 Subject: [PATCH] example: Re-enable Digital Ocean project assignment (#2196) The issue tracked in #1750 was fixed by #2187, we can now re-enable the project resource. --- examples/templates/do-linux/main.tf | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/examples/templates/do-linux/main.tf b/examples/templates/do-linux/main.tf index 7710138bd5..70fcdc364f 100644 --- a/examples/templates/do-linux/main.tf +++ b/examples/templates/do-linux/main.tf @@ -123,14 +123,13 @@ resource "digitalocean_droplet" "workspace" { ssh_keys = var.step2_do_admin_ssh_key > 0 ? [var.step2_do_admin_ssh_key] : [] } -# Temporarily disabled because it breaks SSH. (https://github.com/coder/coder/issues/1750) -# resource "digitalocean_project_resources" "project" { -# project = var.step1_do_project_id -# # Workaround for terraform plan when using count. -# resources = length(digitalocean_droplet.workspace) > 0 ? [ -# digitalocean_volume.home_volume.urn, -# digitalocean_droplet.workspace[0].urn -# ] : [ -# digitalocean_volume.home_volume.urn -# ] -# } +resource "digitalocean_project_resources" "project" { + project = var.step1_do_project_id + # Workaround for terraform plan when using count. + resources = length(digitalocean_droplet.workspace) > 0 ? [ + digitalocean_volume.home_volume.urn, + digitalocean_droplet.workspace[0].urn + ] : [ + digitalocean_volume.home_volume.urn + ] +}