Skip to content
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

Confirm Schema provisioning sql commands #85

Open
2 tasks
Tracked by #15
JasonEb opened this issue May 11, 2023 · 3 comments
Open
2 tasks
Tracked by #15

Confirm Schema provisioning sql commands #85

JasonEb opened this issue May 11, 2023 · 3 comments
Labels
complexity: medium feature: RDS role: Dev Ops Engineer Engineer who maintains and deploys software size: 3pt Can be done in 13-18 hours

Comments

@JasonEb
Copy link
Contributor

JasonEb commented May 11, 2023

Dependency

Overview

For the People Depot database to be provisioned on to the Incubator rds, it'll need it's own schema to isolate it's data. We would like for People Depot developers to run and confirm the sql commands for provisioning a schema and database on a local instance.

SQL Commands
  -- Create new schema for new DB
  CREATE SCHEMA {new_db} AUTHORIZATION {db_owner};
  -- Set search_path for the new user
  ALTER ROLE {db_owner} SET search_path TO {new_db};

  -- Remove ability for all users to do everything in public schema
  REVOKE ALL ON SCHEMA public FROM public;
  -- Ensure users can list down objects in public schema
  GRANT USAGE ON SCHEMA public TO public;

Action Items

  • Test SQL Commands
  • Collect preferred schema name, and database username for People-Depot
    • NB: The intended environment is dev. So the schema name would be like people-depot-dev

Resources/Instructions

https://github.com/hackforla/incubator/blob/main/terraform-modules/multi-tenant-database/files/database.py#L41

@ExperimentsInHonesty
Copy link
Member

@drakeredwind01 Please ask DevOps if this is still relevant or required by incubator. Then talk to us at PD about it at our next meeting

@fyliu
Copy link
Member

fyliu commented Sep 20, 2024

Background: the goal of this issue was to figure out how database multi tenancy worked in the terragrunt setup. We wanted to be able to get new projects deployed ourselves (Ops) without having to bother Darren Pham for it.

If the current Terraform setup already does this or have an alternative solution for multi tenancy, then this issue is not needed.

@ale210
Copy link

ale210 commented Oct 31, 2024

This should be a terraform resource. No SQL commands necessary. Credentials should be scoped to this schema

@ale210 ale210 added feature: RDS size: 3pt Can be done in 13-18 hours role: Dev Ops Engineer Engineer who maintains and deploys software and removed size: 2pt Can be done in 7-12 hours role: missing ready for CoP Lead labels Oct 31, 2024
@ale210 ale210 moved this from New Issue Review to Ice Box in CoP: DevOps: Project Board Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: medium feature: RDS role: Dev Ops Engineer Engineer who maintains and deploys software size: 3pt Can be done in 13-18 hours
Projects
Development

No branches or pull requests

6 participants