-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resource: snowflake_file_format : Error: Only one of Rename or Set can be set at once. - on provider upgrade without snowflake_file_format resource change #1947
Comments
We are seeing the same issue with an older version of Terraform (1.2.4) and a newer version of Snowflake (v0.69.0). Is there any update on this issue? This is affecting a production rollout that was working on a previous version. |
I'm still seeing this on version 0.70.0 |
A work around I found is to replace the file_format to allow it to update to a newer version. From Terraform Docs
|
I'm seeing this on v0.74.0, even when changing the comment on a |
Hey @csbain. Thanks for reporting the issue. It seems that v0.68.0 has introduced a regression in file format resource behavior. The fix should be easy, I will handle this change this week. |
We are still seeing this issue when using a Parquet File Format. We are not able to set the replace_invalid_characters option. Using Release 0.78.0 |
Provider Version
0.68.1
Terraform Version
1.5.2
Describe the bug
Redeploying a stack with snowflake_file_format, upgrading the snowflake terraform provider from a previous version (0.67.0)
The following error is received on terraform apply (plan is ok) with no changes to the snowflake_file_format resource.
╷
│ Error: Only one of Rename or Set can be set at once.
│
│ with module.snowflake_table.snowflake_file_format.firehose_no_ext_json,
│ on s3_to_snowflake_pi/snowflake.tf line 101, in resource "snowflake_file_format" "firehose_no_ext_json":
│ 101: resource "snowflake_file_format" "firehose_no_ext_json" {
│
╵
Expected behavior
successful apply with no error
Code samples and commands
resource "snowflake_file_format" "firehose_no_ext_json" {
name = "FIREHOSE_NO_EXT_JSON"
database = data.snowflake_database.sf_env_db.name
schema = snowflake_schema.schema.name
format_type = "JSON"
file_extension = ""
binary_format = "HEX"
trim_space = false
null_if = ["\N"]
enable_octal = false
allow_duplicate = false
strip_outer_array = false
strip_null_values = false
replace_invalid_characters = false
ignore_utf8_errors = false
skip_byte_order_mark = true
}
PLEASE NOTE null_if has not been changed since last run.
Output from plan:
module.snowflake_table.snowflake_file_format.firehose_no_ext_json will be updated in-place
~ resource "snowflake_file_format" "firehose_no_ext_json" {
id = "WAIO_DATA_UAT|RAW_WAIO_ENT_PI_SYSTEM_STREAMING|FIREHOSE_NO_EXT_JSON"
name = "FIREHOSE_NO_EXT_JSON"
~ null_if = [
- "N",
+ "\N",
]
# (25 unchanged attributes hidden)
}
Please add code examples and commands that were run to cause the problem.
Add any other context about the problem here.
This has only occured since upgrading from 0.67 to 0.68.1
The text was updated successfully, but these errors were encountered: