-
Notifications
You must be signed in to change notification settings - Fork 160
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 Terraform Cloud Agents #242
Conversation
7fb1efe
to
c54bb28
Compare
Agent pools do not have a full resource lifecycle yet, so an associated resource here in the provider is not supported - yet. This has the interesting side effect of needing to create an agent pool out-of-band of the provider, temporarily. This datasource is being added now, however, to be able to configure a workspace to use an organization's single pool.
And utilize it in the data source tests, as well.
And some tests to go with all this.
…tion_mode and agent_pool_id attributes
'operations' can't be set at all, not just 'true'.
This allows importing by solely an ID to work properly.
c54bb28
to
354c4d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i ran this through several different test scenarios and it all looks good to me (aside from that small note about validating execution mode).
i did get some warnings locally about needing to run go mod vendor when building this. it might just be me so this might be something you can ignore.
i'm not sure if i'm just on a different go version or if some of the vendor directories didn't get committed with the last PR but it might be worth running go mod vendor again and making sure all the directories are added/tracked (i've had this get messed up on me before).
Co-authored-by: Krista LaFentres (she/her) <[email protected]>
4d978df
to
7921207
Compare
Description
This adds support for Terraform Cloud Agents, now that agent pools have a full resource lifecycle and can be managed via Terraform. Specifically this adds a
tfe_agent_pool
resource and datasource (https://www.terraform.io/docs/cloud/api/agents.html) and allows configuring them for use in a Terraform Cloud workspace with the newexecution-mode
attribute.Closes #204
Testing plan
execution_mode
andagent_pool_id
should behave smoothly, allowing for continued use of the deprecatedoperations
argument or a seamless switch toexecution_mode
. Their use should be mutually exclusive. The only known rough edge I have found is moving fromexecution_mode = "agent"
back tooperations = true/false
fails schema validations, because of the limitations of validating existing state. This is acceptable though, as if you're already using execution_mode there is no reason to revert back to operations.terraform import tfe_agent_pool.name apool-xxxx
External links
TODO
Deprecateoperations
? Might save that for a separate change.