title: Snowflake terraform Error: 002043 (02000): SQL compilation error: Object does not exist, or operation cannot be performed
body: <p>I had the code below.</p>
  <pre><code>terraform {
    required_providers {
      snowflake = {
        source  = &quot;chanzuckerberg/snowflake&quot;
        version = &quot;0.22.0&quot;
      }
    }
  }
  
  provider &quot;snowflake&quot; {
    alias = &quot;sys_admin&quot;
    role  = &quot;SYSADMIN&quot;
    username = &quot;tf-snow&quot;
    private_key_path = &quot;...&quot;
    region = &quot;ap-southeast-2&quot;
    account = &quot;...&quot;
  
  }
  
  resource &quot;snowflake_warehouse&quot; &quot;star_warehouse&quot; {
    provider       = snowflake.sys_admin
    name           = &quot;STAR_WAREHOUSE&quot;
    warehouse_size = &quot;XSmall&quot;
  
    auto_suspend = 60
  }
  
  resource &quot;snowflake_database&quot; &quot;STAR_DB&quot; {
    provider = snowflake.sys_admin
    name     = &quot;STAR_DB&quot;
  }
  
  resource &quot;snowflake_schema&quot; &quot;public&quot; {
    provider            = snowflake.sys_admin
    database            = &quot;STAR_DB&quot;
    name                = &quot;public&quot;
    data_retention_days = 1
  }
  
  resource &quot;snowflake_table&quot; &quot;sales&quot; {
    provider            = snowflake.sys_admin
    database            = &quot;STAR_DB&quot;
    schema              = &quot;public&quot;
    name                = &quot;sales&quot;
  
    column {
      name     = &quot;id&quot;
      type     = &quot;int&quot;
    }
  }
  </code></pre>
  <p>and I decided to rename &quot;STAR_DB&quot; to be the lowercase &quot;star_db&quot;.</p>
  <p>Now, no matter what I do, I keep getting this error.</p>
  <pre><code>Error: 002043 (02000): SQL compilation error: Object does not exist, or operation cannot be performed.
  with snowflake_schema.public
  on snowflake.tf line 33, in resource &quot;snowflake_schema&quot; &quot;public&quot;:
  </code></pre>
  <pre><code>Error: 002043 (02000): SQL compilation error: Object does not exist, or operation cannot be performed.
  with snowflake_table.sales
  on snowflake.tf line 40, in resource &quot;snowflake_table&quot; &quot;sales&quot;:
  </code></pre>
  <p>I reverted the code, I remove huge parts of it, I deleted the underlying resources and then recreated them but still the same error.</p>
  <p>Anyone know what's going on?</p>
  <p>Note: I am using terraform cloud</p>