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

Filter out account level params #499

Merged
merged 2 commits into from
Mar 24, 2021
Merged

Conversation

funes79
Copy link
Contributor

@funes79 funes79 commented Mar 20, 2021

Test Plan

  • acceptance tests

References

Usage

terraform plan
Output:

  # snowflake_task.retention_task will be updated in-place
  ~ resource "snowflake_task" "retention_task" {
        comment            = "deletes tables"
        database           = "IDB"
        enabled            = false
        id                 = "IDB|UTIL|RETENTION_TASK"
        name               = "RETENTION_TASK"
        schedule           = "USING CRON 0 23 * * * Europe/London"
        schema             = "UTIL"
      ~ session_parameters = {
          - "QUOTED_IDENTIFIERS_IGNORE_CASE" = "true" -> null
        }
        sql_statement      = "CALL retention(false)"
        warehouse          = "DEMO_XS_WH"
    }
Plan: 0 to add, 1 to change, 0 to destroy.

To eliminate the constant recreation of task we can filter out account level params.

terraform plan
Output:

Plan: 0 to add, 0 to change, 0 to destroy.

@funes79
Copy link
Contributor Author

funes79 commented Mar 24, 2021

@alldoami please review

@alldoami
Copy link
Contributor

/ok-to-test sha=a2d42a5

Copy link
Contributor

@alldoami alldoami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@github-actions
Copy link

Integration tests success for a2d42a5

@alldoami alldoami merged commit 9291b48 into Snowflake-Labs:main Mar 24, 2021
@zarez
Copy link

zarez commented Apr 26, 2021

Have the same issue but with SYSTEM level parameters:

  ~ resource "snowflake_task" "task" {
        id                 = "DEV_RAW|STG1|test_task"
        name               = "test_task"
      ~ session_parameters = {
          - "ODBC_QUERY_RESULT_FORMAT" = "ARROW" -> null
        }
        # (7 unchanged attributes hidden)
    }

image

Maybe extend the condition to include system-level parameters

anton-chekanov pushed a commit to anton-chekanov/terraform-provider-snowflake that referenced this pull request Jan 25, 2022
daniepett pushed a commit to daniepett/terraform-provider-snowflake that referenced this pull request Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants