Description
Terraform CLI Version
1.6.0
Terraform Provider Version
1.0.3
Company Name
Humana
Terraform Configuration
Terraform Configuration*
# Complete (with SERVICE user type)
resource "snowflake_account" "account" {
name = var.account_name
admin_name = var.admin_name
admin_rsa_public_key = tls_private_key.rsa.public_key_pem
admin_user_type = "SERVICE"
email = var.account_email
edition = var.edition
region_group = "PUBLIC"
region = var.snowflake_region
comment = "built by Terraform"
is_org_admin = var.is_org_admin
grace_period_in_days = 90
depends_on = [tls_private_key.rsa]
}
import {
to = resource.snowflake_account.account
id = "XXX.AZ_SNOWFLAKE_CENTERWELL_EASTUS2_SBX"
}
Category
category:resource
Object type(s)
No response
Expected Behavior
Expected Behavior*
I expect the account to be successfully imported into terraform state
Actual Behavior*
get the following error when trying to import
Error: 001817 (42601): SQL compilation error:
│ parameter value out of range: GRACE_PERIOD_IN_DAYS. Must be between 3 and 90.
run the code
Actual Behavior
account imported successfully
Steps to Reproduce
Steps to Reproduce*
create a snowflake account manually
copy the hcl configuration
update the account name in import
How much impact is this issue causing?
Low
Logs
No response
Additional Information
From: Support [support@snowflake.com]
Sent: 1/30/2025 1:37 PM
Hello Pradeep,
Thank you for writing back.
Indeed there is no parameter ‘grace_period_in_days’, from Snowflake, it can be set only with DROP statement.
However, a possible reason why you receive the below error;
Error: 001817 (42601): SQL compilation error:
? parameter value out of range: GRACE_PERIOD_IN_DAYS. Must be between 3 and 90.
Is because when you created a Snowflake account using Terraform you did not specify ‘grace_period_in_days’ (0/null) / or specified a different number.
When you then attempted to update the account name in import script with ‘grace_period_in_days’ as 90, the ‘grace_period_in_days’ value mismatched the previous value set (either a null value/some value) when creating the account.
We have ruled out any issue from Snowflake side, since Terraform Provider is not part of the Snowflake Service and Snowflake Support does not handle technical issues or feature requests related to this application’s functionality, I’d request you to please reach out to your Accounts team/Terraform support.
Kind Regards,
Nikita
Snowflake Inc.
Would you like to implement a fix?
- Yeah, I'll take it 😎