-
Notifications
You must be signed in to change notification settings - Fork 161
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 tfe_organization_membership import by org name and user email #715
Conversation
cac3d02
to
5ae695e
Compare
@@ -108,3 +110,25 @@ func resourceTFEOrganizationMembershipDelete(d *schema.ResourceData, meta interf | |||
|
|||
return nil | |||
} | |||
|
|||
func resourceTFEOrganizationMembershipImporter(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { | |||
tfeClient := meta.(*tfe.Client) |
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.
Panic ❗
tfeClient := meta.(*tfe.Client) | |
config := meta.(ConfiguredClient) | |
// you can use the tfe client: config.Client.Workspaces.Blah() |
This change was introduced in #762
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.
Fixed! Thanks for catching that
42eba8a
to
035ae10
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.
This is great. Can you rebase the CHANGELOG?
035ae10
to
c5372af
Compare
Absolutely! I will merge this once I get some local dev issues figured out and I can test out the rebase |
We are struggling with some upstream test infrastructure changes today. I'm going to merge this now and ensure the tests pass later on. |
Description
Allow tfe_organization_membership resource to also be imported by org-name/user-email
Presently, the resource can only be imported through its ID, which is not presented to the user in the TFE UI. This makes it very difficult to import.
Testing plan
External links
Output from acceptance tests