feat: add AWS Secrets Manager Integration

This commit is contained in:
tomoya-kawaguchi
2025-05-29 12:42:05 +09:00
parent a17100e512
commit 1955157e9a
13 changed files with 608 additions and 3 deletions

View File

@ -5,6 +5,20 @@ from starlette_context.middleware import RawContextMiddleware
from pr_agent.servers.github_app import router
# Execute AWS Secrets Manager configuration override at module load time
# Initialize with same pattern as Google Cloud Storage provider
try:
from pr_agent.config_loader import apply_secrets_manager_config
apply_secrets_manager_config()
except Exception as e:
# Handle initialization failure silently (fallback to environment variables)
try:
from pr_agent.log import get_logger
get_logger().debug(f"AWS Secrets Manager initialization failed, falling back to environment variables: {e}")
except:
# Fail completely silently if log module is not available
pass
middleware = [Middleware(RawContextMiddleware)]
app = FastAPI(middleware=middleware)
app.include_router(router)