-
Notifications
You must be signed in to change notification settings - Fork 11
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
PostgresGrant does not revoke permissions during resource deletion #142
Comments
LInk to an old TF provider issue (seems it was not copied to the new tracked TF provider): |
Hi @jasminen - thank you for filing this! We'd love it if you filed an issue in the new upstream provider, and link it here. Then we'll follow up once they've released a fix. In the meantime, a suggestion - would you perhaps be able to leverage Pulumi's DependsOn resource option to delete the grants before the user? |
Hey @guineveresaenger, The issue is not a dependency issue - the Passing an empty
const disableTestUser = args.disableTestUser ?? false
const testUser = new PostgresUser(
'test-user',
{
name: 'test',
password: 'test-user',
login: true,
},
{ provider: dbProvider }
)
new PostgresGrant(
'test-usage-public-schema',
{
database: dbName,
schema: 'public',
role: testUser.name,
privileges: disableTestUser ? [] : ['USAGE'],
objectType: 'schema',
},
{ provider: dbProvider }
)
new PostgresGrant(
'test-select-tables-public-schema',
{
database: dbName,
schema: 'public',
role: testUser.name,
privileges: disableTestUser ? [] : ['SELECT'],
objectType: 'table',
},
{ provider: dbProvider }
) |
Opened in upstream provider, hope it'll get attention. |
Seems to be fixed in Postgres 11.x |
Hello!
Issue details
When PostgresGrant resource is deleted the permissions are not revoked.
Pulumi version:
^3.1.0
Posgresql provider version:
^3.0.0
Steps to reproduce
Expected: Stack is destroyed - User granted permissions are revoked, and user is deleted.
Actual: Permissions are not revoked (verified in DB), hence failing to delete the User.
The text was updated successfully, but these errors were encountered: