Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new tfe_agent_token resource that can be used to create agent tokens using the Agent Tokens API endpoint.
This PR depends on PR hashicorp/go-tfe#169 in the hashicorp/go-tfe repository, which added the files agent_token.go and associated agent_token_test.go to interact with the above API endpoint.
Closes #250.
Testing plan
The new tfe_agent_token resource can be tested with this command after following the setup instructions in TESTS.md:
However, testing prior to the merging of hashicorp/go-tfe#169 and issuing a new release of go-tfe would require you to build go-tfe locally from https://github.com/jgrumboe/go-tfe/tree/jgrumboe-agent-token and then add a line like
replace github.com/hashicorp/go-tfe => /path-to-local-repo/go-tfe
to go.mod above the required stanza.External links
Output from acceptance tests