-
Notifications
You must be signed in to change notification settings - Fork 430
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
[Bug]: terraform apply -refresh-only fails #3427
Comments
Hi @israel 👋 I couldn't reproduce this. After applying the configuration and running ❯ terraform apply -refresh-only
Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the last "terraform apply" which may have affected this plan:
# snowflake_schema.schema has changed
~ resource "snowflake_schema" "schema" {
id = "\"JMICHALAK\".\"my_schema\""
name = "my_schema"
~ show_output = [
~ {
~ is_current = true -> false
name = "my_schema"
# (9 unchanged attributes hidden)
},
]
# (24 unchanged attributes hidden)
}
This is a refresh-only plan, so Terraform will not take any actions to undo these. If you were expecting these changes then you can apply this
plan to record the updated values in the Terraform state without changing any remote objects.
Would you like to update the Terraform state to reflect these detected changes?
Terraform will write these changes to the state without modifying any real infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value: yes
Apply complete! Resources: 0 added, 0 changed, 0 destroyed. What is the reason for using |
Hi @sfc-gh-jmichalak , Did you first successfuly applied the resource?
Here's a more complete output: |
I checked TF 1.11.0 and provider 1.0.4 and the apply succeeds.
Please read more about handling default values here (Default values, Validations and "Empty" values sections). We use the |
Terraform CLI Version
1.11.0
Terraform Provider Version
1.0.4
Company Name
Nice
Terraform Configuration
Category
category:resource
Object type(s)
resource:schema
Expected Behavior
Expected no errors
Actual Behavior
Error: expected [{{} is_transient}] to be one of ["true" "false"], got default
Steps to Reproduce
create a simple snowflake_schema resource, apply it successfuly and then try to refresh it using 'terraform apply -refresh-only'
I have seen in the code that in some cases, not just in the schema resource a "default" value is assigned to fields when they should have true/false. This breaks when trying to refresh.
How much impact is this issue causing?
High
Logs
No response
Additional Information
No response
Would you like to implement a fix?
The text was updated successfully, but these errors were encountered: