@Mattias P :
It sounds like the issue you're facing is related to permissions and ownership after renaming the service principal in Terraform. Since the new service principal has the same permissions as the old one, it's possible that the ownership of the views and tables that were created by the old service principal was not properly transferred to the new service principal.
To fix this issue, you can try to modify the ownership of the views and tables using SQL commands in your database. Here's an example SQL command that you can use to modify the ownership of all views in a schema:
ALTER VIEW SCHEMA.my_schema.* OWNER TO new_owner;
You can modify this command to target specific views by replacing the * wildcard with a comma-separated list of view names. Similarly, you can modify the ownership of all tables in a schema using the following SQL command:
ALTER TABLE SCHEMA.my_schema.* OWNER TO new_owner;
Again, you can replace the * wildcard with a comma-separated list of table names to target specific tables. Make sure to replace my_schema and new_owner with the appropriate values for your database and new service principal. Once you've modified the ownership of the views and tables, you should be able to run dbt without encountering any permission errors.