Skip to content
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]: snowflake_schema's describe_output changes appearing in every plan #3296

Open
1 task
Mattioli opened this issue Dec 16, 2024 · 1 comment
Open
1 task
Labels
category:migration Issues connected with migration to v1.0.0. general-usage General help/usage questions resource:schema Issue connected to the snowflake_schema resource

Comments

@Mattioli
Copy link

Terraform CLI Version

1.7.4

Terraform Provider Version

1.0.0

Company Name

No response

Terraform Configuration

.

Category

category:resource

Object type(s)

No response

Expected Behavior

No change in plans when the resource is not modified at all

Actual Behavior

After upgrading from 0.93 to upper versions (0.94+), in every terraform plan, some specific snowflake_schema resources are showing as "to-change" even if the resource is not being touched at all. Specifically, the describe_output field is said to change, e.g.:


# snowflake_schema.dbt_blue_operations_sensitive will be updated in-place
--
  | ~ resource "snowflake_schema" "dbt_blue_operations_sensitive" {
  | + describe_output                               = (known after apply)
  | id                                            = "\"ANALYTICS_BLUE\".\"CORE_OPERATIONS_SENSITIVE\""
  | name                                          = "CORE_OPERATIONS_SENSITIVE"
  | # (20 unchanged attributes hidden)
  | }

When I look at the actual TF state, I notice that describe_output is empty. I suppose this is happening because my Terraform user doesn't have access to this schema (source), but it's trying to update it regardless. Is there a way for this not to happen without granting the terraform user ownership to these schemas?

Steps to Reproduce

1 - Be on a version >= 0.94.0
2 - Have a snowflake_schema where the terraform user has no sufficient privileges
3 - Run terraform plan
4 - Notice changes on describe_output for the related schema resource
5 - Apply cahnges
6 - Run terraform plan
7 - Notice again changes on describe_output for the related schema resource

How much impact is this issue causing?

Low

Logs

No response

Additional Information

No response

Would you like to implement a fix?

  • Yeah, I'll take it 😎
@Mattioli Mattioli added the bug Used to mark issues with provider's incorrect behavior label Dec 16, 2024
@sfc-gh-jmichalak
Copy link
Collaborator

Hi @Mattioli 👋

Thanks for reporting this issue. I can't reproduce it. This field should not be marked as re-computedPlease provide the whole schema configuration (preferably with grants setup) and logs with TF_LOG=DEBUG.

You don't need to grant ownership. DESCRIBE for schemas returns a list of objects in the schema, so just MONITOR with at least one privilege granted on the object type should be enough - see docs.

@sfc-gh-asawicki sfc-gh-asawicki added category:migration Issues connected with migration to v1.0.0. resource:schema Issue connected to the snowflake_schema resource general-usage General help/usage questions and removed bug Used to mark issues with provider's incorrect behavior labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:migration Issues connected with migration to v1.0.0. general-usage General help/usage questions resource:schema Issue connected to the snowflake_schema resource
Projects
None yet
Development

No branches or pull requests

3 participants