Snowflake-Labs / terraform-provider-snowflake

Terraform provider for managing Snowflake accounts
https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest
MIT License
552 stars 420 forks source link

[Feature]: data source "snowflake_current_organization" #3120

Open tyler180 opened 1 month ago

tyler180 commented 1 month ago

Use Cases or Problem Statement

Add a data source to get the current organization similar to "snowflake_current_account". This will allow the organization ID to be used by referencing the data source.

Category

category:data_source

Object type(s)

No response

Proposal

This would be similar to the "snowflake_current_account" data source and use the value returned by CURRENT_ORGANIZATION_NAME(). It looks like there's only CURRENT_ORGANIZATION_NAME() and not CURRENT_ORGANIZATION() like there is for CURRENT_ACCOUNT()

How much impact is this issue causing?

Low

Additional Information

No response

Would you like to implement a fix?

sfc-gh-asawicki commented 1 month ago

Hey @tyler180. Thanks for reaching out to us.

We did not plan to include such a datasource for a V1 but we are open for contributions (as I see you marked "Yeah, I'll take it" checkbox). Please follow the contribution guidelines and let us know if you have any questions :)