cdk-factory 0.16.11__py3-none-any.whl → 0.16.13__py3-none-any.whl
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/configurations/cdk_config.py +5 -3
- cdk_factory/configurations/resources/ecs_cluster.py +101 -0
- cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py +24 -46
- cdk_factory/stack_library/ecs/__init__.py +14 -0
- cdk_factory/stack_library/ecs/ecs_cluster_stack.py +246 -0
- cdk_factory/version.py +1 -1
- {cdk_factory-0.16.11.dist-info → cdk_factory-0.16.13.dist-info}/METADATA +1 -1
- {cdk_factory-0.16.11.dist-info → cdk_factory-0.16.13.dist-info}/RECORD +11 -9
- {cdk_factory-0.16.11.dist-info → cdk_factory-0.16.13.dist-info}/WHEEL +0 -0
- {cdk_factory-0.16.11.dist-info → cdk_factory-0.16.13.dist-info}/entry_points.txt +0 -0
- {cdk_factory-0.16.11.dist-info → cdk_factory-0.16.13.dist-info}/licenses/LICENSE +0 -0
|
@@ -183,9 +183,11 @@ class CdkConfig:
|
|
|
183
183
|
if self._resolved_config_file_path is None:
|
|
184
184
|
raise ValueError("Config file path is not set")
|
|
185
185
|
|
|
186
|
-
file_name =
|
|
186
|
+
file_name = os.path.join(".dynamic", os.path.basename(self._resolved_config_file_path))
|
|
187
187
|
path = os.path.join(Path(self._resolved_config_file_path).parent, file_name)
|
|
188
|
-
|
|
188
|
+
|
|
189
|
+
if not os.path.exists(Path(path).parent):
|
|
190
|
+
os.makedirs(Path(path).parent)
|
|
189
191
|
cdk = config.get("cdk", {})
|
|
190
192
|
if replacements and len(replacements) > 0:
|
|
191
193
|
config = JsonLoadingUtility.recursive_replace(config, replacements)
|
|
@@ -214,7 +216,7 @@ class CdkConfig:
|
|
|
214
216
|
value = static_value
|
|
215
217
|
elif environment_variable_name is not None and not value:
|
|
216
218
|
value = os.environ.get(environment_variable_name, None)
|
|
217
|
-
if value is None and required:
|
|
219
|
+
if (value is None or str(value).strip() == "") and required:
|
|
218
220
|
raise ValueError(
|
|
219
221
|
f"Failed to get value for environment variable {environment_variable_name}"
|
|
220
222
|
)
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ECS Cluster Configuration
|
|
3
|
+
|
|
4
|
+
Defines the configuration schema for ECS cluster stacks.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Optional, Dict, Any, List
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class EcsClusterConfig:
|
|
11
|
+
"""
|
|
12
|
+
Configuration for an ECS cluster.
|
|
13
|
+
|
|
14
|
+
This class defines all the configurable parameters for an ECS cluster,
|
|
15
|
+
providing explicit control over cluster creation and settings.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def __init__(self, config: Dict[str, Any]) -> None:
|
|
19
|
+
self._config = config or {}
|
|
20
|
+
|
|
21
|
+
@property
|
|
22
|
+
def name(self) -> str:
|
|
23
|
+
"""Name of the ECS cluster. Supports template variables like {{WORKLOAD_NAME}}-{{ENVIRONMENT}}-cluster"""
|
|
24
|
+
return self._config.get("name", "cluster")
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def container_insights(self) -> bool:
|
|
28
|
+
"""Enable container insights for the cluster"""
|
|
29
|
+
return self._config.get("container_insights", True)
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def cluster_settings(self) -> Optional[List[Dict[str, str]]]:
|
|
33
|
+
"""Additional cluster settings as name-value pairs"""
|
|
34
|
+
return self._config.get("cluster_settings")
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def cloud_map_namespace(self) -> Optional[Dict[str, Any]]:
|
|
38
|
+
"""Cloud Map namespace configuration for service discovery"""
|
|
39
|
+
return self._config.get("cloud_map_namespace")
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def execute_command_configuration(self) -> Optional[Dict[str, Any]]:
|
|
43
|
+
"""Execute command configuration for ECS"""
|
|
44
|
+
return self._config.get("execute_command_configuration")
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def vpc_id(self) -> Optional[str]:
|
|
48
|
+
"""VPC ID where the cluster should be created"""
|
|
49
|
+
return self._config.get("vpc_id")
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def ssm_vpc_id(self) -> Optional[str]:
|
|
53
|
+
"""SSM parameter path to import VPC ID"""
|
|
54
|
+
return self._config.get("ssm_vpc_id")
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def create_instance_role(self) -> bool:
|
|
58
|
+
"""Whether to create an ECS instance role"""
|
|
59
|
+
return self._config.get("create_instance_role", True)
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def instance_role_name(self) -> Optional[str]:
|
|
63
|
+
"""Custom name for the ECS instance role"""
|
|
64
|
+
return self._config.get("instance_role_name")
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def instance_profile_name(self) -> Optional[str]:
|
|
68
|
+
"""Custom name for the ECS instance profile"""
|
|
69
|
+
return self._config.get("instance_profile_name")
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def managed_policies(self) -> List[str]:
|
|
73
|
+
"""List of AWS managed policies to attach to the instance role"""
|
|
74
|
+
return self._config.get("managed_policies", [
|
|
75
|
+
"service-role/AmazonEC2ContainerServiceforEC2Role",
|
|
76
|
+
"AmazonSSMManagedInstanceCore"
|
|
77
|
+
])
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def inline_policies(self) -> Optional[Dict[str, Dict[str, Any]]]:
|
|
81
|
+
"""Inline IAM policies to attach to the instance role"""
|
|
82
|
+
return self._config.get("inline_policies")
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def export_ssm_parameters(self) -> bool:
|
|
86
|
+
"""Whether to export cluster information to SSM parameters"""
|
|
87
|
+
return self._config.get("export_ssm_parameters", True)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def ssm_exports(self) -> Dict[str, str]:
|
|
92
|
+
"""SSM parameter exports"""
|
|
93
|
+
return self._config.get("ssm_exports", {})
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def ssm_imports(self) -> Dict[str, Any]:
|
|
97
|
+
"""SSM parameter imports"""
|
|
98
|
+
# Check both nested and flat structures for backwards compatibility
|
|
99
|
+
if "ssm" in self._config and "imports" in self._config["ssm"]:
|
|
100
|
+
return self._config["ssm"]["imports"]
|
|
101
|
+
return self._config.get("ssm_imports", {})
|
|
@@ -632,56 +632,34 @@ class AutoScalingStack(IStack, VPCProviderMixin):
|
|
|
632
632
|
# Scheduled action implementation would go here
|
|
633
633
|
pass
|
|
634
634
|
|
|
635
|
-
def _create_ecs_cluster_if_needed(self, asg_name: str)
|
|
636
|
-
"""
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
logger.debug("No ECS configuration detected, skipping cluster creation")
|
|
635
|
+
def _create_ecs_cluster_if_needed(self, asg_name: str):
|
|
636
|
+
"""
|
|
637
|
+
ECS cluster creation should be handled by the dedicated EcsClusterStack module.
|
|
638
|
+
This method only handles SSM imports for cluster name injection.
|
|
639
|
+
"""
|
|
640
|
+
# Check if ECS cluster name is available via SSM imports
|
|
641
|
+
if self.has_ssm_import("ecs_cluster_name"):
|
|
642
|
+
logger.info(f"ECS cluster name available via SSM imports")
|
|
643
|
+
# Inject cluster name into user data if available
|
|
644
|
+
if self.user_data and self.user_data_commands:
|
|
645
|
+
self._inject_cluster_name_into_user_data()
|
|
647
646
|
return
|
|
648
647
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
logger.info(f"Creating ECS cluster: {cluster_name}")
|
|
653
|
-
|
|
654
|
-
# Create ECS cluster
|
|
655
|
-
self.ecs_cluster = ecs.Cluster(
|
|
656
|
-
self,
|
|
657
|
-
"ECSCluster",
|
|
658
|
-
cluster_name=cluster_name,
|
|
659
|
-
vpc=self.vpc,
|
|
660
|
-
container_insights=True
|
|
661
|
-
)
|
|
662
|
-
|
|
663
|
-
# Inject the cluster name into user data if user data exists
|
|
664
|
-
if self.user_data and self.user_data_commands:
|
|
665
|
-
self._inject_cluster_name_into_user_data(cluster_name)
|
|
666
|
-
|
|
667
|
-
# Export cluster name
|
|
668
|
-
cdk.CfnOutput(
|
|
669
|
-
self,
|
|
670
|
-
f"{cluster_name}-name",
|
|
671
|
-
value=self.ecs_cluster.cluster_name,
|
|
672
|
-
export_name=f"{self.deployment.build_resource_name(cluster_name)}-name",
|
|
673
|
-
)
|
|
674
|
-
|
|
675
|
-
# Export cluster ARN
|
|
676
|
-
cdk.CfnOutput(
|
|
677
|
-
self,
|
|
678
|
-
f"{cluster_name}-arn",
|
|
679
|
-
value=self.ecs_cluster.cluster_arn,
|
|
680
|
-
export_name=f"{self.deployment.build_resource_name(cluster_name)}-arn",
|
|
648
|
+
logger.warning(
|
|
649
|
+
"No ECS cluster name found in SSM imports. "
|
|
650
|
+
"Use the dedicated EcsClusterStack module to create ECS clusters."
|
|
681
651
|
)
|
|
682
652
|
|
|
683
|
-
def _inject_cluster_name_into_user_data(self
|
|
684
|
-
"""Inject the ECS cluster name into user data commands"""
|
|
653
|
+
def _inject_cluster_name_into_user_data(self) -> None:
|
|
654
|
+
"""Inject the ECS cluster name into user data commands using SSM imports"""
|
|
655
|
+
# Check if ECS cluster name is available via SSM imports
|
|
656
|
+
if self.has_ssm_import("ecs_cluster_name"):
|
|
657
|
+
cluster_name = self.get_ssm_imported_value("ecs_cluster_name")
|
|
658
|
+
logger.info(f"Using ECS cluster name from SSM: {cluster_name}")
|
|
659
|
+
else:
|
|
660
|
+
logger.warning("No ECS cluster name found in SSM imports, skipping cluster name injection")
|
|
661
|
+
return
|
|
662
|
+
|
|
685
663
|
injected_commands = []
|
|
686
664
|
cluster_name_injected = False
|
|
687
665
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ECS Stack Library
|
|
3
|
+
|
|
4
|
+
Contains ECS-related stack modules for creating and managing
|
|
5
|
+
ECS clusters, services, and related resources.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from .ecs_cluster_stack import EcsClusterStack
|
|
9
|
+
from .ecs_service_stack import EcsServiceStack
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"EcsClusterStack",
|
|
13
|
+
"EcsServiceStack"
|
|
14
|
+
]
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ECS Cluster Stack Module
|
|
3
|
+
|
|
4
|
+
Provides a dedicated stack for creating and configuring ECS clusters
|
|
5
|
+
with proper configurability and explicit resource management.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import logging
|
|
9
|
+
from typing import Optional, Dict, Any
|
|
10
|
+
|
|
11
|
+
from aws_cdk import (
|
|
12
|
+
aws_ecs as ecs,
|
|
13
|
+
aws_iam as iam,
|
|
14
|
+
CfnOutput,
|
|
15
|
+
)
|
|
16
|
+
from constructs import Construct
|
|
17
|
+
|
|
18
|
+
from cdk_factory.configurations.stack import StackConfig
|
|
19
|
+
from cdk_factory.configurations.deployment import DeploymentConfig
|
|
20
|
+
from cdk_factory.configurations.workload import WorkloadConfig
|
|
21
|
+
from cdk_factory.interfaces.vpc_provider_mixin import VPCProviderMixin
|
|
22
|
+
from cdk_factory.configurations.resources.ecs_cluster import EcsClusterConfig
|
|
23
|
+
from cdk_factory.stack.stack_module_registry import register_stack
|
|
24
|
+
from cdk_factory.interfaces.istack import IStack
|
|
25
|
+
|
|
26
|
+
logger = logging.getLogger(__name__)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@register_stack("ecs_cluster_stack")
|
|
30
|
+
class EcsClusterStack(IStack, VPCProviderMixin):
|
|
31
|
+
"""
|
|
32
|
+
A dedicated stack for creating and managing ECS clusters.
|
|
33
|
+
|
|
34
|
+
This stack provides explicit configuration of ECS clusters including:
|
|
35
|
+
- Cluster naming
|
|
36
|
+
- Container insights
|
|
37
|
+
- Cluster settings
|
|
38
|
+
- SSM parameter exports
|
|
39
|
+
- IAM role configurations
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, scope: Construct, id: str, **kwargs) -> None:
|
|
43
|
+
"""
|
|
44
|
+
Initialize the ECS Cluster stack.
|
|
45
|
+
|
|
46
|
+
Args:
|
|
47
|
+
scope: The CDK construct scope
|
|
48
|
+
id: The construct ID
|
|
49
|
+
"""
|
|
50
|
+
super().__init__(scope, id, **kwargs)
|
|
51
|
+
|
|
52
|
+
self._initialize_vpc_cache()
|
|
53
|
+
|
|
54
|
+
self.ecs_config: Optional[EcsClusterConfig] = None
|
|
55
|
+
self.stack_config: Optional[StackConfig] = None
|
|
56
|
+
self.deployment: Optional[DeploymentConfig] = None
|
|
57
|
+
self.workload: Optional[WorkloadConfig] = None
|
|
58
|
+
self.ecs_cluster: Optional[ecs.Cluster] = None
|
|
59
|
+
self.instance_role: Optional[iam.Role] = None
|
|
60
|
+
self.instance_profile: Optional[iam.CfnInstanceProfile] = None
|
|
61
|
+
|
|
62
|
+
# SSM imported values
|
|
63
|
+
self.ssm_imported_values: Dict[str, Any] = {}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def build(
|
|
68
|
+
self,
|
|
69
|
+
stack_config: StackConfig,
|
|
70
|
+
deployment: DeploymentConfig,
|
|
71
|
+
workload: WorkloadConfig,
|
|
72
|
+
) -> None:
|
|
73
|
+
"""Build the ECS Cluster stack"""
|
|
74
|
+
self._build(stack_config, deployment, workload)
|
|
75
|
+
|
|
76
|
+
def _build(
|
|
77
|
+
self,
|
|
78
|
+
stack_config: StackConfig,
|
|
79
|
+
deployment: DeploymentConfig,
|
|
80
|
+
workload: WorkloadConfig,
|
|
81
|
+
) -> None:
|
|
82
|
+
"""Internal build method for the ECS Cluster stack"""
|
|
83
|
+
self.stack_config = stack_config
|
|
84
|
+
self.deployment = deployment
|
|
85
|
+
self.workload = workload
|
|
86
|
+
|
|
87
|
+
# Initialize VPC cache from mixin
|
|
88
|
+
self._initialize_vpc_cache()
|
|
89
|
+
|
|
90
|
+
# Load ECS cluster configuration
|
|
91
|
+
self.ecs_config: EcsClusterConfig = EcsClusterConfig(
|
|
92
|
+
stack_config.dictionary.get("ecs_cluster", {})
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
logger.info(f"Creating ECS Cluster stack: {self.stack_name}")
|
|
96
|
+
|
|
97
|
+
# Process SSM imports first
|
|
98
|
+
self.process_ssm_imports(self.ecs_config, deployment, "ECS Cluster")
|
|
99
|
+
|
|
100
|
+
# Create the ECS cluster
|
|
101
|
+
self._create_ecs_cluster()
|
|
102
|
+
|
|
103
|
+
# Create IAM roles if needed
|
|
104
|
+
self._create_iam_roles()
|
|
105
|
+
|
|
106
|
+
# Export cluster information
|
|
107
|
+
self._export_cluster_info()
|
|
108
|
+
|
|
109
|
+
logger.info(f"ECS Cluster stack created: {self.stack_name}")
|
|
110
|
+
|
|
111
|
+
def _create_ecs_cluster(self):
|
|
112
|
+
"""Create the ECS cluster with explicit configuration."""
|
|
113
|
+
logger.info(f"Creating ECS cluster: {self.ecs_config.name}")
|
|
114
|
+
|
|
115
|
+
# Build cluster settings
|
|
116
|
+
cluster_settings = []
|
|
117
|
+
|
|
118
|
+
# Add container insights if enabled
|
|
119
|
+
if self.ecs_config.container_insights:
|
|
120
|
+
cluster_settings.append({"name": "containerInsights", "value": "enabled"})
|
|
121
|
+
|
|
122
|
+
# Add custom cluster settings
|
|
123
|
+
if self.ecs_config.cluster_settings:
|
|
124
|
+
cluster_settings.extend(self.ecs_config.cluster_settings)
|
|
125
|
+
|
|
126
|
+
# Create the ECS cluster
|
|
127
|
+
self.vpc = self.resolve_vpc(
|
|
128
|
+
config=self.ecs_config,
|
|
129
|
+
deployment=self.deployment,
|
|
130
|
+
workload=self.workload
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
self.ecs_cluster = ecs.Cluster(
|
|
134
|
+
self,
|
|
135
|
+
"ECSCluster",
|
|
136
|
+
cluster_name=self.ecs_config.name,
|
|
137
|
+
vpc=self.vpc,
|
|
138
|
+
container_insights=self.ecs_config.container_insights,
|
|
139
|
+
default_cloud_map_namespace=(
|
|
140
|
+
self.ecs_config.cloud_map_namespace
|
|
141
|
+
if self.ecs_config.cloud_map_namespace
|
|
142
|
+
else None
|
|
143
|
+
),
|
|
144
|
+
execute_command_configuration=(
|
|
145
|
+
self.ecs_config.execute_command_configuration
|
|
146
|
+
if self.ecs_config.execute_command_configuration
|
|
147
|
+
else None
|
|
148
|
+
),
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
logger.info(f"Created ECS cluster: {self.ecs_config.name}")
|
|
152
|
+
|
|
153
|
+
def _create_iam_roles(self):
|
|
154
|
+
"""Create IAM roles for the ECS cluster if configured."""
|
|
155
|
+
if not self.ecs_config.create_instance_role:
|
|
156
|
+
return
|
|
157
|
+
|
|
158
|
+
logger.info("Creating ECS instance role")
|
|
159
|
+
|
|
160
|
+
# Create the instance role
|
|
161
|
+
self.instance_role = iam.Role(
|
|
162
|
+
self,
|
|
163
|
+
"ECSInstanceRole",
|
|
164
|
+
assumed_by=iam.ServicePrincipal("ec2.amazonaws.com"),
|
|
165
|
+
role_name=self.ecs_config.instance_role_name
|
|
166
|
+
or f"{self.ecs_config.name}-instance-role",
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
# Add managed policies
|
|
170
|
+
for policy in self.ecs_config.managed_policies:
|
|
171
|
+
self.instance_role.add_managed_policy(
|
|
172
|
+
iam.ManagedPolicy.from_aws_managed_policy_name(policy)
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
# Add inline policies if provided
|
|
176
|
+
if self.ecs_config.inline_policies:
|
|
177
|
+
for policy_name, policy_document in self.ecs_config.inline_policies.items():
|
|
178
|
+
self.instance_role.add_to_policy(
|
|
179
|
+
iam.PolicyStatement.from_json(policy_document)
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
# Create instance profile
|
|
183
|
+
self.instance_profile = iam.CfnInstanceProfile(
|
|
184
|
+
self,
|
|
185
|
+
"ECSInstanceProfile",
|
|
186
|
+
roles=[self.instance_role.role_name],
|
|
187
|
+
instance_profile_name=self.ecs_config.instance_profile_name
|
|
188
|
+
or f"{self.ecs_config.name}-instance-profile",
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
logger.info("Created ECS instance role and profile")
|
|
192
|
+
|
|
193
|
+
def _export_cluster_info(self):
|
|
194
|
+
"""Export cluster information via SSM parameters and CloudFormation outputs."""
|
|
195
|
+
logger.info("Exporting ECS cluster information")
|
|
196
|
+
|
|
197
|
+
# Export cluster name
|
|
198
|
+
self.export_ssm_parameter(
|
|
199
|
+
self, "ClusterNameParameter",
|
|
200
|
+
self.ecs_config.name,
|
|
201
|
+
f"/{self.deployment.name}/{self.workload.name}/ecs/cluster/name",
|
|
202
|
+
"ECS Cluster Name",
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
# Export cluster ARN
|
|
206
|
+
self.export_ssm_parameter(
|
|
207
|
+
self, "ClusterArnParameter",
|
|
208
|
+
self.ecs_cluster.cluster_arn,
|
|
209
|
+
f"/{self.deployment.name}/{self.workload.name}/ecs/cluster/arn",
|
|
210
|
+
"ECS Cluster ARN",
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
# Export instance role ARN if created
|
|
214
|
+
if hasattr(self, "instance_role"):
|
|
215
|
+
self.export_ssm_parameter(
|
|
216
|
+
self, "InstanceRoleArnParameter",
|
|
217
|
+
self.instance_role.role_arn,
|
|
218
|
+
f"/{self.deployment.name}/{self.workload.name}/ecs/instance-role/arn",
|
|
219
|
+
"ECS Instance Role ARN",
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
# CloudFormation outputs
|
|
223
|
+
CfnOutput(
|
|
224
|
+
self,
|
|
225
|
+
"cluster-name",
|
|
226
|
+
value=self.ecs_config.name,
|
|
227
|
+
description=f"Name of the ECS cluster: {self.ecs_config.name}",
|
|
228
|
+
export_name=f"{self.deployment.name}-ecs-cluster-name",
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
CfnOutput(
|
|
232
|
+
self,
|
|
233
|
+
"cluster-arn",
|
|
234
|
+
value=self.ecs_cluster.cluster_arn,
|
|
235
|
+
description=f"ARN of the ECS cluster: {self.ecs_config.name}",
|
|
236
|
+
export_name=f"{self.deployment.name}-ecs-cluster-arn",
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
if hasattr(self, "instance_role"):
|
|
240
|
+
CfnOutput(
|
|
241
|
+
self,
|
|
242
|
+
"instance-role-arn",
|
|
243
|
+
value=self.instance_role.role_arn,
|
|
244
|
+
description=f"ARN of the ECS instance role: {self.ecs_config.name}",
|
|
245
|
+
export_name=f"{self.deployment.name}-ecs-instance-role-arn",
|
|
246
|
+
)
|
cdk_factory/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.16.
|
|
1
|
+
__version__ = "0.16.13"
|
|
@@ -2,11 +2,11 @@ cdk_factory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
2
2
|
cdk_factory/app.py,sha256=RnX0-pwdTAPAdKJK_j13Zl8anf9zYKBwboR0KA8K8xM,10346
|
|
3
3
|
cdk_factory/cdk.json,sha256=SKZKhJ2PBpFH78j-F8S3VDYW-lf76--Q2I3ON-ZIQfw,3106
|
|
4
4
|
cdk_factory/cli.py,sha256=FGbCTS5dYCNsfp-etshzvFlGDCjC28r6rtzYbe7KoHI,6407
|
|
5
|
-
cdk_factory/version.py,sha256=
|
|
5
|
+
cdk_factory/version.py,sha256=DRHGpx4GSQ3Kn3g7_X9lliE5ploF5wGkMt49I03ESBQ,24
|
|
6
6
|
cdk_factory/builds/README.md,sha256=9BBWd7bXpyKdMU_g2UljhQwrC9i5O_Tvkb6oPvndoZk,90
|
|
7
7
|
cdk_factory/commands/command_loader.py,sha256=QbLquuP_AdxtlxlDy-2IWCQ6D-7qa58aphnDPtp_uTs,3744
|
|
8
8
|
cdk_factory/configurations/base_config.py,sha256=JKjhNsy0RCUZy1s8n5D_aXXI-upR9izaLtCTfKYiV9k,9624
|
|
9
|
-
cdk_factory/configurations/cdk_config.py,sha256=
|
|
9
|
+
cdk_factory/configurations/cdk_config.py,sha256=I1mgDcGJgDCoS_WelJUQdUJLAZgyUA1NVF2q2UJ1hBw,8939
|
|
10
10
|
cdk_factory/configurations/deployment.py,sha256=LO2gd1yv1nqlX_2MIjRXptylFybWiTKsMKZU0N58rSM,12110
|
|
11
11
|
cdk_factory/configurations/deployment_wave.py,sha256=TFX7CYgr5SmLyziEb-R_OTteFWtlMHB4pT53ekV3d1Y,233
|
|
12
12
|
cdk_factory/configurations/devops.py,sha256=PG-s2ldZmMULheWdKf2lf2LSugLoKiOKyLELTZJJxu8,2506
|
|
@@ -31,6 +31,7 @@ cdk_factory/configurations/resources/cognito.py,sha256=udX2AJ1ITLhy4f1XiJQwrva6F
|
|
|
31
31
|
cdk_factory/configurations/resources/docker.py,sha256=hUbuxkuhcQu9LnLX7I8_57eTmHefEAGVnOHO37MkqC4,2166
|
|
32
32
|
cdk_factory/configurations/resources/dynamodb.py,sha256=HsZMOaRwfuNPwKIzokeeE3f5zAQLTB5hRb_GzYq2ibg,2903
|
|
33
33
|
cdk_factory/configurations/resources/ecr.py,sha256=o9hHzEBVPoxUvWZGXGbRJ-98FmP6fMLY5a1-qg42jL0,8253
|
|
34
|
+
cdk_factory/configurations/resources/ecs_cluster.py,sha256=oz8bXdW8dxYWQX0VIjvgAQA8quXJFF0NBTvtksS2vN4,3527
|
|
34
35
|
cdk_factory/configurations/resources/ecs_service.py,sha256=fAW4EuBNhPrE7G0QcHXongKoAnFeGMRS6iP7OuGP5Fw,4926
|
|
35
36
|
cdk_factory/configurations/resources/exisiting.py,sha256=EVOLnkB-DGfTlmDgyQ5DD5k2zYfpFxqI3gugDR7mifI,478
|
|
36
37
|
cdk_factory/configurations/resources/lambda_edge.py,sha256=MjmiwDkys4aoRvDQhH3MT6BgeShzJXNWL7761HJrLtQ,3404
|
|
@@ -86,7 +87,7 @@ cdk_factory/stack_library/acm/__init__.py,sha256=4FNRLykblcKZvq_wieYwvv9N_jgrZnJ
|
|
|
86
87
|
cdk_factory/stack_library/acm/acm_stack.py,sha256=hflRXyOSjqGeJxBx87EV3Z3MJ5HEX2rnrjJ_E9wwhH8,5862
|
|
87
88
|
cdk_factory/stack_library/api_gateway/api_gateway_stack.py,sha256=l6J5uurBQqbhj9JuvQitV9PiIHS5kqa-dFWifCeA3GM,39347
|
|
88
89
|
cdk_factory/stack_library/auto_scaling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
89
|
-
cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py,sha256=
|
|
90
|
+
cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py,sha256=8Ho7QLbW0MLEmnD0ApglFgZC8Bh5ODT2jERNoAUxz3Y,30128
|
|
90
91
|
cdk_factory/stack_library/aws_lambdas/lambda_stack.py,sha256=SFbBPvvCopbyiuYtq-O5sQkFCf94Wzua6aDUXiFDSB4,26161
|
|
91
92
|
cdk_factory/stack_library/buckets/README.md,sha256=XkK3UNVtRLE7NtUvbhCOBBYUYi8hlrrSaI1s3GJVrqI,78
|
|
92
93
|
cdk_factory/stack_library/buckets/bucket_stack.py,sha256=SLoZqSffAqmeBBEVUQg54D_8Ad5UKdkjEAmKAVgAqQo,1778
|
|
@@ -97,7 +98,8 @@ cdk_factory/stack_library/cognito/cognito_stack.py,sha256=zEHkKVCIeyZywPs_GIMXCX
|
|
|
97
98
|
cdk_factory/stack_library/dynamodb/dynamodb_stack.py,sha256=TVyOrUhgaSuN8uymkpaQcpOaSA0lkYJ8QUMgakTCKus,6771
|
|
98
99
|
cdk_factory/stack_library/ecr/README.md,sha256=xw2wPx9WN03Y4BBwqvbi9lAFGNyaD1FUNpqxVJX14Oo,179
|
|
99
100
|
cdk_factory/stack_library/ecr/ecr_stack.py,sha256=1xA68sxFVyqreYjXrP_7U9I8RF9RtFeR6KeEfSWuC2U,2118
|
|
100
|
-
cdk_factory/stack_library/ecs/__init__.py,sha256=
|
|
101
|
+
cdk_factory/stack_library/ecs/__init__.py,sha256=ZZLBmuSt6z_cnFz6OkIFv_APmjqf706wWROruZGyFEI,289
|
|
102
|
+
cdk_factory/stack_library/ecs/ecs_cluster_stack.py,sha256=zAsaQsIWa9cOHcMngdWUAOXZ2PybC3Oc0JADqRgO2dg,8326
|
|
101
103
|
cdk_factory/stack_library/ecs/ecs_service_stack.py,sha256=c6K3BjlXyldr8ikvEhfC9C-LpKJILQQkwwU9DNlepH4,27747
|
|
102
104
|
cdk_factory/stack_library/lambda_edge/__init__.py,sha256=ByBJ_CWdc4UtTmFBZH-6pzBMNkjkdtE65AmnB0Fs6lM,156
|
|
103
105
|
cdk_factory/stack_library/lambda_edge/lambda_edge_stack.py,sha256=CdId_1kcZmYr1lLI9AD3-KqtE6voC3641PIloJmWiNI,16414
|
|
@@ -134,8 +136,8 @@ cdk_factory/utilities/lambda_function_utilities.py,sha256=S1GvBsY_q2cyUiaud3HORJ
|
|
|
134
136
|
cdk_factory/utilities/os_execute.py,sha256=5Op0LY_8Y-pUm04y1k8MTpNrmQvcLmQHPQITEP7EuSU,1019
|
|
135
137
|
cdk_factory/utils/api_gateway_utilities.py,sha256=If7Xu5s_UxmuV-kL3JkXxPLBdSVUKoLtohm0IUFoiV8,4378
|
|
136
138
|
cdk_factory/workload/workload_factory.py,sha256=yDI3cRhVI5ELNDcJPLpk9UY54Uind1xQoV3spzT4z7E,6068
|
|
137
|
-
cdk_factory-0.16.
|
|
138
|
-
cdk_factory-0.16.
|
|
139
|
-
cdk_factory-0.16.
|
|
140
|
-
cdk_factory-0.16.
|
|
141
|
-
cdk_factory-0.16.
|
|
139
|
+
cdk_factory-0.16.13.dist-info/METADATA,sha256=PDyT7iE3uveBVxNrEwsLMvpD0_J5yoVMh7L1DkoAjUE,2452
|
|
140
|
+
cdk_factory-0.16.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
141
|
+
cdk_factory-0.16.13.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
|
|
142
|
+
cdk_factory-0.16.13.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
|
|
143
|
+
cdk_factory-0.16.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|