From 9d60a5ad5077674eda7231008ef8684214baa1af Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Thu, 9 Jun 2022 11:47:50 +0300 Subject: [PATCH] example: Re-enable Digital Ocean project assignment 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 7710138bd5e3b..70fcdc364f6c8 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 + ] +}