-
Notifications
You must be signed in to change notification settings - Fork 10
Introduce a read-only user for data-replication #4551
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
base: next
Are you sure you want to change the base?
Conversation
287fe11
to
b07f54f
Compare
@@ -124,6 +124,10 @@ locals { | |||
{ | |||
name = "RAILS_MASTER_KEY" | |||
valueFrom = var.rails_master_key_path | |||
}, | |||
{ | |||
name = "RO_DB_PASSWORD" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = "RO_DB_PASSWORD" | |
name = "READ_ONLY_DB_PASSWORD" |
Is there any reason not to use the full name? It took me a while to work out what "ro" stood for reading this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ro
is standard abbreviation for denoting read-only in the dba world but I have expanded it here for clarity (readonly_user was changed to grafana_ro to reflect reader scope more accurately)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few other places where we've still got ro
(grafana_ro
, ro_db_password
, ro-db-password
for example). I think it be worth updating these too for consistency.
b07f54f
to
5610a96
Compare
- User must be created within aws account due to database living in private subnet - For simplicity just create user on startup of application if does not already exist - Password is managed via terraform and injected into container
5610a96
to
e50a8b4
Compare
|
@@ -36,7 +36,7 @@ resource "aws_rds_cluster" "cluster" { | |||
} | |||
|
|||
lifecycle { | |||
ignore_changes = [cluster_identifier] | |||
ignore_changes = [cluster_identifier, snapshot_identifier] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that really what we want? I would imagine the cluster should be recreated if the snapshot_identifier changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we have an option in the workflow to decide whether or not we actually want to recreate the database I would only want to trigger the recreation when that option is specified, otherwise we will recreate every deploy that is 12 hours apart regardless of this option.
Ticket: MAV-1941