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

feat: Added Several Datasources Part 2 #622

Merged

Conversation

ChrisIsidora
Copy link
Contributor

@ChrisIsidora ChrisIsidora commented Jul 27, 2021

Part 2 of #618 (Sorry in advanced for the big PR)
Implemented following DataSources (which can be later on used to iterate over other resources):

  • Stages
  • File Formats
  • Sequences
  • Streams
  • Tasks
  • Pipes
  • Masking Policies
  • External Functions
  • External Tables
  • Warehouses
  • Resource Monitors
  • Storage Integrations

Test Plan

  • acceptance tests

References

https://docs.snowflake.com/en/sql-reference/sql/show.html
*

@ChrisIsidora ChrisIsidora requested a review from a team as a code owner July 27, 2021 14:12
@alldoami
Copy link
Contributor

/ok-to-test sha=a0fc150

@github-actions
Copy link

Integration tests failure for a0fc150

@ChrisIsidora
Copy link
Contributor Author

@alldoami Streams Acceptance Test fixed. Not sure why the warehouses, resource_monitors and storage_integrations are failing. Locally against my Snowflake account it works (see screenshot below), can you take a look if it fails again?
image

@alldoami
Copy link
Contributor

/ok-to-test sha=0ac99db

@github-actions
Copy link

Integration tests failure for 0ac99db

@ChrisIsidora
Copy link
Contributor Author

@alldoami Can you take a look why the warehouses, resource_monitors and storage_integrations are failing? Locally against my Snowflake account it works

@ChrisIsidora
Copy link
Contributor Author

@alldoami Did some research and it seems that the depends_on in the acceptance tests is triggering it, maybe it works locally on my side because I'm using TF 1.02? I found that there is a Test parameter for this PreventPostDestroyRefresh and I've added this, it still works locally on my side. Maybe you can run the integrations tests again to see if that helps? Thanks in advance.

@alldoami
Copy link
Contributor

/ok-to-test sha=94a8884

@github-actions
Copy link

Integration tests failure for 94a8884

@ChrisIsidora
Copy link
Contributor Author

ChrisIsidora commented Jul 29, 2021

@alldoami I was able to reproduce this locally. These tests are failing indeed due to the depends_on in datasource but ONLY in Terraform prior to 0.13. This was solved in version 0.13 (See hashicorp/terraform#17034) . When I use terraform prior to 0.13 like 0.12.31 locally. I get the same error as in the integration run.
What are the options here, is it possible to upgrade (sdks or ...?) ? If not what do you suggest we do to make these tests pass? We really do need these data sources atm.

@alldoami
Copy link
Contributor

I'll upgrade tf for testing! Could you get rid of your workaround 😅

@ChrisIsidora
Copy link
Contributor Author

ChrisIsidora commented Jul 29, 2021

@alldoami Done! Removed workaround

@alldoami
Copy link
Contributor

/ok-to-test sha=6887b89

@github-actions
Copy link

Integration tests failure for 6887b89

@ChrisIsidora
Copy link
Contributor Author

@alldoami Can you run it again? Seems it failing for no apparent reason?

@alldoami
Copy link
Contributor

/ok-to-test sha=6887b89

@github-actions
Copy link

Integration tests success for 6887b89

@alldoami alldoami merged commit 2a99ea9 into Snowflake-Labs:main Jul 30, 2021
@ChrisIsidora ChrisIsidora deleted the feature/add-missing-datasources branch July 31, 2021 06:36
jtzero pushed a commit to rxrevu/terraform-provider-snowflake that referenced this pull request Aug 19, 2021
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.

2 participants