-
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
Terraform Plan Continually Proposes ALL PRIVILEGES Privilege Grant Despite Successful Apply #2076
Comments
wondering why you are not using the "all_privileges" boolean flag? https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_privileges_to_role#all_privileges Although we should add validation to prevent this from being passed directly anyways. |
@sfc-gh-swinkler I modified script to use the
|
I am facing similar issue. OWNERSHIP Grants are being modified for every terraform plan and apply ~ resource "snowflake_grant_privileges_to_role" "db_test_grt_to_infra" {
|
thanks for creating this - seeing the same for "IMPORTED PRIVILEGES" |
I am also seeing this for |
Hey @jacobcbeaudin @fernandoataoldotcom could you check if you still have those issues with the latest version of the provider using @GomathiMa I'm working on a resource only dedicated to granting ownership. Granting ownership is/will be only allowed through this resource. |
@sfc-gh-jcieslak thanks for getting back to me I'm attempting to migrate to the new resource, but the "IMPORTED PRIVELEGES" is behaving differently than the deprecated object. I'm getting this error when I attempt to use the same privilege string - for context, I was attempting to delete the old resources and replace them with the new ones. edit: some additional context on the new resource usage I can successfully deploy the privileges using the sample in the docs (https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_privileges_to_account_role). resource "snowflake_grant_privileges_to_account_role" "example" { |
Hey @fernandoataoldotcom resource "snowflake_role" "test" {
name = "some_acc_role"
}
resource "snowflake_grant_privileges_to_account_role" "example" {
account_role_name = snowflake_role.test.name
privileges = ["IMPORTED PRIVILEGES"]
on_account_object {
object_type = "DATABASE"
object_name = "SNOWFLAKE"
}
} On delete |
@sfc-gh-jcieslak - great, thanks. I'll take a look at the docs |
Adding another data point: we're seeing the same issue with |
Hey @adrian5991 Closing this issue (as it is about the deprecated grant resource). Please create another issue if you have any further issues with |
Snowflake Provider Version
0.71.0
Terraform Version
1.4.6
Describe the bug
I am encountering an issue with the Snowflake Terraform provider where the terraform plan continually proposes to grant the ALL PRIVILEGES privilege to a role, even after the plan has been successfully applied.
Steps to Reproduce:
Run terraform plan. The generated execution plan proposes to grant the ALL PRIVILEGES privilege to the role.
Run terraform apply. The plan is applied successfully, indicating that the ALL PRIVILEGES privilege has been granted to the role.
Run terraform plan again. The plan still proposes to grant the ALL PRIVILEGES privilege between same future plural schema objects / account objects to the role, as if the previous apply did not take effect.
Expected behavior
After running terraform apply, the subsequent terraform plan should not propose the same changes again.
Code samples and commands
Terraform doce to dynamically grant privileges to roles
I run terraform plan and it generates the following execution plan:
Further documented examples of this behavior:
The text was updated successfully, but these errors were encountered: