When running a terraform plan, when the Snowflake provider does a refresh state, it fails with "missing destination name expires_on in *resources.roleGrant"
This seems to be because it runs a Snowflake SHOW GRANTS OF {role}, which contains the new expires_on column. I am using v2.22.0 of the provider and am struggling to find a workaround.
If anyone has any suggestions or a workaround then I should be grateful
1 Like
This is a known upstream issue: the provider repo has issue 5265 with exactly your error on v2.22.0, caused by a newly added expires_on column in Snowflake’s SHOW GRANTS output. A Snowflake engineer documented a temporary mitigation in issue 5279: the account-level function SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMAND, which the Snowflake docs describe as made for exactly this case - new columns breaking code that expects fixed output; it needs ACCOUNTADMIN and restricts the SHOW GRANTS column list. Their comment was aimed at an unsupported provider version, so treat the mitigation on v2.22.0 as worth testing rather than guaranteed. Also note 5265 was closed the same day without a new provider release, so it is worth re-running your plan and otherwise watching for the next patch release.