# state-file-fixer

Utility to update organization of the snowflake provider - [provider own guide](https://github.com/snowflakedb/terraform-provider-snowflake/blob/main/SNOWFLAKEDB_MIGRATION.md).
Running this job on a terraform project requires bumping ALL of the terraforn-snowflake modules there to be updated to version >=7.0.0.

## Running locally

The Jenkinsfile provides a mechanism to automatically update the state to reference providers defined at the root of a project qa/prod environments within terraform-infra.

To run this locally:

* Copy `.env.shadow` to `.env`
* Set `TERRAFORM_PROJECT` and `GITHUB_SSH_KEY_FILE` as required
* Run the following:

```
docker compose run --rm --build replace-provider
```
