diff --git a/examples/templates/aws-linux/main.tf b/examples/templates/aws-linux/main.tf index f1f41024d938a..3017abf339bbb 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(<