You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
support endpoint_url in AWSSecretsManagerSettingsSource
During testing and development phases, I use a `motoserver` docker container to interact with my AWS resources of my application locally.
I was able to connect with `motoserver` by using the following code:
```python
@classmethod
def settings_customise_sources(
cls,
settings_cls: type[BaseSettings],
init_settings: PydanticBaseSettingsSource,
env_settings: PydanticBaseSettingsSource,
dotenv_settings: PydanticBaseSettingsSource,
file_secret_settings: PydanticBaseSettingsSource,
) -> tuple[PydanticBaseSettingsSource, ...]:
aws_secrets_manager_settings = AWSSecretsManagerSettingsSource(
settings_cls,
secret_id=os.getenv('APP_SECRETS_MANAGER_SECRET'),
region_name=os.getenv('AWS_DEFAULT_REGION'),
endpoint_url=os.getenv('AWS_SECRETS_MANAGER_ENDPOINT'),
env_prefix='',
env_nested_delimiter='__',
case_sensitive=True,
)
return (
init_settings,
env_settings,
dotenv_settings,
file_secret_settings,
aws_secrets_manager_settings,
)
```
My proposal keeps the original behavior in the `AWSSecretsManagerSettingsSource` class and add a more complete configuration to interact with the AWS Secrets Manager provider.
0 commit comments