From 73976dd0760acc1396df6073d86e3e4dbaac37c3 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Thu, 31 Aug 2023 04:24:10 +0300 Subject: [PATCH] fix: fix aws_linux template (#9349) --- examples/templates/aws-linux/main.tf | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/templates/aws-linux/main.tf b/examples/templates/aws-linux/main.tf index c3c262e513..3017abf339 100644 --- a/examples/templates/aws-linux/main.tf +++ b/examples/templates/aws-linux/main.tf @@ -158,7 +158,8 @@ data "aws_ami" "ubuntu" { owners = ["099720109477"] # Canonical } -resource "coder_agent" "main" { +resource "coder_agent" "dev" { + count = data.coder_workspace.me.start_count arch = "amd64" auth = "aws-instance-identity" os = "linux" @@ -195,7 +196,8 @@ resource "coder_agent" "main" { } resource "coder_app" "code-server" { - agent_id = coder_agent.main.id + count = data.coder_workspace.me.start_count + agent_id = coder_agent.dev[0].id slug = "code-server" display_name = "code-server" url = "http://localhost:13337/?folder=/home/coder" @@ -211,9 +213,8 @@ resource "coder_app" "code-server" { } locals { - linux_user = "coder" # Ensure this user/group does not exist in your VM image - # User data is used to run the init_script - user_data = < 0 ? trimspace(<