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

Allow agent pools to be imported by name #561

Merged
merged 4 commits into from Aug 2, 2022

Conversation

JarrettSpiker
Copy link
Contributor

Description

Allow agent pools to be imported by org name/agent pool name

Testing plan

  1. Check that agent pool data sources still works
  2. Check that agent pools can still be imported by ID
    1. Check that agent pools can be imported by org/name
  3. Check that invalid import ID formats fail (eg a/b/c)
  4. Check for error if org name is not found
  5. Check for error if pool name is not found

External links

Output from acceptance tests

❯ go test github.com/hashicorp/terraform-provider-tfe/tfe  -run TestAccTFEAgentPool_import -v
=== RUN   TestAccTFEAgentPool_import
--- PASS: TestAccTFEAgentPool_import (104.15s)
PASS
ok
...

@JarrettSpiker JarrettSpiker requested a review from a team as a code owner July 20, 2022 21:34
Copy link
Contributor

@SwiftEngineer SwiftEngineer left a comment

Choose a reason for hiding this comment

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

One note about a case that may or may not deserve some additional handling, other than that this looks great! 🎉

tfe/resource_tfe_agent_pool.go Show resolved Hide resolved
Copy link
Contributor

@sebasslash sebasslash left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍 ! Minor grammatical error and a non blocker below ⬇️

tfe/agent_pool_helpers.go Outdated Show resolved Hide resolved
tfe/resource_tfe_agent_pool.go Show resolved Hide resolved
tfe/agent_pool_helpers.go Outdated Show resolved Hide resolved
Co-authored-by: Sebastian Rivera <sebastian.rivera@hashicorp.com>
Co-authored-by: Sebastian Rivera <sebastian.rivera@hashicorp.com>
Copy link
Collaborator

@brandonc brandonc left a comment

Choose a reason for hiding this comment

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

I tested it and it worked!

@JarrettSpiker JarrettSpiker merged commit 08c9a7d into main Aug 2, 2022
@JarrettSpiker JarrettSpiker deleted the jspiker/import-pool-by-name branch August 2, 2022 19:56
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.

None yet

4 participants