Skip to content
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

Add support for TFC Remote agents #82

Merged
merged 6 commits into from
Dec 13, 2020
Merged

Add support for TFC Remote agents #82

merged 6 commits into from
Dec 13, 2020

Conversation

koikonom
Copy link
Contributor

Allows the operator to create workspaces that use remote agents instead
of running terraform on TFC hosted agents.

See https://www.terraform.io/docs/cloud/workspaces/agent.html for more
information on agents.

In order to use the feature we need to add the following YAML snippet in
our workspace spec:

```
spec:
  #  ... other code ...
  agentPoolID: apool-XXXXXXXXXXXXXXXX
```

koikonom and others added 4 commits November 20, 2020 19:19
Allows the operator to create workspaces that use remote agents instead
of running terraform on TFC hosted agents.

See https://www.terraform.io/docs/cloud/workspaces/agent.html for more
information on agents.

In order to use the feature we need to add the following YAML snippet in
our workspace spec:

```
spec:
  #  ... other code ...
  agentPoolID: apool-XXXXXXXXXXXXXXXX
```
@koikonom koikonom requested a review from a team November 23, 2020 18:33
@koikonom
Copy link
Contributor Author

How to test:

2020-11-23T18:36:50.502Z [INFO]  core: Agent registered successfully with Terraform Cloud: id=agent-XXXXXXXX pool-id=apool-XXXXXXXXX
  • Add the following line to your workspace spec:
spec:
  #  ... other code ...
  agentPoolID: apool-XXXXXXXXXXXXXXXX

The pool ID needs to match the pool ID you saw in the agent's startup messages.

  • Apply the workspace spec and verify that the plan and apply steps run on the cloud agent by looking at its log output.

Copy link
Contributor

@dak1n1 dak1n1 left a comment

Choose a reason for hiding this comment

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

Thanks for this feature! It all works as expected.

@koikonom koikonom merged commit 1951372 into master Dec 13, 2020
@koikonom koikonom deleted the agent_support branch December 13, 2020 16:39
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.

Add Terraform Agent Execution mode as option in workspace CRD.
2 participants