cfn-stack-updater/cfn_updater/config.py
Vijaya Manne 632ac9e328 Initial commit: One-Click CloudFormation Stack Updater
- Python CLI tool for rolling updates of CL-AppPipe-* and CL-SvcPipe-* stacks
- Async update engine with configurable concurrency (asyncio.Semaphore)
- Exponential backoff retry for API throttling
- Dry-run mode for safe preview
- IAM permission pre-validation
- Comprehensive test suite (80 tests: 11 property-based + 69 unit)
- Full spec documentation (requirements, design, tasks)
2026-05-29 14:56:59 -04:00

23 lines
948 B
Python

"""Configuration constants for the CloudFormation Stack Updater."""
# Mapping of stack name prefix → template URL.
# Each prefix uses a different nested template from the Centralized Logging solution.
STACK_PROFILES: dict[str, str] = {
"CL-AppPipe-": "https://s3.amazonaws.com/solutions-reference/centralized-logging-with-opensearch/latest/AppLogS3Buffer.template",
"CL-SvcPipe-": "https://s3.amazonaws.com/solutions-reference/centralized-logging-with-opensearch/latest/S3AccessLog.template",
}
# Kept for backward compatibility and single-prefix CLI usage
TEMPLATE_URL = STACK_PROFILES["CL-AppPipe-"]
DEFAULT_PREFIX = "CL-AppPipe-"
DEFAULT_CONCURRENCY = 5
MAX_RETRIES = 3
BASE_RETRY_DELAY = 1.0 # seconds
NON_UPDATABLE_STATUSES = frozenset({
"ROLLBACK_COMPLETE",
"ROLLBACK_IN_PROGRESS",
"UPDATE_ROLLBACK_IN_PROGRESS",
"UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS",
"DELETE_IN_PROGRESS",
"DELETE_COMPLETE",
})