One catalog name was shared by two environments, and the metastore only allows one owner.
Unity Catalog names are unique per metastore. Both dev and prod declared growth_opportunities, dev won the race, and every prod apply since has failed on a name that already exists.
The fix introduces a catalog_name variable per environment. Dev resolves to growth_opportunities_dev and prod keeps the clean name, which avoids renaming the catalog production already reads from.
The second half of the change is unrelated to Terraform. The portal API resolved its catalog with a null-coalescing fallback, so an unset variable in prod quietly returned dev data instead of failing. That fallback is now a throw.
What this brief could not check
- This brief was written by hand as a design fixture. It is modelled on real work, but no model read a diff to produce it, and its claims should not be relied on.
- The plan failure is described from its error message. The full CI log was not read, so the message may not be the only failure.
- Whether the shared catalog holds production data was not determined. That question is unresolved and is the reason the merge order starts where it does.