You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.
I get the following error when try to create redshift grant for external schema:
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to redshift_grant.user, provider "provider[\"registry.terraform.io/brainly/redshift\"]" produced an unexpected new value: Root resource was present, but
│ now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Terraform plan seems like following:
# redshift_grant.service_accounts["id"] will be created
+ resource "redshift_grant" "service_accounts" {
+ id = (known after apply)
+ object_type = "schema"
+ privileges = [
+ "usage",
]
+ schema = "<schema_name>"
+ user = "<user_name>"
}
At the same time grant for regular schema apply works properly.
Also if I run following SQL query, grant applies without any error:
GRANT USAGE ON SCHEMA <external_schema_name> TO <user>;
The text was updated successfully, but these errors were encountered:
svdimchenko
changed the title
Add support for GRANT
redshift_grant fails on apply stage for external schemas
Jun 9, 2022
# module.redshift.module.redshift_config.redshift_grant.public_schema will be created
+ resource "redshift_grant" "public_schema" {
+ id = (known after apply)
+ object_type = "schema"
+ privileges = [
+ "create",
+ "usage",
]
+ schema = "public"
+ user = "my_redshift_user"
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
OpenTofu will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
module.redshift.module.redshift_config.redshift_grant.public_schema: Creating...
module.redshift.module.redshift_config.redshift_grant.public_schema: Still creating... [10s elapsed]
module.redshift.module.redshift_config.redshift_grant.public_schema: Still creating... [20s elapsed]
module.redshift.module.redshift_config.redshift_grant.public_schema: Still creating... [30s elapsed]
module.redshift.module.redshift_config.redshift_grant.public_schema: Still creating... [40s elapsed]
module.redshift.module.redshift_config.redshift_grant.public_schema: Still creating... [50s elapsed]
module.redshift.module.redshift_config.redshift_grant.public_schema: Still creating... [1m0s elapsed]
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.redshift.module.redshift_config.redshift_grant.public_schema, provider
│ "provider[\"registry.opentofu.org/brainly/redshift\"]" produced an unexpected new value: Root object was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
I am running OpenTofu v1.8.4 and Redshift's provider v1.1.0. Any help would be much appreciated
Welp, turns out that in my case, another engineer accidentally dropped the public schema. When setting TF_LOG to DEBUG I could see the failing query, and running it through QueryEditor I got the useful message "schema public does not exist` 🤦
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I get the following error when try to create redshift grant for external schema:
Terraform plan seems like following:
At the same time grant for regular schema apply works properly.
Also if I run following SQL query, grant applies without any error:
The text was updated successfully, but these errors were encountered: