codecutout/terraform-provider-powerbi

Provide data source credentials

Opened this issue · 1 comments

alxy commented

Hi,

is it possible to also provide credentials for datasources for PowerBI datasets?
I can see that there is an option to add a datasource block in the documentation, I couldn't find a way to pass credentials to authenticate against this datasource.

Currently, what we are doing is using some custom PowerShell script to do the authorization using the following REST endpoint.

Example request body:

{
  "credentialDetails": {
    "credentialType": "Basic",
    "credentials": "{\"credentialData\":[{\"name\":\"username\", \"value\":\"john\"},{\"name\":\"password\", \"value\":\"*****\"}]}",
    "encryptedConnection": "Encrypted",
    "encryptionAlgorithm": "None",
    "privacyLevel": "None",
    "useEndUserOAuth2Credentials": "False"
  }
}

Would it be possible to add this to the provider so it can be natively handled by Terraform?

Currently updating data sources are done entirely with https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updatedatasources

The API you linked appears to be for configuring a gateway. There is currently no support for gateways, but that is only because i do not have any experience with using a powerbi gateway. I would gladly accept any PRs to add gateway support