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]: Recreate on stage table_directory settings change #3338

Open
1 task
nijave opened this issue Jan 14, 2025 · 1 comment
Open
1 task

[Bug]: Recreate on stage table_directory settings change #3338

nijave opened this issue Jan 14, 2025 · 1 comment
Labels
feature-request Used to mark issues with provider's missing functionalities

Comments

@nijave
Copy link

nijave commented Jan 14, 2025

Terraform CLI Version

1.7.5

Terraform Provider Version

0.100.0

Company Name

15Five

Terraform Configuration

"CLOUD30_DATASET_IN-stage": {
    "//": {
      "metadata": {
        "path": "snowflake_tf/CLOUD30_DATASET_IN-stage",
        "uniqueId": "CLOUD30_DATASET_IN-stage"
      }
    },
    "comment": "Stage for cloud30",
    "database": "CLOUD30",
    "depends_on": [
      "snowflake_storage_integration.CLOUD30_INTEGRATION_IN-storage_integration",
      "snowflake_database.CLOUD30-database",
      "snowflake_schema.LZ-CLOUD30-schema"
    ],
    "name": "CLOUD30_DATASET_IN",
    "provider": "snowflake...._accountadmin",
    "schema": "LZ",
    "storage_integration": "CLOUD30_INTEGRATION_IN",
    "url": "s3://.../datasets/"
  }

Category

category:resource

Object type(s)

resource:stage

Expected Behavior

Directory listing should be disabled in place on stages

Actual Behavior

Terraform attempts to recreate the stage when the directory setting changes

Steps to Reproduce

  1. Enable directory listing in the web GUI
  2. Run Terraform plan and notice it wants to recreate the stage to disable the setting

How much impact is this issue causing?

Low

Logs

No response

Additional Information

https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/pkg/resources/stage.go#L81
https://docs.snowflake.com/en/sql-reference/sql/alter-stage#directory-table-parameters

Would you like to implement a fix?

  • Yeah, I'll take it 😎
@nijave nijave added the bug Used to mark issues with provider's incorrect behavior label Jan 14, 2025
@sfc-gh-jcieslak sfc-gh-jcieslak added feature-request Used to mark issues with provider's missing functionalities and removed bug Used to mark issues with provider's incorrect behavior labels Jan 15, 2025
@sfc-gh-jcieslak
Copy link
Collaborator

Hey 👋
This feature was previously not supported by Snowflake. I can see that now it's possible to alter the stage to enable the directory (here). Added this issue to the list of things to address during the stage resource refactoring (don't have any eta when this is going to happen). For now, I suggest using ignore changes meta-argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Used to mark issues with provider's missing functionalities
Projects
None yet
Development

No branches or pull requests

2 participants