kelvintaywl / terraform-provider-circleci

(Unofficial) Terraform Provider for CircleCI
https://registry.terraform.io/providers/kelvintaywl/circleci/latest
Mozilla Public License 2.0
12 stars 3 forks source link

add data source for identifying current API token owner #68

Open kelvintaywl opened 4 months ago

kelvintaywl commented 4 months ago

like how the AWS provider has https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity, it would be useful if we provide a data source for the current API token owner (user).

The backend can be fulfilled via the getCurrentUser API (/me): https://circleci.com/docs/api/v2/index.html#operation/getCurrentUser

kelvintaywl commented 4 months ago

additionally, it may be good to add a DEBUG level log to print this info as well within the provider init phase.