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

chore(tf): create password for read-only SQL user #1665

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

AndrewKostka
Copy link
Contributor

Process for creating a new observer user:

echo $(kubectl get secret --namespace default sql-secrets-init-passwords -o jsonpath="{.data.SQL_INIT_OBSERVER}" | base64 --decode)
kubectl exec -it sql-mariadb-primary-0 -- /bin/bash -c 'mysql -u root -p${MARIADB_ROOT_PASSWORD}'
CREATE USER IF NOT EXISTS 'observer'@'%' IDENTIFIED BY 'TODO_PASSWORD_FROM_ECHO';
GRANT SELECT, SHOW VIEW ON apidb.* TO 'observer'@'%';
GRANT SELECT, SHOW VIEW ON `mwdb_%`.* TO 'observer'@'%';
GRANT SELECT, SHOW VIEW ON `mediawiki`.* TO 'observer'@'%';
FLUSH PRIVILEGES;

Copy link
Contributor

@tarrow tarrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine to me by eye; didn't do a tf plan; nice to see another module leaving this git managed state and us trying to follow the new adr

@AndrewKostka AndrewKostka merged commit 7ece9a4 into main Jul 8, 2024
3 checks passed
@AndrewKostka AndrewKostka deleted the read-only-sql-user branch July 8, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants