Skip to content

Commit

Permalink
fix: fix grant
Browse files Browse the repository at this point in the history
  • Loading branch information
jvmakine committed Nov 28, 2024
1 parent eaf0f51 commit c2de70b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/ftl-provisioner-cloudformation/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func PostgresPostUpdate(ctx context.Context, secrets *secretsmanager.Client, byN
return fmt.Errorf("failed to create database: %w", err)
}
}
if _, err := db.ExecContext(ctx, "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO ftluser;"); err != nil {
if _, err := db.ExecContext(ctx, "GRANT ALL ON SCHEMA public TO ftluser; GRANT ALL PRIVILEGES ON DATABASE "+resourceID+" TO ftluser;"); err != nil {
return fmt.Errorf("failed to grant FTL user privileges: %w", err)
}
}
Expand Down

0 comments on commit c2de70b

Please sign in to comment.