You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fetch information of the user owning the API token used with the provider.
For example when initially configuring owners for an organization, the invoker could be dynamically imported based on the email address, assuming it is the same as the organization creator and thus implicit owner. Otherwise Terraform fails to create the membership as it already exists.
Proposal
Create a data source which can be used for getting the current user. I might be able contribute, if the I get feedback that this is something which would be accepted.
Naming is of course hard. Options:
tfe_current_user - matching the SDK function
tfe_user - could be expanded later to support fetching other users (by ID) if the SDK supported it, but would then expand over two API endpoints
Use-cases
Fetch information of the user owning the API token used with the provider.
For example when initially configuring owners for an organization, the invoker could be dynamically imported based on the email address, assuming it is the same as the organization creator and thus implicit owner. Otherwise Terraform fails to create the membership as it already exists.
Proposal
Create a data source which can be used for getting the current user. I might be able contribute, if the I get feedback that this is something which would be accepted.
Naming is of course hard. Options:
tfe_current_user
- matching the SDK functiontfe_user
- could be expanded later to support fetching other users (by ID) if the SDK supported it, but would then expand over two API endpointstfe_account
- matching the API endpointDocumentation:
Example usage:
The text was updated successfully, but these errors were encountered: