Closed mcmohorn closed 8 months ago
I'm using metabase enterprise v 1.47.2.
In metabase-api.yaml I see both a put
and a post
. I've reached out to metabase to see if the post was deprecated.
I confirmed by checking their documentation here that there is no longer a POST with that signature. Should be using the PUT instead
Hey @mcmohorn, thanks for the report.
Indeed, it looks like the API has changed quite a bit, from v0.45 requiring the creation of cards beforehand with limited parameters, v0.46 supporting more parameters, and then... v0.47 simply discarding the endpoint, as you noticed. I haven't been following these changes because to be honest I haven't used (or at least upgraded) Metabase in the past year.
Maybe the new API actually makes managing dashboard cards simpler, but I'll have to look at how IDs are supposed to be attributed to cards. (This was the point of the POST
call, before setting the card configuration using PUT
.)
One thing's for sure, because it is a breaking change in the Metabase API, it will be a breaking change for this provider as well. Let's hope it is not a breaking change in how the Terraform state has to be stored, that would be more problematic.
I'll try taking a look at this in the next few days. Unfortunately I don't have much bandwidth to allocate to this project. If that's an option for you, I'd recommend sticking to Metabase v0.46 for now.
When I try to create a metabase_dashboard resource using version 0.3.0 of this provider, I receive this error:
In the metabase logs I see that the failing endpoint is
POST /api/dashboard/5/cards
.However when I use the Metabase UI to add cards, I notice that same endpoint but with a PUT, not a POST.
I think the easy solution might be to switch the POST to a PUT when handling the
metabase_dashboard
resource'scards_json
attribute.