-
Notifications
You must be signed in to change notification settings - Fork 487
Description
Full disclosure: the text in this ticket was generated with Claude. That said, it fully represents my hands-on experience in trying to upgrade stage resources from v2.12.0 to v2.14.0
I suspect that the issue relates specifically to the file_format parameter - all of the affected stages in my environment have a file_format specified, though not all stages that have a file_format specified are affected by the permadiff issue.
Description
snowflake_stage_external_s3 shows a permadiff on describe_output on every terraform plan, even after a successful terraform apply. The attribute transitions from its populated state value to (known after apply) on every subsequent plan, indicating the provider is not successfully reading/populating the attribute during refresh.
Provider Version
2.14.0
Terraform Version
~1.11.0
Resource
snowflake_stage_external_s3
Reproduction
Any snowflake_stage_external_s3 resource with a directory block and a named file_format. After initial apply, every subsequent plan shows:
~ resource "snowflake_stage_external_s3" "this" {
~ describe_output = [
- {
- directory_table = [
- {
- auto_refresh = false
- enable = false
# (1 unchanged attribute hidden)
},
]
- file_format = [
- {
- format_name = "\"DB\".\"SCHEMA\".\"MY_FORMAT\""
...
},
]
- location = [ ... ]
- privatelink = [ ... ]
},
] -> (known after apply)This diff reappears on every plan even after applying, never converging.
Contradictory ignore_changes Behavior
The workaround of adding ignore_changes = [describe_output] to the lifecycle block does suppress the permadiff in practice. However, Terraform also emits the following warning:
│ Warning: Redundant ignore_changes element
│
│ The attribute describe_output is decided by the provider alone and
│ therefore there can be no configured value to compare with. Including this
│ attribute in ignore_changes has no effect. Remove the attribute from
│ ignore_changes to quiet this warning.
This is a contradiction: Terraform's schema validator treats describe_output as purely computed (hence "no effect"), yet the planning engine still produces a diff on it that ignore_changes provably suppresses. Both cannot be true simultaneously, which points to an inconsistency in how describe_output is declared in the provider schema — likely a mismatch between the schema definition and the read/refresh logic that causes the attribute to not be populated after a refresh.
Expected Behavior
describe_output should be consistently populated after each read/refresh, resulting in a clean plan with no changes after apply.
Actual Behavior
describe_output is not populated during refresh, causing a permadiff on every plan. ignore_changes suppresses it despite Terraform warning it should have no effect.
Workaround
lifecycle {
ignore_changes = [describe_output]
}Suppresses the permadiff but produces a Warning: Redundant ignore_changes element warning on every plan/apply.