azaurus1 / terraform-provider-pinot

A terraform provider for Apache Pinot
https://registry.terraform.io/providers/azaurus1/pinot/latest
Mozilla Public License 2.0
8 stars 1 forks source link

Enable authentication via Bearer token #53

Closed guustavov closed 3 months ago

guustavov commented 3 months ago

Hello @azaurus1 and other contributors, I hope you're all doing well!

First off, big kudos on the recent updates – the progress of the provider has been impressive!

I wanted to throw a suggestion into the mix: any chance we could incorporate support for Bearer Token authentication alongside Basic auth? Any chances of this being on your roadmap in the near future? It would be a game-changer for those of us working with managed Apache Pinot services and other similar setups.

Looking forward to hearing your thoughts on this!

azaurus1 commented 3 months ago

Hi @guustavov, Thanks!

This is certainly something we'd like to implement, so I'll add this to the board, and it will likely be added some time this week

azaurus1 commented 3 months ago

Hi @guustavov, I have just implemented this and included it in v0.3.0, and pushed it to the terraform registry, heres how to use it:

provider "pinot" {
  controller_url = "http://localhost:9000"
  auth_type      = "Bearer" // Bearer will use bearer token, anything else will use default which is basic
  auth_token = "YWRtaW46dmVyeXNlY3JldA"
}

Auth_token is used in the same manner as with basic, and will be added to the header as Bearer [auth_token]