Skip to content

feat(coder-attach): add coder_external_agent resource #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kacpersaw
Copy link

This PR introduces a new Terraform resource coder_external_agent that allows users to define external agents for use in workspaces. It allows the coder UI and coder/coder to detect and act on external agent presence.

This is part of coder/coder#19091

func TestExternalAgent(t *testing.T) {
t.Parallel()

t.Run("OK", func(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also have a test that links this resource to a coder_agent.

Comment on lines 23 to 29
"token": {
ForceNew: true,
Required: true,
Sensitive: true,
Description: "Set the environment variable `CODER_AGENT_TOKEN` with this token to authenticate an agent.",
Type: schema.TypeString,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand linking these based on the token value rather than just the ID value of the agent. It seems like we'd want to be able to configure the auth type on the coder_agent and have that also apply here.

@kacpersaw kacpersaw requested a review from deansheather August 6, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants