codecutout / terraform-provider-powerbi

Terraform Power BI Provider
MIT License
14 stars 16 forks source link

powerbi_pbix: Provide better documentation on how to use "original_database" and "database" (etc.) functionality #81

Open karlschriek opened 1 year ago

karlschriek commented 1 year ago

From reading the docs on powerbi_pbix, my expectation was that I would be I would be able to use for example the original_database abd database fields in order to point my report to a different DB from the one that was used to develop the PBIX file.

In other words:

Something like:

{
     original_database = "dev"
     database = "prod"
}

My assumption was that this would create a new dataset, this time sourced from the "prod" database instead. But I am fairly certain I am missing something, since whatever I try, I get the following error:

│ Error: Post "https://api.powerbi.com/v1.0/myorg/groups/xxxxxx/datasets/xxxxxxxxx/Default.UpdateDatasources": status code '404 Not Found' with body {"error":{"code":"ItemNotFound","message":"Dataset doesn't contain a datasource that matches selector #1"}}
│ 
│   with module.powerbi_reports.powerbi_pbix.example,
│   on modules/powerbi_reports/main.tf line 1, in resource "powerbi_pbix" "example":
│    1: resource "powerbi_pbix" "example" {
│ 

I would be great if the docs could be updated to clearly explain how to use this feature