-
Notifications
You must be signed in to change notification settings - Fork 427
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]: snowflake_oauth_integration_for_custom_clients - blocked_roles_list should be optional #3171
Comments
Current workaround: data "snowflake_roles" "orgadmin" {
like = "ORGADMIN"
}
locals {
maybe_orgadmin_role = length(data.snowflake_roles.orgadmin.roles) > 0 ? "ORGADMIN" : null
}
resource "snowflake_oauth_integration_for_custom_clients" "example" {
name = "example"
enabled = true
oauth_client_type = "CONFIDENTIAL"
oauth_redirect_uri = "https://example.com/complete/snowflake"
blocked_roles_list = compact(["ACCOUNTADMIN", "SECURITYADMIN", local.maybe_orgadmin_role])
} |
Hi @imre-kerr-sb1 👋 It's true that this field should be optional to match Snowflake. We marked this field as required during the rework to handle default roles properly (to handle permadiff in Terraform). However, a similar |
…#3267) <!-- Feel free to delete comments as you fill this in --> - make the `blocked_roles_field` optional in OAuth security integrations - when tried to use `NormalizeAndCompareIdentifiersInSet`, the diff was suppressed in step 2 of the new tests, resulting in the role not being removed - this will be fixed next <!-- summary of changes --> ## Test Plan <!-- detail ways in which this PR has been tested or needs to be tested --> * [x] acceptance tests <!-- add more below if you think they are relevant --> * [ ] … ## References <!-- issues documentation links, etc --> #3171 ## TODO - use `NormalizeAndCompareIdentifiersInSet` in this field; also in external oauth resource
Hi @imre-kerr-sb1 👋 We've just released v0.100.0 (release, migration guide) in which we made |
Closing due to inactivity. |
Terraform CLI Version
1.9.8
Terraform Provider Version
0.97.0
Terraform Configuration
Category
category:resource
Object type(s)
resource:oauth_integration
Expected Behavior
blocked_roles_list
should be optional, matching the syntax ofCREATE SECURITY_INTEGRATION
(https://docs.snowflake.com/en/sql-reference/sql/create-security-integration-oauth-snowflake)Actual Behavior
blocked_roles_list
is mandatory. This is annoying, since I have to check if I'm operating on an orgadmin account or not to give the correct list. Bit of a niche case, but could be avoided entirely by just making the field optional.Error message when missing orgadmin in an orgadmin account:
Error message when including orgadmin in a non-orgadmin account:
Steps to Reproduce
Apply the configuration above to two accounts, one orgadmin, one not. It will fail on at least one.
How much impact is this issue causing?
Low
Logs
No response
Additional Information
No response
Would you like to implement a fix?
The text was updated successfully, but these errors were encountered: