-
Notifications
You must be signed in to change notification settings - Fork 428
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
file_format error when i exec terraform apply a second time without any change #897
Comments
I am having the same issue. Has anyone found a workaround or a fix for this issue? |
Any work around this issue, we are having the same issue. |
@Kannedhara I fixed this for our environment by adding "compression = 'NONE'" in the file format terraform resource creation. I am guessing the documentation is not really up to date and some parameters are mandatory for different format_types, so even if my parameter does not fix it for you, check the error and try to add a value for whatever parameter it complains. |
Here is a listing of the "required" fields (with what I believe are the default values) to get the file_format resource to work as expected:
|
This still seems to be occurring on 0.49.0 as of today. I'm having the same problem even passing default values as shown above. |
Same issue here. |
As @crowemi pointed out, the escape_unenclosed_field needs to be explicitly defined in the resource definition, otherwise it will fail (or will trigger a change every time).
This is the default setting, what works for me. Provider version 0.52 |
Issue still occurring at the moment - Correction by @crowemi worked like a charm |
Same issue here for creating a JSON file format. I solved by explicitly adding the default values. Note that @crowemi suggestion is for CSV. |
We are closing this issue as part of a cleanup described in announcement. If you believe that the issue is still valid in v0.89.0, please open a new ticket. |
Provider Version
Terraform Version
Terraform v1.1.7
Describe the bug
when I exec "terraform apply" a second time without any change of my code, return an error.
Plan: 0 to add, 1 to change, 0 to destroy.
![image](https://user-images.githubusercontent.com/26116632/157408911-c2aacca8-9c7e-4d8a-9f0b-33bcbaf3c1c2.png)
snowflake_file_format.external_storage: Modifying... [id=TF_DAF2|LOG|TFMYCSVFORMAT2]
╷
│ Error: error updating file format compression on TF_DAF2|LOG|TFMYCSVFORMAT2: 001008 (22023): SQL compilation error:
│ invalid value [''] for parameter 'COMPRESSION'
│
│ with snowflake_file_format.external_storage,
│ on storagefileformat.tf line 3, in resource "snowflake_file_format" "external_storage":
│ 3: resource "snowflake_file_format" "external_storage" {
│
╵
Expected behavior
Not return this error
Code samples and commands
resource "snowflake_file_format" "external_storage" {
name = "TFMYCSVFORMAT2"
database = "TF_DAF2"
schema = "LOG"
format_type = "csv"
depends_on = [
snowflake_schema.schemaparatablas
]
}
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: