bnjns / terraform-provider-metabase

Mozilla Public License 2.0
3 stars 0 forks source link

Enable to add extra HTTP headers #44

Closed yu-iskw closed 1 year ago

yu-iskw commented 1 year ago

Description

We can protect self-hosted metabase on Google Cloud Kubernetes Engine with Google Cloud IAP. When we call REST APIs through Cloud IAP, we need to add a ID token with the Authorization header.

https://cloud.google.com/iap/docs/authentication-howto

curl --verbose --header 'Authorization: Bearer ID_TOKEN' URL

New or Affected Resource(s)

NA

Potential Terraform Configuration

provider "metabase" {
  host     = local.metabase_credentials["host"]
  username = local.metabase_credentials["username"]
  password = local.metabase_credentials["password"]
  headers = {
     Authorizer = "Bearer: ${var.id_token}"
  }
}

References

bnjns commented 1 year ago

Hi @yu-iskw, thanks for raising the suggestion! Very much in favour of this - I'll take a look as soon as I can 🙂