-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adjust admin-login module to handle replica #6
Open
minaslater
wants to merge
7
commits into
main
Choose a base branch
from
ms-update-with-replica
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jferris
reviewed
Nov 10, 2022
jferris
reviewed
Nov 10, 2022
minaslater
force-pushed
the
ms-update-with-replica
branch
from
November 10, 2022 18:40
b2a0351
to
3ebd728
Compare
jferris
reviewed
Nov 10, 2022
minaslater
force-pushed
the
ms-update-with-replica
branch
2 times, most recently
from
November 10, 2022 18:57
0d2ff99
to
8305127
Compare
jferris
approved these changes
Nov 10, 2022
minaslater
force-pushed
the
ms-update-with-replica
branch
from
November 10, 2022 19:35
8305127
to
4934f65
Compare
Saves the replica database url to the same secrets so its value can be exposed as env variable when needed.
minaslater
force-pushed
the
ms-update-with-replica
branch
from
November 10, 2022 19:37
4934f65
to
77f560c
Compare
The only thing we need to know about the replica is the hostname/address. Doing this will eliminate the need to read from the instance.
The initial_values for the postgres login secrets doesn't seem to be tracked as changes, so when the replica database host name is changes, terraform doesn't recognize anything has changed. Olamide suggested changing this module to pass replica host as an env var to the python lambda rotation script to correct this.
minaslater
commented
Nov 14, 2022
# username = var.username | ||
# } | ||
|
||
# initial_secret_value = can(var.replica_host) ? merge(local.base_value, { replica_host = var.replica_host }) : local.base_value |
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.
Removed so that we're passing the replica DB host address in only one way; as an environment variable rather than also as part of the secrets.
minaslater
commented
Nov 14, 2022
if replica: | ||
host = secret['host'] | ||
else: | ||
host = REPLICA_HOST |
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.
Review dict_to_url function when replica is set
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Saves the replica database url to the same secrets so its value can be exposed as env variable when needed.