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

Create schema for queue data #231

Open
dadiorchen opened this issue Feb 15, 2024 · 2 comments
Open

Create schema for queue data #231

dadiorchen opened this issue Feb 15, 2024 · 2 comments
Assignees

Comments

@dadiorchen
Copy link
Contributor

dadiorchen commented Feb 15, 2024

Create schema for our queue, the name could be: queue
And also create corresponding user/role, for this schema, just as we do for other shcema and service,

resource "postgresql_role" "service_user" {
name = "s_${var.schema}"
login = true
password = random_password.s_password.result
search_path = [var.schema, "public"]
}
resource "postgresql_grant" "microservice-user-usage" {
database = var.database
role = "s_${var.schema}"
schema = var.schema
object_type = "schema"
privileges = ["USAGE"]
}
resource "postgresql_default_privileges" "microservice-user-default" {
database = var.database
role = "s_${var.schema}"
schema = var.schema
owner = "m_${var.schema}"
object_type = "table"
privileges = var.service_user_table_grants
}
resource "postgresql_default_privileges" "microservice-user-default-sequence" {
database = var.database
role = "s_${var.schema}"
schema = var.schema
owner = "m_${var.schema}"
object_type = "sequence"
privileges = ["USAGE", "SELECT"]
}

@dadiorchen dadiorchen converted this from a draft issue Feb 15, 2024
@dadiorchen dadiorchen self-assigned this Mar 31, 2024
@dadiorchen dadiorchen removed their assignment Apr 9, 2024
@partha04patel
Copy link
Contributor

I can work on this!

@partha04patel
Copy link
Contributor

done!

@dadiorchen dadiorchen moved this from 🌱 Backlog to 🐞 In Review in Denormalized Data Service May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🐞 In Review
Development

No branches or pull requests

2 participants