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

Cannot add or remove more than 10 accounts to a share at once #2189

Open
emancu opened this issue Nov 13, 2023 · 3 comments
Open

Cannot add or remove more than 10 accounts to a share at once #2189

emancu opened this issue Nov 13, 2023 · 3 comments
Labels
bug Used to mark issues with provider's incorrect behavior category:resource resource:share Issue connected to the snowflake_share resource

Comments

@emancu
Copy link
Contributor

emancu commented Nov 13, 2023

Provider Version

0.72.0

Terraform Version

1.4

Describe the bug

It is not a bug, its a limitation on the API. The problem is, there is no way in terraform to add multiple accounts to a single share.

resource "snowflake_share" "insights_for_partners_reporting" {
  name    = upper("insights_${var.environment}")
  comment = "This share is meant to be used by the Reader accounts to access reports."

  # FIXME: Snowflake provider won't fetch more than 3 accounts, although it is updated.
  # https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1066
  # 
  # Another error, Snowflake provider can't assign more than 10 accounts simultaneously!
  accounts = local.all_reader_accounts
}

Gives the following error:

│ Error: 003517 (0A000): SQL compilation error:
│ Cannot add or remove more than 10 accounts to a share at once.

Expected behavior

The provider generates the query using ADD ACCOUNTS, which technically it is prepared to append accounts without removing existing ones; however there is no way to iterate over accounts and append them to the share using terraform when there are more than 10 accounts.

I would expect a way to at least iterate over accounts using ADD ACCOUNT | REMOVE ACCOUNT.

@emancu emancu added the bug Used to mark issues with provider's incorrect behavior label Nov 13, 2023
@sfc-gh-jcieslak sfc-gh-jcieslak added category:resource resource:share Issue connected to the snowflake_share resource labels May 20, 2024
@jhughes-naic
Copy link

I ran into this issue as well with provider version 0.87.2. I have a share with well over 10 accounts attached and see no way with Terraform to iterate through the accounts. The "10 account limit" appears to be a Snowflake limit, I get the same message in the WebUI, however the Terraform provider should account for this.

@CameronGibson
Copy link

I am also running into this issue as well. I cannot find away around it either. Even with incrementally adding 10 shares at a time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to mark issues with provider's incorrect behavior category:resource resource:share Issue connected to the snowflake_share resource
Projects
None yet
Development

No branches or pull requests

5 participants