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
add optional profile parameter #17
Conversation
@@ -12,8 +12,8 @@ | |||
|
|||
|
|||
class SecretsManager: | |||
def __init__(self, secrets_file=None, secrets_file_default=None, region_name=None): | |||
session = boto3.session.Session() |
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.
Aside, but I had thought of moving the region parameter to the session instantiation but didn't want to change too much.
confidential/__init__.py
Outdated
@@ -1,4 +1,4 @@ | |||
from confidential.secrets_manager import SecretsManager | |||
|
|||
__all__ = ["SecretsManager"] | |||
__version__ = "1.0.0" | |||
__version__ = "1.1.0" |
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.
We initially were using this to store the version, but the version is now stored by Poetry in pyproject.toml
. So we move this, and you'll need to bump the version in pyproject.toml
.
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.
this is the wrong place to increment version
6d2b6a0
to
7e07220
Compare
What does this do?
Adds an optional parameter (
-p
,--profile
) to allow the user to pass in an alternative profile.Why did you do this?
The current configuration limits confidential to the default profile. For users with multiple profiles, they may wish to use confidential with something beyond the default profile.
How did you test this change?
Ran with a known working profile, with a known non-working profile, with a profile that doesn't exist, and lastly, with no profile specified at all.
etc
I had thought of catching the exception raised when a profile is specified but could not be found (
botocore.exceptions.ProfileNotFound
) but found the error message to be descriptive enough on its own.ex: