cdk-factory 0.18.16__tar.gz → 0.19.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cdk-factory might be problematic. Click here for more details.
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/PKG-INFO +1 -1
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/pyproject.toml +1 -1
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/auto_scaling.py +5 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/acm/acm_stack.py +5 -15
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py +74 -6
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/code_artifact/code_artifact_stack.py +3 -25
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/ecs/ecs_service_stack.py +12 -25
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/lambda_edge/lambda_edge_stack.py +0 -23
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/load_balancer/load_balancer_stack.py +43 -93
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/rds/rds_stack.py +1 -25
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/route53/route53_stack.py +1 -34
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/security_group/security_group_full_stack.py +1 -31
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/security_group/security_group_stack.py +1 -8
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/simple_queue_service/sqs_stack.py +1 -34
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/vpc/vpc_stack.py +2 -109
- cdk_factory-0.19.0/src/cdk_factory/version.py +1 -0
- cdk_factory-0.18.16/src/cdk_factory/version.py +0 -1
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/.gitignore +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/.windsurfrules +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/LICENSE +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/README.md +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/REFACTORING_PLAN.md +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/archive/README.md +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/archive/migrate_to_enhanced_ssm.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/examples/json-imports/README.md +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/examples/separate-api-gateway/README.md +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/examples/separate-api-gateway/api-gateway-stack.json +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/examples/separate-api-gateway/config.json +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/examples/separate-api-gateway/lambda-stack.json +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/mypy.ini +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/publish_to_pypi.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/publish_to_pypi.sh +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/pysetup.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/pysetup.sh +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/requirements.dev.txt +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/requirements.tests.txt +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/requirements.txt +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/run-checks.sh +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/run-tests-clean-venv.sh +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/run-tests.sh +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/scripts/cloudfront-cleanup.sh +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/app.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/builds/README.md +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/cdk.json +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/cli.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/commands/command_loader.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/base_config.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/cdk_config.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/deployment.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/deployment_wave.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/devops.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/enhanced_base_config.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/enhanced_ssm_config.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/management.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/pipeline.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/pipeline_stage.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/_resources.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/acm.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/api_gateway.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/apigateway_route_config.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/cloudfront.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/cloudwatch_widget.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/code_artifact.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/code_artifact_login.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/code_repository.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/cognito.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/docker.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/dynamodb.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/ecr.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/ecs_cluster.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/ecs_service.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/exisiting.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/lambda_edge.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/lambda_function.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/lambda_layers.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/lambda_triggers.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/load_balancer.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/monitoring.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/rds.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/resource_mapping.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/resource_naming.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/resource_types.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/route53.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/route53_hosted_zone.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/rum.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/s3.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/security_group.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/security_group_full_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/sqs.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/vpc.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/workload.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/constructs/cloudfront/cloudfront_distribution_construct.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/constructs/ecr/ecr_construct.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/constructs/lambdas/lambda_function_construct.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/constructs/lambdas/lambda_function_docker_construct.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/constructs/lambdas/lambda_function_role_construct.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/constructs/lambdas/policies/policy_docs.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/constructs/lambdas/policies/policy_statements.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/constructs/s3_buckets/s3_bucket_construct.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/constructs/s3_buckets/s3_bucket_replication_destination_construct.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/constructs/s3_buckets/s3_bucket_replication_source_construct.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/constructs/sqs/policies/sqs_policies.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/interfaces/istack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/interfaces/live_ssm_resolver.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/interfaces/networked_stack_mixin.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/interfaces/standardized_ssm_mixin.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/interfaces/vpc_provider_mixin.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/lambdas/edge/ip_gate/handler.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/lambdas/health_handler.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/pipeline/path_utils.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/pipeline/pipeline_factory.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/pipeline/security/policies.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/pipeline/security/roles.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/pipeline/stage.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack/istack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack/stack_factory.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack/stack_module_loader.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack/stack_module_registry.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack/stack_modules.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/acm/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/api_gateway/api_gateway_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/auto_scaling/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/aws_lambdas/lambda_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/buckets/README.md +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/buckets/bucket_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/cloudfront/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/cloudfront/cloudfront_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/cognito/cognito_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/dynamodb/dynamodb_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/ecr/README.md +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/ecr/ecr_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/ecs/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/ecs/ecs_cluster_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/lambda_edge/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/load_balancer/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/monitoring/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/monitoring/monitoring_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/rds/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/route53/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/rum/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/rum/rum_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/security_group/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/stack_base.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/vpc/__init__.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/websites/static_website_stack.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stages/websites/static_website_stage.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/templates/README.md +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/templates/app.py.template +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/templates/cdk.json.template +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/utilities/api_gateway_integration_utility.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/utilities/commandline_args.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/utilities/configuration_loader.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/utilities/docker_utilities.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/utilities/environment_services.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/utilities/file_operations.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/utilities/git_utilities.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/utilities/json_loading_utility.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/utilities/lambda_function_utilities.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/utilities/os_execute.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/utils/api_gateway_utilities.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/validation/config_validator.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/workload/workload_factory.py +0 -0
- {cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/handlers/test/handler.py +0 -0
{cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/configurations/resources/auto_scaling.py
RENAMED
|
@@ -74,6 +74,11 @@ class AutoScalingConfig(EnhancedBaseConfig):
|
|
|
74
74
|
"""Update policy configuration"""
|
|
75
75
|
return self.__config.get("update_policy")
|
|
76
76
|
|
|
77
|
+
@property
|
|
78
|
+
def instance_refresh(self) -> Optional[Dict[str, Any]]:
|
|
79
|
+
"""Instance refresh configuration for rolling updates"""
|
|
80
|
+
return self.__config.get("instance_refresh")
|
|
81
|
+
|
|
77
82
|
@property
|
|
78
83
|
def user_data_commands(self) -> List[str]:
|
|
79
84
|
"""User data commands to run on instance launch"""
|
|
@@ -25,6 +25,7 @@ logger = Logger(service="AcmStack")
|
|
|
25
25
|
|
|
26
26
|
@register_stack("acm_stack")
|
|
27
27
|
@register_stack("certificate_stack")
|
|
28
|
+
@register_stack("certificate_library_module")
|
|
28
29
|
class AcmStack(IStack, StandardizedSsmMixin):
|
|
29
30
|
"""
|
|
30
31
|
Reusable stack for AWS Certificate Manager.
|
|
@@ -152,18 +153,7 @@ class AcmStack(IStack, StandardizedSsmMixin):
|
|
|
152
153
|
|
|
153
154
|
def _add_outputs(self, cert_name: str) -> None:
|
|
154
155
|
"""Add CloudFormation outputs"""
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
description=f"Certificate ARN for {self.acm_config.domain_name}",
|
|
160
|
-
export_name=f"{cert_name}-arn",
|
|
161
|
-
)
|
|
162
|
-
|
|
163
|
-
cdk.CfnOutput(
|
|
164
|
-
self,
|
|
165
|
-
"DomainName",
|
|
166
|
-
value=self.acm_config.domain_name,
|
|
167
|
-
description="Primary domain name for the certificate",
|
|
168
|
-
export_name=f"{cert_name}-domain",
|
|
169
|
-
)
|
|
156
|
+
|
|
157
|
+
return
|
|
158
|
+
|
|
159
|
+
|
|
@@ -13,7 +13,7 @@ from aws_cdk import aws_cloudwatch as cloudwatch
|
|
|
13
13
|
from aws_cdk import aws_iam as iam
|
|
14
14
|
from aws_cdk import aws_ssm as ssm
|
|
15
15
|
from aws_cdk import aws_ecs as ecs
|
|
16
|
-
from aws_cdk import Duration, Stack
|
|
16
|
+
from aws_cdk import Duration, Stack, CfnUpdatePolicy
|
|
17
17
|
from aws_lambda_powertools import Logger
|
|
18
18
|
from constructs import Construct
|
|
19
19
|
|
|
@@ -241,11 +241,12 @@ class AutoScalingStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
241
241
|
user_data = ec2.UserData.for_linux()
|
|
242
242
|
|
|
243
243
|
# Add basic setup commands
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
244
|
+
# this will break amazon linux 2023 which uses dnf instead of yum
|
|
245
|
+
# user_data.add_commands(
|
|
246
|
+
# "#!/bin/bash",
|
|
247
|
+
# "yum update -y",
|
|
248
|
+
# "yum install -y aws-cfn-bootstrap",
|
|
249
|
+
# )
|
|
249
250
|
|
|
250
251
|
# Add user data commands from configuration
|
|
251
252
|
if self.asg_config.user_data_commands:
|
|
@@ -423,6 +424,10 @@ class AutoScalingStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
423
424
|
],
|
|
424
425
|
)
|
|
425
426
|
|
|
427
|
+
# Add instance refresh if configured
|
|
428
|
+
if self.asg_config.instance_refresh:
|
|
429
|
+
self._configure_instance_refresh(auto_scaling_group)
|
|
430
|
+
|
|
426
431
|
# Attach target groups if configured
|
|
427
432
|
self._attach_target_groups(auto_scaling_group)
|
|
428
433
|
|
|
@@ -528,6 +533,69 @@ class AutoScalingStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
528
533
|
|
|
529
534
|
logger.info(f"Exported SSM parameters: {exported_params}")
|
|
530
535
|
|
|
536
|
+
def _configure_instance_refresh(self, asg: autoscaling.AutoScalingGroup) -> None:
|
|
537
|
+
"""Configure instance refresh for rolling updates"""
|
|
538
|
+
instance_refresh_config = self.asg_config.instance_refresh
|
|
539
|
+
|
|
540
|
+
if not instance_refresh_config.get("enabled", False):
|
|
541
|
+
return
|
|
542
|
+
|
|
543
|
+
logger.warning("Instance refresh is not supported in this version of the CDK")
|
|
544
|
+
return
|
|
545
|
+
|
|
546
|
+
# Get the CloudFormation ASG resource
|
|
547
|
+
cfn_asg = asg.node.default_child
|
|
548
|
+
|
|
549
|
+
# Configure instance refresh using CloudFormation UpdatePolicy
|
|
550
|
+
# UpdatePolicy is added at the resource level, not as a property
|
|
551
|
+
update_policy = {
|
|
552
|
+
"AutoScalingRollingUpdate": {
|
|
553
|
+
"PauseTime": "PT300S", # 5 minutes pause
|
|
554
|
+
"MinInstancesInService": "1",
|
|
555
|
+
"MaxBatchSize": "1",
|
|
556
|
+
"WaitOnResourceSignals": True,
|
|
557
|
+
"SuspendProcesses": [
|
|
558
|
+
"HealthCheck",
|
|
559
|
+
"ReplaceUnhealthy",
|
|
560
|
+
"AZRebalance",
|
|
561
|
+
"AlarmNotification",
|
|
562
|
+
"ScheduledActions"
|
|
563
|
+
]
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
# # Apply instance refresh using CloudFormation's cfn_options.update_policy
|
|
568
|
+
# cfn_asg.cfn_options.update_policy = cdk.CfnUpdatePolicy.from_rolling_update(
|
|
569
|
+
# pause_time=cdk.Duration.seconds(300),
|
|
570
|
+
# min_instances_in_service=1,
|
|
571
|
+
# max_batch_size=1,
|
|
572
|
+
# wait_on_resource_signals=True
|
|
573
|
+
# )
|
|
574
|
+
|
|
575
|
+
# Grab the L1 to attach UpdatePolicy.InstanceRefresh
|
|
576
|
+
cfn_asg: autoscaling.CfnAutoScalingGroup = asg.node.default_child
|
|
577
|
+
|
|
578
|
+
# cfn_asg.cfn_options.update_policy = CfnUpdatePolicy.from_auto_scaling_instance_refresh(
|
|
579
|
+
# # Triggers tell CFN *what* changes should start a refresh
|
|
580
|
+
# triggers=[CfnUpdatePolicy.InstanceRefreshTrigger.LAUNCH_TEMPLATE],
|
|
581
|
+
# preferences=CfnUpdatePolicy.InstanceRefreshPreferences(
|
|
582
|
+
# # warmup is like “grace” before counting a new instance healthy
|
|
583
|
+
# instance_warmup=Duration.minutes(5),
|
|
584
|
+
# # how aggressive the refresh is; 90 keeps capacity high
|
|
585
|
+
# min_healthy_percentage=90,
|
|
586
|
+
# # skip instances that already match the new LT (fast when only userdata/env tweaked)
|
|
587
|
+
# skip_matching=True,
|
|
588
|
+
# # optional: put instances in Standby first; default is rolling terminate/launch
|
|
589
|
+
# # standby_instances=CfnUpdatePolicy.StandbyInstances.TERMINATE,
|
|
590
|
+
# # checkpoint_percentages=[25, 50, 75], # optional: progressive checkpoints
|
|
591
|
+
# # checkpoint_delay=Duration.minutes(2), # optional delay at checkpoints
|
|
592
|
+
# ),
|
|
593
|
+
# )
|
|
594
|
+
logger.info(f"Configured instance refresh via CDK CfnUpdatePolicy")
|
|
595
|
+
|
|
596
|
+
# Note: This provides rolling update functionality similar to instance refresh
|
|
597
|
+
# For true instance refresh with preferences, we would need CDK v2.80+ or custom CloudFormation
|
|
598
|
+
|
|
531
599
|
|
|
532
600
|
# Backward compatibility alias
|
|
533
601
|
AutoScalingStackStandardized = AutoScalingStack
|
|
@@ -140,32 +140,10 @@ class CodeArtifactStack(IStack, StandardizedSsmMixin):
|
|
|
140
140
|
|
|
141
141
|
def _add_outputs(self) -> None:
|
|
142
142
|
"""Add CloudFormation outputs for the CodeArtifact resources"""
|
|
143
|
+
|
|
144
|
+
|
|
143
145
|
# Domain outputs
|
|
144
146
|
if self.domain:
|
|
145
147
|
domain_name = self.code_artifact_config.domain_name
|
|
146
148
|
|
|
147
|
-
|
|
148
|
-
cdk.CfnOutput(
|
|
149
|
-
self,
|
|
150
|
-
f"{domain_name}-domain-arn",
|
|
151
|
-
value=self.domain.attr_arn,
|
|
152
|
-
export_name=f"{self.deployment.build_resource_name(domain_name)}-domain-arn"
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
# Domain URL
|
|
156
|
-
cdk.CfnOutput(
|
|
157
|
-
self,
|
|
158
|
-
f"{domain_name}-domain-url",
|
|
159
|
-
value=f"https://{self.code_artifact_config.account}.d.codeartifact.{self.code_artifact_config.region}.amazonaws.com/",
|
|
160
|
-
export_name=f"{self.deployment.build_resource_name(domain_name)}-domain-url"
|
|
161
|
-
)
|
|
162
|
-
|
|
163
|
-
# Repository outputs
|
|
164
|
-
for repo_name, repo in self.repositories.items():
|
|
165
|
-
# Repository ARN
|
|
166
|
-
cdk.CfnOutput(
|
|
167
|
-
self,
|
|
168
|
-
f"{repo_name}-repo-arn",
|
|
169
|
-
value=repo.attr_arn,
|
|
170
|
-
export_name=f"{self.deployment.build_resource_name(repo_name)}-repo-arn"
|
|
171
|
-
)
|
|
149
|
+
|
{cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/ecs/ecs_service_stack.py
RENAMED
|
@@ -101,6 +101,7 @@ class EcsServiceStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
101
101
|
|
|
102
102
|
# Add outputs
|
|
103
103
|
self._add_outputs(service_name)
|
|
104
|
+
self._export_to_ssm(service_name)
|
|
104
105
|
|
|
105
106
|
def _load_vpc(self) -> None:
|
|
106
107
|
"""Load VPC using the centralized VPC provider mixin."""
|
|
@@ -540,6 +541,14 @@ class EcsServiceStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
540
541
|
"""Attach service to load balancer target groups"""
|
|
541
542
|
target_group_arns = self.ecs_config.target_group_arns
|
|
542
543
|
|
|
544
|
+
if target_group_arns:
|
|
545
|
+
tmp = []
|
|
546
|
+
for tg_arn in target_group_arns:
|
|
547
|
+
import hashlib
|
|
548
|
+
unique_id = hashlib.md5(tg_arn.encode()).hexdigest()
|
|
549
|
+
tmp.append(self.resolve_ssm_value(self, tg_arn, unique_id))
|
|
550
|
+
target_group_arns = tmp
|
|
551
|
+
|
|
543
552
|
if not target_group_arns:
|
|
544
553
|
# Try to load from SSM if configured
|
|
545
554
|
target_group_arns = self._load_target_groups_from_ssm()
|
|
@@ -595,35 +604,13 @@ class EcsServiceStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
595
604
|
scale_out_cooldown=cdk.Duration.seconds(60),
|
|
596
605
|
)
|
|
597
606
|
|
|
607
|
+
|
|
608
|
+
|
|
598
609
|
def _add_outputs(self, service_name: str) -> None:
|
|
599
610
|
"""Add CloudFormation outputs"""
|
|
611
|
+
return
|
|
600
612
|
|
|
601
|
-
# Service name output
|
|
602
|
-
cdk.CfnOutput(
|
|
603
|
-
self,
|
|
604
|
-
"ServiceName",
|
|
605
|
-
value=self.service.service_name,
|
|
606
|
-
description=f"ECS Service Name: {service_name}",
|
|
607
|
-
)
|
|
608
613
|
|
|
609
|
-
# Service ARN output
|
|
610
|
-
cdk.CfnOutput(
|
|
611
|
-
self,
|
|
612
|
-
"ServiceArn",
|
|
613
|
-
value=self.service.service_arn,
|
|
614
|
-
description=f"ECS Service ARN: {service_name}",
|
|
615
|
-
)
|
|
616
|
-
|
|
617
|
-
# Cluster name output
|
|
618
|
-
cdk.CfnOutput(
|
|
619
|
-
self,
|
|
620
|
-
"ClusterName",
|
|
621
|
-
value=self.cluster.cluster_name,
|
|
622
|
-
description=f"ECS Cluster Name for {service_name}",
|
|
623
|
-
)
|
|
624
|
-
|
|
625
|
-
# Export to SSM if configured
|
|
626
|
-
self._export_to_ssm(service_name)
|
|
627
614
|
|
|
628
615
|
def _export_to_ssm(self, service_name: str) -> None:
|
|
629
616
|
"""Export resource ARNs and names to SSM Parameter Store"""
|
|
@@ -303,30 +303,7 @@ class LambdaEdgeStack(IStack, StandardizedSsmMixin):
|
|
|
303
303
|
def _add_outputs(self, function_name: str) -> None:
|
|
304
304
|
"""Add CloudFormation outputs and SSM exports"""
|
|
305
305
|
|
|
306
|
-
# CloudFormation outputs
|
|
307
|
-
cdk.CfnOutput(
|
|
308
|
-
self,
|
|
309
|
-
"FunctionName",
|
|
310
|
-
value=self.function.function_name,
|
|
311
|
-
description="Lambda function name",
|
|
312
|
-
export_name=f"{function_name}-name"
|
|
313
|
-
)
|
|
314
306
|
|
|
315
|
-
cdk.CfnOutput(
|
|
316
|
-
self,
|
|
317
|
-
"FunctionArn",
|
|
318
|
-
value=self.function.function_arn,
|
|
319
|
-
description="Lambda function ARN (unversioned)",
|
|
320
|
-
export_name=f"{function_name}-arn"
|
|
321
|
-
)
|
|
322
|
-
|
|
323
|
-
cdk.CfnOutput(
|
|
324
|
-
self,
|
|
325
|
-
"FunctionVersionArn",
|
|
326
|
-
value=self.function_version.function_arn,
|
|
327
|
-
description="Lambda function version ARN (use this for Lambda@Edge)",
|
|
328
|
-
export_name=f"{function_name}-version-arn"
|
|
329
|
-
)
|
|
330
307
|
|
|
331
308
|
# SSM Parameter Store exports (if configured)
|
|
332
309
|
ssm_exports = self.edge_config.dictionary.get("ssm", {}).get("exports", {})
|
|
@@ -456,44 +456,42 @@ class LoadBalancerStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
456
456
|
# Configure conditions
|
|
457
457
|
conditions = []
|
|
458
458
|
|
|
459
|
-
#
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
http_headers = rule_config.get("http_headers", {})
|
|
471
|
-
for header_name, header_values in http_headers.items():
|
|
472
|
-
conditions.append(
|
|
473
|
-
elbv2.ListenerCondition.http_header(header_name, header_values)
|
|
474
|
-
)
|
|
475
|
-
|
|
476
|
-
# Query strings
|
|
477
|
-
query_strings = rule_config.get("query_strings", [])
|
|
478
|
-
if query_strings:
|
|
479
|
-
query_string_conditions = []
|
|
480
|
-
for qs in query_strings:
|
|
481
|
-
query_string_conditions.append(
|
|
482
|
-
elbv2.QueryStringCondition(
|
|
483
|
-
key=qs.get("key"), value=qs.get("value")
|
|
459
|
+
# Parse AWS ALB conditions format
|
|
460
|
+
aws_conditions = rule_config.get("conditions", [])
|
|
461
|
+
for condition in aws_conditions:
|
|
462
|
+
field = condition.get("field")
|
|
463
|
+
if field == "http-header" and "http_header_config" in condition:
|
|
464
|
+
header_config = condition["http_header_config"]
|
|
465
|
+
header_name = header_config.get("header_name")
|
|
466
|
+
header_values = header_config.get("values", [])
|
|
467
|
+
if header_name and header_values:
|
|
468
|
+
conditions.append(
|
|
469
|
+
elbv2.ListenerCondition.http_header(header_name, header_values)
|
|
484
470
|
)
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
471
|
+
elif field == "path-pattern" and "values" in condition:
|
|
472
|
+
path_patterns = condition.get("values", [])
|
|
473
|
+
if path_patterns:
|
|
474
|
+
conditions.append(elbv2.ListenerCondition.path_patterns(path_patterns))
|
|
475
|
+
elif field == "host-header" and "values" in condition:
|
|
476
|
+
host_headers = condition.get("values", [])
|
|
477
|
+
if host_headers:
|
|
478
|
+
conditions.append(elbv2.ListenerCondition.host_headers(host_headers))
|
|
489
479
|
|
|
490
480
|
# Configure actions
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
)
|
|
481
|
+
target_group = None
|
|
482
|
+
|
|
483
|
+
# Parse AWS ALB actions format
|
|
484
|
+
aws_actions = rule_config.get("actions", [])
|
|
485
|
+
for action in aws_actions:
|
|
486
|
+
if action.get("type") == "forward":
|
|
487
|
+
target_group_name = action.get("target_group")
|
|
488
|
+
target_group = (
|
|
489
|
+
self.target_groups.get(target_group_name) if target_group_name else None
|
|
490
|
+
)
|
|
491
|
+
break # Use first forward action
|
|
495
492
|
|
|
496
|
-
|
|
493
|
+
# Validate that we have both conditions and target group before creating rule
|
|
494
|
+
if target_group and conditions:
|
|
497
495
|
# Create rule with forward action
|
|
498
496
|
elbv2.ApplicationListenerRule(
|
|
499
497
|
self,
|
|
@@ -503,6 +501,15 @@ class LoadBalancerStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
503
501
|
conditions=conditions,
|
|
504
502
|
target_groups=[target_group],
|
|
505
503
|
)
|
|
504
|
+
elif not conditions:
|
|
505
|
+
logger.warning(
|
|
506
|
+
f"Skipping listener rule '{rule_id}' - no conditions defined. "
|
|
507
|
+
f"CDK requires at least one condition for every rule."
|
|
508
|
+
)
|
|
509
|
+
elif not target_group:
|
|
510
|
+
logger.warning(
|
|
511
|
+
f"Skipping listener rule '{rule_id}' - no valid target group found."
|
|
512
|
+
)
|
|
506
513
|
|
|
507
514
|
def _add_ip_whitelist_rules(
|
|
508
515
|
self,
|
|
@@ -649,36 +656,7 @@ class LoadBalancerStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
649
656
|
|
|
650
657
|
def _export_cfn_outputs(self, lb_name: str) -> None:
|
|
651
658
|
"""Add CloudFormation outputs for the Load Balancer"""
|
|
652
|
-
|
|
653
|
-
# Load Balancer DNS Name
|
|
654
|
-
cdk.CfnOutput(
|
|
655
|
-
self,
|
|
656
|
-
f"{lb_name}-dns-name",
|
|
657
|
-
value=self.load_balancer.load_balancer_dns_name,
|
|
658
|
-
export_name=f"{self.deployment.build_resource_name(lb_name)}-dns-name",
|
|
659
|
-
)
|
|
660
|
-
|
|
661
|
-
# Load Balancer ARN
|
|
662
|
-
cdk.CfnOutput(
|
|
663
|
-
self,
|
|
664
|
-
f"{lb_name}-arn",
|
|
665
|
-
value=self.load_balancer.load_balancer_arn,
|
|
666
|
-
export_name=f"{self.deployment.build_resource_name(lb_name)}-arn",
|
|
667
|
-
)
|
|
668
|
-
|
|
669
|
-
# Target Group ARNs
|
|
670
|
-
for tg_name, target_group in self.target_groups.items():
|
|
671
|
-
# Normalize target group name for consistent CloudFormation export naming
|
|
672
|
-
normalized_tg_name = self.normalize_resource_name(
|
|
673
|
-
tg_name, for_export=True
|
|
674
|
-
)
|
|
675
|
-
cdk.CfnOutput(
|
|
676
|
-
self,
|
|
677
|
-
f"{lb_name}-{normalized_tg_name}-arn",
|
|
678
|
-
value=target_group.target_group_arn,
|
|
679
|
-
export_name=f"{self.deployment.build_resource_name(lb_name)}-{normalized_tg_name}-arn",
|
|
680
|
-
)
|
|
681
|
-
|
|
659
|
+
return
|
|
682
660
|
def _export_ssm_parameters(self, lb_name: str) -> None:
|
|
683
661
|
"""Export Load Balancer resources to SSM Parameter Store if configured"""
|
|
684
662
|
if not self.load_balancer:
|
|
@@ -709,32 +687,4 @@ class LoadBalancerStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
709
687
|
|
|
710
688
|
def _export_cfn_outputs(self, lb_name: str) -> None:
|
|
711
689
|
"""Add CloudFormation outputs for the Load Balancer"""
|
|
712
|
-
|
|
713
|
-
# Load Balancer DNS Name
|
|
714
|
-
cdk.CfnOutput(
|
|
715
|
-
self,
|
|
716
|
-
f"{lb_name}-dns-name",
|
|
717
|
-
value=self.load_balancer.load_balancer_dns_name,
|
|
718
|
-
export_name=f"{self.deployment.build_resource_name(lb_name)}-dns-name",
|
|
719
|
-
)
|
|
720
|
-
|
|
721
|
-
# Load Balancer ARN
|
|
722
|
-
cdk.CfnOutput(
|
|
723
|
-
self,
|
|
724
|
-
f"{lb_name}-arn",
|
|
725
|
-
value=self.load_balancer.load_balancer_arn,
|
|
726
|
-
export_name=f"{self.deployment.build_resource_name(lb_name)}-arn",
|
|
727
|
-
)
|
|
728
|
-
|
|
729
|
-
# Target Group ARNs
|
|
730
|
-
for tg_name, target_group in self.target_groups.items():
|
|
731
|
-
# Normalize target group name for consistent CloudFormation export naming
|
|
732
|
-
normalized_tg_name = self.normalize_resource_name(
|
|
733
|
-
tg_name, for_export=True
|
|
734
|
-
)
|
|
735
|
-
cdk.CfnOutput(
|
|
736
|
-
self,
|
|
737
|
-
f"{lb_name}-{normalized_tg_name}-arn",
|
|
738
|
-
value=target_group.target_group_arn,
|
|
739
|
-
export_name=f"{self.deployment.build_resource_name(lb_name)}-{normalized_tg_name}-arn",
|
|
740
|
-
)
|
|
690
|
+
return
|
|
@@ -285,31 +285,7 @@ class RdsStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
285
285
|
|
|
286
286
|
def _add_outputs(self, db_name: str) -> None:
|
|
287
287
|
"""Add CloudFormation outputs for the RDS instance"""
|
|
288
|
-
|
|
289
|
-
# Database endpoint
|
|
290
|
-
cdk.CfnOutput(
|
|
291
|
-
self,
|
|
292
|
-
f"{db_name}-endpoint",
|
|
293
|
-
value=self.db_instance.db_instance_endpoint_address,
|
|
294
|
-
export_name=f"{self.deployment.build_resource_name(db_name)}-endpoint",
|
|
295
|
-
)
|
|
296
|
-
|
|
297
|
-
# Database port
|
|
298
|
-
cdk.CfnOutput(
|
|
299
|
-
self,
|
|
300
|
-
f"{db_name}-port",
|
|
301
|
-
value=self.db_instance.db_instance_endpoint_port,
|
|
302
|
-
export_name=f"{self.deployment.build_resource_name(db_name)}-port",
|
|
303
|
-
)
|
|
304
|
-
|
|
305
|
-
# Secret ARN (if available)
|
|
306
|
-
if hasattr(self.db_instance, "secret") and self.db_instance.secret:
|
|
307
|
-
cdk.CfnOutput(
|
|
308
|
-
self,
|
|
309
|
-
f"{db_name}-secret-arn",
|
|
310
|
-
value=self.db_instance.secret.secret_arn,
|
|
311
|
-
export_name=f"{self.deployment.build_resource_name(db_name)}-secret-arn",
|
|
312
|
-
)
|
|
288
|
+
return
|
|
313
289
|
|
|
314
290
|
def _export_ssm_parameters(self, db_name: str) -> None:
|
|
315
291
|
"""Export RDS connection info and credentials to SSM Parameter Store"""
|
{cdk_factory-0.18.16 → cdk_factory-0.19.0}/src/cdk_factory/stack_library/route53/route53_stack.py
RENAMED
|
@@ -413,37 +413,4 @@ class Route53Stack(IStack, StandardizedSsmMixin):
|
|
|
413
413
|
def _add_outputs(self) -> None:
|
|
414
414
|
"""Add CloudFormation outputs for the Route53 resources"""
|
|
415
415
|
# Hosted Zone ID
|
|
416
|
-
|
|
417
|
-
cdk.CfnOutput(
|
|
418
|
-
self,
|
|
419
|
-
"HostedZoneId",
|
|
420
|
-
value=self.hosted_zone.hosted_zone_id,
|
|
421
|
-
export_name=f"{self.deployment.build_resource_name('hosted-zone')}-id"
|
|
422
|
-
)
|
|
423
|
-
|
|
424
|
-
# Hosted Zone Name Servers
|
|
425
|
-
if hasattr(self.hosted_zone, "name_servers") and self.hosted_zone.name_servers:
|
|
426
|
-
cdk.CfnOutput(
|
|
427
|
-
self,
|
|
428
|
-
"NameServers",
|
|
429
|
-
value=",".join(self.hosted_zone.name_servers),
|
|
430
|
-
export_name=f"{self.deployment.build_resource_name('hosted-zone')}-name-servers"
|
|
431
|
-
)
|
|
432
|
-
|
|
433
|
-
# Certificate ARN
|
|
434
|
-
if self.certificate:
|
|
435
|
-
cdk.CfnOutput(
|
|
436
|
-
self,
|
|
437
|
-
"CertificateArn",
|
|
438
|
-
value=self.certificate.certificate_arn,
|
|
439
|
-
export_name=f"{self.deployment.build_resource_name('certificate')}-arn"
|
|
440
|
-
)
|
|
441
|
-
|
|
442
|
-
# Record names
|
|
443
|
-
for name, record in self.records.items():
|
|
444
|
-
cdk.CfnOutput(
|
|
445
|
-
self,
|
|
446
|
-
f"Record-{name}",
|
|
447
|
-
value=name,
|
|
448
|
-
export_name=f"{self.deployment.build_resource_name('record')}-{name}"
|
|
449
|
-
)
|
|
416
|
+
return
|
|
@@ -194,37 +194,7 @@ class SecurityGroupsStack(IStack, VPCProviderMixin):
|
|
|
194
194
|
description="Uptime Robot",
|
|
195
195
|
)
|
|
196
196
|
|
|
197
|
-
|
|
198
|
-
# Outputs (exports)
|
|
199
|
-
# =========================================================
|
|
200
|
-
cdk.CfnOutput(
|
|
201
|
-
self,
|
|
202
|
-
"WebFleetAlbSecurityGroupOut",
|
|
203
|
-
value=alb_sg.ref,
|
|
204
|
-
description="Web Fleet Application Load Balancer Security Group",
|
|
205
|
-
export_name=f"{self.deployment.environment}-{self.workload.name}-WebFleetAlbSecurityGroup",
|
|
206
|
-
)
|
|
207
|
-
cdk.CfnOutput(
|
|
208
|
-
self,
|
|
209
|
-
"WebFleetInstancesSecurityGroupOut",
|
|
210
|
-
value=web_fleet_sg.ref,
|
|
211
|
-
description="Web Fleet Instances Security Group",
|
|
212
|
-
export_name=f"{self.deployment.environment}-{self.workload.name}-WebFleetInstancesSecurityGroup",
|
|
213
|
-
)
|
|
214
|
-
cdk.CfnOutput(
|
|
215
|
-
self,
|
|
216
|
-
"MySqlDbSecurityGroupOut",
|
|
217
|
-
value=mysql_sg.ref,
|
|
218
|
-
description="MySql Security Group",
|
|
219
|
-
export_name=f"{self.deployment.environment}-{self.workload.name}-MySqlDbSecurityGroup",
|
|
220
|
-
)
|
|
221
|
-
cdk.CfnOutput(
|
|
222
|
-
self,
|
|
223
|
-
"WebMonitoringSecurityGroupOut",
|
|
224
|
-
value=monitoring_sg.ref,
|
|
225
|
-
description="Web Fleet Application Load Balancer Security Group",
|
|
226
|
-
export_name=f"{self.deployment.environment}-{self.workload.name}-WebMonitoringSecurityGroup",
|
|
227
|
-
)
|
|
197
|
+
|
|
228
198
|
|
|
229
199
|
# =========================================================
|
|
230
200
|
# SSM Parameter Store Exports
|
|
@@ -337,14 +337,7 @@ class SecurityGroupStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
337
337
|
|
|
338
338
|
def _export_cfn_outputs(self, sg_name: str) -> None:
|
|
339
339
|
"""Add CloudFormation outputs for the Security Group"""
|
|
340
|
-
|
|
341
|
-
# Security Group ID
|
|
342
|
-
cdk.CfnOutput(
|
|
343
|
-
self,
|
|
344
|
-
f"{sg_name}-id",
|
|
345
|
-
value=self.security_group.security_group_id,
|
|
346
|
-
export_name=f"{self.deployment.build_resource_name(sg_name)}-id",
|
|
347
|
-
)
|
|
340
|
+
return
|
|
348
341
|
|
|
349
342
|
def _export_ssm_parameters(self, sg_name: str) -> None:
|
|
350
343
|
"""Add SSM parameters for the Security Group"""
|
|
@@ -131,37 +131,4 @@ class SQSStack(IStack):
|
|
|
131
131
|
|
|
132
132
|
def _add_outputs(self) -> None:
|
|
133
133
|
"""Add CloudFormation outputs for the SQS queues"""
|
|
134
|
-
|
|
135
|
-
# Queue ARN
|
|
136
|
-
cdk.CfnOutput(
|
|
137
|
-
self,
|
|
138
|
-
f"{queue_name}-arn",
|
|
139
|
-
value=queue.queue_arn,
|
|
140
|
-
export_name=f"{self.deployment.build_resource_name(queue_name)}-arn"
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
# Queue URL
|
|
144
|
-
cdk.CfnOutput(
|
|
145
|
-
self,
|
|
146
|
-
f"{queue_name}-url",
|
|
147
|
-
value=queue.queue_url,
|
|
148
|
-
export_name=f"{self.deployment.build_resource_name(queue_name)}-url"
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
# Also add outputs for DLQs
|
|
152
|
-
for dlq_name, dlq in self.dead_letter_queues.items():
|
|
153
|
-
# DLQ ARN
|
|
154
|
-
cdk.CfnOutput(
|
|
155
|
-
self,
|
|
156
|
-
f"{dlq_name}-arn",
|
|
157
|
-
value=dlq.queue_arn,
|
|
158
|
-
export_name=f"{self.deployment.build_resource_name(dlq_name)}-arn"
|
|
159
|
-
)
|
|
160
|
-
|
|
161
|
-
# DLQ URL
|
|
162
|
-
cdk.CfnOutput(
|
|
163
|
-
self,
|
|
164
|
-
f"{dlq_name}-url",
|
|
165
|
-
value=dlq.queue_url,
|
|
166
|
-
export_name=f"{self.deployment.build_resource_name(dlq_name)}-url"
|
|
167
|
-
)
|
|
134
|
+
return
|