cdk-factory 0.16.15__py3-none-any.whl → 0.20.0__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/base_config.py +23 -24
- cdk_factory/configurations/cdk_config.py +1 -1
- cdk_factory/configurations/deployment.py +12 -0
- cdk_factory/configurations/devops.py +1 -1
- cdk_factory/configurations/resources/acm.py +9 -2
- cdk_factory/configurations/resources/auto_scaling.py +7 -5
- cdk_factory/configurations/resources/cloudfront.py +7 -2
- cdk_factory/configurations/resources/ecr.py +1 -1
- cdk_factory/configurations/resources/ecs_cluster.py +12 -5
- cdk_factory/configurations/resources/ecs_service.py +30 -3
- cdk_factory/configurations/resources/lambda_edge.py +18 -4
- cdk_factory/configurations/resources/load_balancer.py +8 -9
- cdk_factory/configurations/resources/monitoring.py +8 -3
- cdk_factory/configurations/resources/rds.py +8 -9
- cdk_factory/configurations/resources/route53.py +5 -0
- cdk_factory/configurations/resources/rum.py +7 -2
- cdk_factory/configurations/resources/s3.py +10 -2
- cdk_factory/configurations/resources/security_group_full_stack.py +7 -8
- cdk_factory/configurations/resources/vpc.py +19 -0
- cdk_factory/configurations/workload.py +32 -2
- cdk_factory/constructs/cloudfront/cloudfront_distribution_construct.py +1 -1
- cdk_factory/constructs/ecr/ecr_construct.py +9 -2
- cdk_factory/constructs/lambdas/policies/policy_docs.py +4 -4
- cdk_factory/interfaces/istack.py +4 -4
- cdk_factory/interfaces/networked_stack_mixin.py +6 -6
- cdk_factory/interfaces/standardized_ssm_mixin.py +684 -0
- cdk_factory/interfaces/vpc_provider_mixin.py +64 -33
- cdk_factory/lambdas/edge/ip_gate/handler.py +42 -40
- cdk_factory/pipeline/pipeline_factory.py +3 -3
- cdk_factory/stack_library/__init__.py +3 -2
- cdk_factory/stack_library/acm/acm_stack.py +7 -17
- cdk_factory/stack_library/api_gateway/api_gateway_stack.py +84 -59
- cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py +454 -537
- cdk_factory/stack_library/cloudfront/cloudfront_stack.py +76 -22
- cdk_factory/stack_library/code_artifact/code_artifact_stack.py +5 -27
- cdk_factory/stack_library/cognito/cognito_stack.py +152 -92
- cdk_factory/stack_library/dynamodb/dynamodb_stack.py +19 -15
- cdk_factory/stack_library/ecr/ecr_stack.py +2 -2
- cdk_factory/stack_library/ecs/__init__.py +1 -3
- cdk_factory/stack_library/ecs/ecs_cluster_stack.py +159 -75
- cdk_factory/stack_library/ecs/ecs_service_stack.py +59 -52
- cdk_factory/stack_library/lambda_edge/EDGE_LOG_RETENTION_TODO.md +226 -0
- cdk_factory/stack_library/lambda_edge/LAMBDA_EDGE_LOG_RETENTION_BLOG.md +215 -0
- cdk_factory/stack_library/lambda_edge/lambda_edge_stack.py +240 -83
- cdk_factory/stack_library/load_balancer/load_balancer_stack.py +139 -212
- cdk_factory/stack_library/rds/rds_stack.py +74 -98
- cdk_factory/stack_library/route53/route53_stack.py +246 -40
- cdk_factory/stack_library/rum/rum_stack.py +108 -91
- cdk_factory/stack_library/security_group/security_group_full_stack.py +10 -53
- cdk_factory/stack_library/security_group/security_group_stack.py +12 -19
- cdk_factory/stack_library/simple_queue_service/sqs_stack.py +1 -34
- cdk_factory/stack_library/stack_base.py +5 -0
- cdk_factory/stack_library/vpc/vpc_stack.py +171 -130
- cdk_factory/stack_library/websites/static_website_stack.py +7 -3
- cdk_factory/utilities/api_gateway_integration_utility.py +24 -16
- cdk_factory/utilities/environment_services.py +5 -5
- cdk_factory/utilities/json_loading_utility.py +1 -1
- cdk_factory/validation/config_validator.py +483 -0
- cdk_factory/version.py +1 -1
- {cdk_factory-0.16.15.dist-info → cdk_factory-0.20.0.dist-info}/METADATA +1 -1
- {cdk_factory-0.16.15.dist-info → cdk_factory-0.20.0.dist-info}/RECORD +64 -62
- cdk_factory/interfaces/enhanced_ssm_parameter_mixin.py +0 -321
- cdk_factory/interfaces/ssm_parameter_mixin.py +0 -454
- {cdk_factory-0.16.15.dist-info → cdk_factory-0.20.0.dist-info}/WHEEL +0 -0
- {cdk_factory-0.16.15.dist-info → cdk_factory-0.20.0.dist-info}/entry_points.txt +0 -0
- {cdk_factory-0.16.15.dist-info → cdk_factory-0.20.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,27 +2,27 @@ 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=NGIecTe1EEM7UeBjKSJ4vCWuGDWF1ZX4PckW2Eguxps,23
|
|
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
|
-
cdk_factory/configurations/base_config.py,sha256=
|
|
9
|
-
cdk_factory/configurations/cdk_config.py,sha256
|
|
10
|
-
cdk_factory/configurations/deployment.py,sha256=
|
|
8
|
+
cdk_factory/configurations/base_config.py,sha256=eJ3Pl3GWk1jVr_bYQaaWlw4_-ZiFGaiXllI_fOOX1i0,9323
|
|
9
|
+
cdk_factory/configurations/cdk_config.py,sha256=-XOG2MSeMahZbUjWrARAkgU7tqbWsYcnV6a8bt063WM,8913
|
|
10
|
+
cdk_factory/configurations/deployment.py,sha256=iQwmccdQGw66wRl-CjHfNPpQ_OyqNCMl3G2V7FUYnGE,12684
|
|
11
11
|
cdk_factory/configurations/deployment_wave.py,sha256=TFX7CYgr5SmLyziEb-R_OTteFWtlMHB4pT53ekV3d1Y,233
|
|
12
|
-
cdk_factory/configurations/devops.py,sha256=
|
|
12
|
+
cdk_factory/configurations/devops.py,sha256=opeMenTgzWCNcrEyFX3SkTUvwFerLyjSd6xipvNVuog,2500
|
|
13
13
|
cdk_factory/configurations/enhanced_base_config.py,sha256=LQQBn_99n41vkqvpU3NhY_baizCwPz2Di-V3iFBL6oE,6660
|
|
14
14
|
cdk_factory/configurations/enhanced_ssm_config.py,sha256=J23PCinDTlji1XzsjOhIk9C8PubZc5ICpSWqPf3B0Vw,15873
|
|
15
15
|
cdk_factory/configurations/management.py,sha256=TSOIyxO9hGNxbgiTsS8a3pz03ungXiNqPPtZtfOpr8M,1373
|
|
16
16
|
cdk_factory/configurations/pipeline.py,sha256=3RmRP1GIk42rjYZ-A9H3357RcO13IA47N-2IQcBkySQ,4939
|
|
17
17
|
cdk_factory/configurations/pipeline_stage.py,sha256=hEjgaeaHYLRtkok5yBJwZg5zmPMPUHIRiUd0kzxWoRU,4453
|
|
18
18
|
cdk_factory/configurations/stack.py,sha256=7whhC48dUYw7BBFV49zM1Q3AghTNkaiDfy4kKYDm_RQ,2217
|
|
19
|
-
cdk_factory/configurations/workload.py,sha256=
|
|
19
|
+
cdk_factory/configurations/workload.py,sha256=ht9sgnCn6b-u8eme5bEovwSuy1VMd4uqTZNJzX3v9Zo,9247
|
|
20
20
|
cdk_factory/configurations/resources/_resources.py,sha256=tnXGn4kEC0JPQaTWB3QpAZG-2hIGBtugHTzuKn1OTvE,2548
|
|
21
|
-
cdk_factory/configurations/resources/acm.py,sha256=
|
|
21
|
+
cdk_factory/configurations/resources/acm.py,sha256=HsHwiH15p0zTqRGDErn35kBEa3rkaRWTDJzVequR9oY,3062
|
|
22
22
|
cdk_factory/configurations/resources/api_gateway.py,sha256=-k4hMGszIdQLb5DGmWBIPy49YGutp8zczafRh-Vob0I,4904
|
|
23
23
|
cdk_factory/configurations/resources/apigateway_route_config.py,sha256=6ytn_nwKwlfpBtHL5sV6gxMpgAJ3p6QFGumMoW4CTHM,2351
|
|
24
|
-
cdk_factory/configurations/resources/auto_scaling.py,sha256
|
|
25
|
-
cdk_factory/configurations/resources/cloudfront.py,sha256=
|
|
24
|
+
cdk_factory/configurations/resources/auto_scaling.py,sha256=mG-b1Zc7BdbdZdJp8K9EB62JY4jyjRnId_kzq1opqCM,6193
|
|
25
|
+
cdk_factory/configurations/resources/cloudfront.py,sha256=YU4my1sQjLnf4DNBECS4GvPAxUG2FX_BszfO76mSbYw,3959
|
|
26
26
|
cdk_factory/configurations/resources/cloudwatch_widget.py,sha256=EdEQSXUkDtoY_Mg_cJBWo1Hp84jSiK7U9tsd3k1VhKI,1271
|
|
27
27
|
cdk_factory/configurations/resources/code_artifact.py,sha256=P2X2i6NEcePitEf2wkN6lFTjIbXasn0uzrlPOT0tEac,3253
|
|
28
28
|
cdk_factory/configurations/resources/code_artifact_login.py,sha256=mKd8Bx0WypmSspfibwXbgubbIzW-6gGdQqIHvOnDAYQ,6066
|
|
@@ -30,49 +30,48 @@ cdk_factory/configurations/resources/code_repository.py,sha256=rAM6cbMtNR_S4TfiB
|
|
|
30
30
|
cdk_factory/configurations/resources/cognito.py,sha256=udX2AJ1ITLhy4f1XiJQwrva6F4i9NdbSm0zTg5PGku8,10649
|
|
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
|
-
cdk_factory/configurations/resources/ecr.py,sha256=
|
|
34
|
-
cdk_factory/configurations/resources/ecs_cluster.py,sha256=
|
|
35
|
-
cdk_factory/configurations/resources/ecs_service.py,sha256=
|
|
33
|
+
cdk_factory/configurations/resources/ecr.py,sha256=iJEtKqBT7vQU0LU4urIglraIR7cPZqp3HQBs_2An7kA,8303
|
|
34
|
+
cdk_factory/configurations/resources/ecs_cluster.py,sha256=mQYJu7SUPDl5E4dMR6HCPFoWvFA3RGIb0iMNn-K7LX8,3635
|
|
35
|
+
cdk_factory/configurations/resources/ecs_service.py,sha256=bOWjVECd6Kbc5NGGSnDaopnKrjRsUfmaZ6-qrsmTs3Q,6468
|
|
36
36
|
cdk_factory/configurations/resources/exisiting.py,sha256=EVOLnkB-DGfTlmDgyQ5DD5k2zYfpFxqI3gugDR7mifI,478
|
|
37
|
-
cdk_factory/configurations/resources/lambda_edge.py,sha256=
|
|
37
|
+
cdk_factory/configurations/resources/lambda_edge.py,sha256=C0S6HrQe2QPfmhj1PhZ7FEnT2EidOg5t-pUFUsOzaDc,3855
|
|
38
38
|
cdk_factory/configurations/resources/lambda_function.py,sha256=VENZ9-ABJ5mjcN8J8wdLH4KHDYr1kWO0iFDH0B2mJXA,14659
|
|
39
39
|
cdk_factory/configurations/resources/lambda_layers.py,sha256=gVeP_-LC3Eq0lkPaG_JfFUwboM5evRPr99SfKj53m7A,633
|
|
40
40
|
cdk_factory/configurations/resources/lambda_triggers.py,sha256=MD7cdMNKEulNBhtMLIFnWJuJ5R-yyIqa0LHUgbSQerA,834
|
|
41
|
-
cdk_factory/configurations/resources/load_balancer.py,sha256=
|
|
42
|
-
cdk_factory/configurations/resources/monitoring.py,sha256=
|
|
43
|
-
cdk_factory/configurations/resources/rds.py,sha256=
|
|
41
|
+
cdk_factory/configurations/resources/load_balancer.py,sha256=P-jKemIjIWWqScmQKspmRy1m3BrwNkRtTNHDStOAJds,5617
|
|
42
|
+
cdk_factory/configurations/resources/monitoring.py,sha256=CPYWbUbWQzoPqDhdPiB4Vahq-pPi6BEkavkVohadSIo,2422
|
|
43
|
+
cdk_factory/configurations/resources/rds.py,sha256=pX6uihguv1apYH93obcE4RloQDP48q5JHnYTnO39Pn0,15935
|
|
44
44
|
cdk_factory/configurations/resources/resource_mapping.py,sha256=cwv3n63RJ6E59ErsmSTdkW4i-g8huhHtKI0ExbRhJxA,2182
|
|
45
45
|
cdk_factory/configurations/resources/resource_naming.py,sha256=VE9S2cpzp11qqPL2z1sX79wXH0o1SntO2OG74nEmWC8,5508
|
|
46
46
|
cdk_factory/configurations/resources/resource_types.py,sha256=1WQHyDoErb-M-tETZZzyLDtbq_jdC85-I403dM48pgE,2317
|
|
47
|
-
cdk_factory/configurations/resources/route53.py,sha256=
|
|
47
|
+
cdk_factory/configurations/resources/route53.py,sha256=u63kw9cLBdOQrvxnULmopFqiArIYNvoWhrILNWvhD7w,3599
|
|
48
48
|
cdk_factory/configurations/resources/route53_hosted_zone.py,sha256=qjEYPCSxSOx5blr9EULv892ezxkCs--yrLa1ngWbyXM,880
|
|
49
|
-
cdk_factory/configurations/resources/rum.py,sha256=
|
|
50
|
-
cdk_factory/configurations/resources/s3.py,sha256=
|
|
49
|
+
cdk_factory/configurations/resources/rum.py,sha256=KgC2Mxhtr5XrICVXdgOXmxYp0GKu9lBs7izfG-Re9Ck,5294
|
|
50
|
+
cdk_factory/configurations/resources/s3.py,sha256=3RVGvHLEnxa-hCgDXsqZ9nq8Aic0zW0JVgMdybl95is,6407
|
|
51
51
|
cdk_factory/configurations/resources/security_group.py,sha256=8kQtaaRVEn2aDm8XoC7QFh2mDOFbPbgobmssIuqU8MA,2259
|
|
52
|
-
cdk_factory/configurations/resources/security_group_full_stack.py,sha256=
|
|
52
|
+
cdk_factory/configurations/resources/security_group_full_stack.py,sha256=CujSl6mfPlVO0Dxso8fDjwW5VZB0vbeP9HqbcTaM8H4,2657
|
|
53
53
|
cdk_factory/configurations/resources/sqs.py,sha256=fAh2dqttJ6PX46enFRULuiLEu3TEj0Vb2xntAOgUpYE,4346
|
|
54
|
-
cdk_factory/configurations/resources/vpc.py,sha256=
|
|
55
|
-
cdk_factory/constructs/cloudfront/cloudfront_distribution_construct.py,sha256=
|
|
56
|
-
cdk_factory/constructs/ecr/ecr_construct.py,sha256=
|
|
54
|
+
cdk_factory/configurations/resources/vpc.py,sha256=_W77du9wf8SJM64JbEAxEOQYerOm6aw4YaSsE7A_kKE,4453
|
|
55
|
+
cdk_factory/constructs/cloudfront/cloudfront_distribution_construct.py,sha256=WbbI37Ez262kffJNNpvyjXtFwOQlNfRql0NGBCLjpgE,25775
|
|
56
|
+
cdk_factory/constructs/ecr/ecr_construct.py,sha256=jEimLwLvO5ERuFEn_L2q2pyPKgkdHQ6Oi7Sy990ttSg,11002
|
|
57
57
|
cdk_factory/constructs/lambdas/lambda_function_construct.py,sha256=SQ5SEXn4kezVAzXuv_A_JB3o_svyBXOMi-htvfB9HQs,4516
|
|
58
58
|
cdk_factory/constructs/lambdas/lambda_function_docker_construct.py,sha256=O8aiHpNQ59eE3qEttEHVxbvp06v4byXOeYCVTAOI_Cg,9993
|
|
59
59
|
cdk_factory/constructs/lambdas/lambda_function_role_construct.py,sha256=nJoxKv-4CWugX-ZkAzoG8wrfSsHqXqiMZnGRqSyS4Po,1453
|
|
60
|
-
cdk_factory/constructs/lambdas/policies/policy_docs.py,sha256=
|
|
60
|
+
cdk_factory/constructs/lambdas/policies/policy_docs.py,sha256=Zk6qJLnzu2dm9wt2-VF5xYzIwXtRJAa1hYDaDo-G1MI,21125
|
|
61
61
|
cdk_factory/constructs/lambdas/policies/policy_statements.py,sha256=9DnSehsV8A_sBrSe4A--PQB6kii2HSnW4RnmhgVfon0,4164
|
|
62
62
|
cdk_factory/constructs/s3_buckets/s3_bucket_construct.py,sha256=5DK5aVUAveJYBjmPby2lg55r1FQMduLMJSQ4N58rwmc,3252
|
|
63
63
|
cdk_factory/constructs/s3_buckets/s3_bucket_replication_destination_construct.py,sha256=H-EJ2Q71LI5FPQ9thMkXDGRuwJdFc_2OzGIrWA98lxg,2517
|
|
64
64
|
cdk_factory/constructs/s3_buckets/s3_bucket_replication_source_construct.py,sha256=ZLKbRcMK1q73VruxCH62XbymebKt-lKV5Kul9OjkZiA,3763
|
|
65
65
|
cdk_factory/constructs/sqs/policies/sqs_policies.py,sha256=4p0G8G-fqNKSr68I55fvqH-DkhIeXyGaFBKkICIJ-qM,1277
|
|
66
|
-
cdk_factory/interfaces/
|
|
67
|
-
cdk_factory/interfaces/istack.py,sha256=4Bqls3Xbgwbnl9MjxsX8S2d5lMOMPdhlVu0DiAiTJ6Q,1152
|
|
66
|
+
cdk_factory/interfaces/istack.py,sha256=3xqGw5kNTt_KeLHdMxI7rIR0YORqcWQOqsacmDlTAv0,1167
|
|
68
67
|
cdk_factory/interfaces/live_ssm_resolver.py,sha256=3FIr9a02SXqZmbFs3RT0WxczWEQR_CF7QSt7kWbDrVE,8163
|
|
69
|
-
cdk_factory/interfaces/networked_stack_mixin.py,sha256=
|
|
70
|
-
cdk_factory/interfaces/
|
|
71
|
-
cdk_factory/interfaces/vpc_provider_mixin.py,sha256=
|
|
68
|
+
cdk_factory/interfaces/networked_stack_mixin.py,sha256=CtWT7Nhy73f0goQQG02jG7lsEucq5OrtZ0ltrp7XTFA,2884
|
|
69
|
+
cdk_factory/interfaces/standardized_ssm_mixin.py,sha256=kbl8fTDSBBSUARnKjruYB7KEgsw1Xns7g6fI5Jh8Vio,25763
|
|
70
|
+
cdk_factory/interfaces/vpc_provider_mixin.py,sha256=Kj0mmZd54NINprixJLs8zL-WWiSd0AQBtGdwNg8cz14,8207
|
|
72
71
|
cdk_factory/lambdas/health_handler.py,sha256=dd40ykKMxWCFEIyp2ZdQvAGNjw_ylI9CSm1N24Hp2ME,196
|
|
73
|
-
cdk_factory/lambdas/edge/ip_gate/handler.py,sha256=
|
|
72
|
+
cdk_factory/lambdas/edge/ip_gate/handler.py,sha256=gUevgX462mqGYddtQIyJ1-Jk3oXhFmbmd46jlqjai9E,10657
|
|
74
73
|
cdk_factory/pipeline/path_utils.py,sha256=fvWdrcb4onmpIu1APkHLhXg8zWfK74HcW3Ra2ynxfXM,2586
|
|
75
|
-
cdk_factory/pipeline/pipeline_factory.py,sha256=
|
|
74
|
+
cdk_factory/pipeline/pipeline_factory.py,sha256=8WXXMXZ4PiEOYAYA8oEKBe8mS--kUGpohbZMg0NhH7w,26324
|
|
76
75
|
cdk_factory/pipeline/stage.py,sha256=Be7ExMB9A-linRM18IQDOzQ-cP_I2_ThRNzlT4FIrUg,437
|
|
77
76
|
cdk_factory/pipeline/security/policies.py,sha256=H3-S6nipz3UtF9Pc5eJYr4-aREUTCaJWMjOUyd6Rdv4,4406
|
|
78
77
|
cdk_factory/pipeline/security/roles.py,sha256=ZB_O5H_BXgotvVspS2kVad9EMcY-a_-vU7Nm1_Z5MB8,4985
|
|
@@ -81,63 +80,66 @@ cdk_factory/stack/stack_factory.py,sha256=PfFzKxfM_5JPhK33_acEvpT4gll_AFCqZP7-lP
|
|
|
81
80
|
cdk_factory/stack/stack_module_loader.py,sha256=EA7ceb8qyktzkYgPYaixQdPJsi8FwTsMU-NrgtXwXcw,1144
|
|
82
81
|
cdk_factory/stack/stack_module_registry.py,sha256=J14-A75VZESzRQa8p-Fepdap7Z8T7mradTu3sVzuBx8,378
|
|
83
82
|
cdk_factory/stack/stack_modules.py,sha256=kgEK-j0smZPozVwTCfM1g1V17EyTBT0TXAQZq4vZz0o,784
|
|
84
|
-
cdk_factory/stack_library/__init__.py,sha256=
|
|
85
|
-
cdk_factory/stack_library/stack_base.py,sha256=
|
|
83
|
+
cdk_factory/stack_library/__init__.py,sha256=_v4kz9EYAjox6strrTK_4fb9GloJ2Kyhf63VRPivl2U,638
|
|
84
|
+
cdk_factory/stack_library/stack_base.py,sha256=Cu3qeqPQf33QaaXoxk_EaziNCIXcyspOo5AU3eX_wyM,5140
|
|
86
85
|
cdk_factory/stack_library/acm/__init__.py,sha256=4FNRLykblcKZvq_wieYwvv9N_jgrZnJ7ECH9xKh-0Ls,81
|
|
87
|
-
cdk_factory/stack_library/acm/acm_stack.py,sha256=
|
|
88
|
-
cdk_factory/stack_library/api_gateway/api_gateway_stack.py,sha256=
|
|
86
|
+
cdk_factory/stack_library/acm/acm_stack.py,sha256=LW4QgzcMDvtSpqwfc4ykgpzDGvXe4udvWVE_DtBN4Zg,5414
|
|
87
|
+
cdk_factory/stack_library/api_gateway/api_gateway_stack.py,sha256=PvLdGvcopGpLP0FwpfUcfXNiTIfYLTXqrG-TniE38yc,39643
|
|
89
88
|
cdk_factory/stack_library/auto_scaling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
|
-
cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py,sha256=
|
|
89
|
+
cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py,sha256=gjDxYWC4QZEZ4UOhGjgziggP7391dEMEe3vaslHSZ0c,25884
|
|
91
90
|
cdk_factory/stack_library/aws_lambdas/lambda_stack.py,sha256=SFbBPvvCopbyiuYtq-O5sQkFCf94Wzua6aDUXiFDSB4,26161
|
|
92
91
|
cdk_factory/stack_library/buckets/README.md,sha256=XkK3UNVtRLE7NtUvbhCOBBYUYi8hlrrSaI1s3GJVrqI,78
|
|
93
92
|
cdk_factory/stack_library/buckets/bucket_stack.py,sha256=SLoZqSffAqmeBBEVUQg54D_8Ad5UKdkjEAmKAVgAqQo,1778
|
|
94
93
|
cdk_factory/stack_library/cloudfront/__init__.py,sha256=Zfx50q4xIJ4ZEoVIzUBDTKbRE9DKDM6iyVIFhtQXvww,153
|
|
95
|
-
cdk_factory/stack_library/cloudfront/cloudfront_stack.py,sha256=
|
|
96
|
-
cdk_factory/stack_library/code_artifact/code_artifact_stack.py,sha256=
|
|
97
|
-
cdk_factory/stack_library/cognito/cognito_stack.py,sha256=
|
|
98
|
-
cdk_factory/stack_library/dynamodb/dynamodb_stack.py,sha256
|
|
94
|
+
cdk_factory/stack_library/cloudfront/cloudfront_stack.py,sha256=7cYPqoQyiXH6r3j9jp9oLXv1ZDixeCYPAXJtTOmagPc,32309
|
|
95
|
+
cdk_factory/stack_library/code_artifact/code_artifact_stack.py,sha256=o86cmC_ZV82z-K7DoAR0u1nAieoTi-vxRF01tyJn-9M,5297
|
|
96
|
+
cdk_factory/stack_library/cognito/cognito_stack.py,sha256=3tjKCNcIwXZn7fd4EDQdY6H9m6CnZohI4uTQ4TpacRQ,25327
|
|
97
|
+
cdk_factory/stack_library/dynamodb/dynamodb_stack.py,sha256=-_Ij1zXIxUuZIWgdevam_1vD3LEJ6pFs9U0hmw0KwIw,6743
|
|
99
98
|
cdk_factory/stack_library/ecr/README.md,sha256=xw2wPx9WN03Y4BBwqvbi9lAFGNyaD1FUNpqxVJX14Oo,179
|
|
100
|
-
cdk_factory/stack_library/ecr/ecr_stack.py,sha256=
|
|
101
|
-
cdk_factory/stack_library/ecs/__init__.py,sha256=
|
|
102
|
-
cdk_factory/stack_library/ecs/ecs_cluster_stack.py,sha256=
|
|
103
|
-
cdk_factory/stack_library/ecs/ecs_service_stack.py,sha256=
|
|
99
|
+
cdk_factory/stack_library/ecr/ecr_stack.py,sha256=KLbd5WN5-ZiojsS5wJ4PX-tIL0cCylCSvXjO6sVrgWY,2102
|
|
100
|
+
cdk_factory/stack_library/ecs/__init__.py,sha256=o5vGDtD_h-gVXb3-Ysr8xUNpEcMsnmMVgZv2Pupcdow,219
|
|
101
|
+
cdk_factory/stack_library/ecs/ecs_cluster_stack.py,sha256=j0Cc7CyTK8MQDGCeZzo7XYrj1AM1hQBLH9DGXs7k-hQ,12165
|
|
102
|
+
cdk_factory/stack_library/ecs/ecs_service_stack.py,sha256=fm3Q2oeMN5JULatYFrQDfyTs58k283weQjPEuhpz1Sc,28297
|
|
103
|
+
cdk_factory/stack_library/lambda_edge/EDGE_LOG_RETENTION_TODO.md,sha256=nD49nLm5OyrZUvcGNFBy9H1MfSUOuZ7sasHNI-IO0Zk,6635
|
|
104
|
+
cdk_factory/stack_library/lambda_edge/LAMBDA_EDGE_LOG_RETENTION_BLOG.md,sha256=ymmmvZkXqAGRjfwzXmXguI1CSmyftb6mDS4Krr5C9m8,7515
|
|
104
105
|
cdk_factory/stack_library/lambda_edge/__init__.py,sha256=ByBJ_CWdc4UtTmFBZH-6pzBMNkjkdtE65AmnB0Fs6lM,156
|
|
105
|
-
cdk_factory/stack_library/lambda_edge/lambda_edge_stack.py,sha256=
|
|
106
|
+
cdk_factory/stack_library/lambda_edge/lambda_edge_stack.py,sha256=M1uQ2yU5IxstojfT21WvbUMf8twkfqXLS-gZy_Qa_w0,23447
|
|
106
107
|
cdk_factory/stack_library/load_balancer/__init__.py,sha256=wZpKw2OecLJGdF5mPayCYAEhu2H3c2gJFFIxwXftGDU,52
|
|
107
|
-
cdk_factory/stack_library/load_balancer/load_balancer_stack.py,sha256=
|
|
108
|
+
cdk_factory/stack_library/load_balancer/load_balancer_stack.py,sha256=ApW5q3SAvSJtiK0RInNljmubqXqKZU5QBAaUoeIW-pM,28287
|
|
108
109
|
cdk_factory/stack_library/monitoring/__init__.py,sha256=k1G_KDx47Aw0UugaL99PN_TKlyLK4nkJVApCaAK7GJg,153
|
|
109
110
|
cdk_factory/stack_library/monitoring/monitoring_stack.py,sha256=N_1YvEXE7fboH_S3kv_dSKZsufxMuPdFMjGzlNFpuSo,19283
|
|
110
111
|
cdk_factory/stack_library/rds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
111
|
-
cdk_factory/stack_library/rds/rds_stack.py,sha256=
|
|
112
|
+
cdk_factory/stack_library/rds/rds_stack.py,sha256=VToW-uFKAfilyhN4T8-TXaFW8f_VuXEIuUoBHvDN0Ns,14398
|
|
112
113
|
cdk_factory/stack_library/route53/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
113
|
-
cdk_factory/stack_library/route53/route53_stack.py,sha256=
|
|
114
|
+
cdk_factory/stack_library/route53/route53_stack.py,sha256=taREOw-s7i1NZcdR-za1lKkj-Cj8UPmr4BO5txS18fI,18348
|
|
114
115
|
cdk_factory/stack_library/rum/__init__.py,sha256=gUrWQdzd4rZ2J0YzAQC8PsEGAS7QgyYjB2ZCUKWasy4,90
|
|
115
|
-
cdk_factory/stack_library/rum/rum_stack.py,sha256=
|
|
116
|
+
cdk_factory/stack_library/rum/rum_stack.py,sha256=c67m0Jbyx8hx9TTx9TBBhZMDqtSK7QCqKx_Ec1t8LgY,14067
|
|
116
117
|
cdk_factory/stack_library/security_group/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
117
|
-
cdk_factory/stack_library/security_group/security_group_full_stack.py,sha256=
|
|
118
|
-
cdk_factory/stack_library/security_group/security_group_stack.py,sha256=
|
|
119
|
-
cdk_factory/stack_library/simple_queue_service/sqs_stack.py,sha256=
|
|
118
|
+
cdk_factory/stack_library/security_group/security_group_full_stack.py,sha256=Y9JYD0QpKNe11fuCPjWlV1rucX1DMm7bs8Eu4t4XDqw,12204
|
|
119
|
+
cdk_factory/stack_library/security_group/security_group_stack.py,sha256=uthk_MX2gNfA6a7gR7PjEfjov4WgTTtJ09G0cJOFWko,14168
|
|
120
|
+
cdk_factory/stack_library/simple_queue_service/sqs_stack.py,sha256=HSJgWo4Wl6nQ5rJFQXOkDTyd_6PuHhx5VyaZLVvmYM8,4891
|
|
120
121
|
cdk_factory/stack_library/vpc/__init__.py,sha256=7pIqP97Gf2AJbv9Ebp1WbQGHYhgEbWJ52L1MzeXBybA,42
|
|
121
|
-
cdk_factory/stack_library/vpc/vpc_stack.py,sha256=
|
|
122
|
-
cdk_factory/stack_library/websites/static_website_stack.py,sha256=
|
|
122
|
+
cdk_factory/stack_library/vpc/vpc_stack.py,sha256=8uFyPIhAu-4A3iclTFlOiJrEZuYu67gI5UtiDSzmFF4,14461
|
|
123
|
+
cdk_factory/stack_library/websites/static_website_stack.py,sha256=twpR9y4bxDx2GcEn0uP8PFNbsrgb8G9juZfeuHj7VqE,11433
|
|
123
124
|
cdk_factory/stages/websites/static_website_stage.py,sha256=X4fpKXkhb0zIbSHx3QyddBhVSLBryb1vf1Cg2fMTqog,755
|
|
124
125
|
cdk_factory/templates/README.md,sha256=ATBEjG6beYvbEAdLtZ_8xnxgFD5X0cgZoI_6pToqH90,2679
|
|
125
126
|
cdk_factory/templates/app.py.template,sha256=aM60x0nNV80idtCL8jm1EddY63F5tDITYOlavg-BPMU,1069
|
|
126
127
|
cdk_factory/templates/cdk.json.template,sha256=SuGz4Y6kCVMDRpJrA_AJlp0kwdENiJPVngIv1xP5bwI,3526
|
|
127
|
-
cdk_factory/utilities/api_gateway_integration_utility.py,sha256=
|
|
128
|
+
cdk_factory/utilities/api_gateway_integration_utility.py,sha256=xw7qL8lKe7bYS2Kobgv-buy_PI5PunouH4XqcYWKRag,64210
|
|
128
129
|
cdk_factory/utilities/commandline_args.py,sha256=0FiNEJFbWVN8Ct7r0VHnJEx7rhUlaRKT7R7HMNJBSTI,2216
|
|
129
130
|
cdk_factory/utilities/configuration_loader.py,sha256=z0ZdGLNbTO4_yfluB9zUh_i_Poc9qj-7oRyjMRlNkN8,1522
|
|
130
131
|
cdk_factory/utilities/docker_utilities.py,sha256=6ee9KEGsaRJWo6FqvdPtE3_L2Emp3Lc0vu2Ie3VoflI,8280
|
|
131
|
-
cdk_factory/utilities/environment_services.py,sha256=
|
|
132
|
+
cdk_factory/utilities/environment_services.py,sha256=CTuF7MvpGfvuRouS3q-WZIyjALD5E7xr96HXgIawl90,9779
|
|
132
133
|
cdk_factory/utilities/file_operations.py,sha256=fxqT0iyYZkb46lQr_XXadhFTca_1neVW0VRVkbyMmhA,9462
|
|
133
134
|
cdk_factory/utilities/git_utilities.py,sha256=7Xac8PaThc7Lmk5jtDBHaJOj-fWRT017cgZmgXkVizM,3155
|
|
134
|
-
cdk_factory/utilities/json_loading_utility.py,sha256=
|
|
135
|
+
cdk_factory/utilities/json_loading_utility.py,sha256=i6C1GJ1HhbTBJRmNP8nEM6OeMZYjE9_eaVL78HHLYSE,10818
|
|
135
136
|
cdk_factory/utilities/lambda_function_utilities.py,sha256=S1GvBsY_q2cyUiaud3HORJMnLhI5cRi31fbeaktY-_Q,15826
|
|
136
137
|
cdk_factory/utilities/os_execute.py,sha256=5Op0LY_8Y-pUm04y1k8MTpNrmQvcLmQHPQITEP7EuSU,1019
|
|
137
138
|
cdk_factory/utils/api_gateway_utilities.py,sha256=If7Xu5s_UxmuV-kL3JkXxPLBdSVUKoLtohm0IUFoiV8,4378
|
|
139
|
+
cdk_factory/validation/config_validator.py,sha256=Pb0TkLiPFzUplBOgMorhRCVm08vEzZhRU5xXCDTa5CA,17602
|
|
138
140
|
cdk_factory/workload/workload_factory.py,sha256=yDI3cRhVI5ELNDcJPLpk9UY54Uind1xQoV3spzT4z7E,6068
|
|
139
|
-
cdk_factory-0.
|
|
140
|
-
cdk_factory-0.
|
|
141
|
-
cdk_factory-0.
|
|
142
|
-
cdk_factory-0.
|
|
143
|
-
cdk_factory-0.
|
|
141
|
+
cdk_factory-0.20.0.dist-info/METADATA,sha256=l2SwDxDcR0VN1osKobdG7REFs9BP0zjnEpmMV1s--Gs,2451
|
|
142
|
+
cdk_factory-0.20.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
143
|
+
cdk_factory-0.20.0.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
|
|
144
|
+
cdk_factory-0.20.0.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
|
|
145
|
+
cdk_factory-0.20.0.dist-info/RECORD,,
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Geek Cafe, LLC
|
|
3
|
-
Maintainers: Eric Wilson
|
|
4
|
-
MIT License. See Project Root for the license information.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
"""
|
|
8
|
-
Enhanced SSM Parameter Mixin for CDK Factory
|
|
9
|
-
"""
|
|
10
|
-
|
|
11
|
-
import os
|
|
12
|
-
from typing import Dict, Any, Optional, List
|
|
13
|
-
from aws_cdk import aws_ssm as ssm
|
|
14
|
-
from constructs import Construct
|
|
15
|
-
from aws_lambda_powertools import Logger
|
|
16
|
-
from cdk_factory.configurations.enhanced_ssm_config import EnhancedSsmConfig, SsmParameterDefinition
|
|
17
|
-
from cdk_factory.configurations.enhanced_base_config import EnhancedBaseConfig
|
|
18
|
-
from cdk_factory.interfaces.live_ssm_resolver import LiveSsmResolver
|
|
19
|
-
|
|
20
|
-
logger = Logger(service="EnhancedSsmParameterMixin")
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class EnhancedSsmParameterMixin:
|
|
24
|
-
"""
|
|
25
|
-
Enhanced SSM parameter mixin with auto-discovery and flexible patterns.
|
|
26
|
-
|
|
27
|
-
This mixin extends the original SsmParameterMixin to support:
|
|
28
|
-
- Auto-discovery of parameters based on resource types
|
|
29
|
-
- Flexible pattern templates with environment variable support
|
|
30
|
-
- Backward compatibility with existing configurations
|
|
31
|
-
- Enhanced error handling and logging
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
def setup_enhanced_ssm_integration(
|
|
35
|
-
self,
|
|
36
|
-
scope: Construct,
|
|
37
|
-
config,
|
|
38
|
-
resource_type: str = None,
|
|
39
|
-
resource_name: str = None,
|
|
40
|
-
workload_config = None,
|
|
41
|
-
deployment_config = None # Deprecated, for backward compatibility
|
|
42
|
-
):
|
|
43
|
-
"""
|
|
44
|
-
Setup enhanced SSM integration for a resource.
|
|
45
|
-
|
|
46
|
-
Architecture: One workload deployment = One environment
|
|
47
|
-
Environment should be defined at workload level.
|
|
48
|
-
|
|
49
|
-
Args:
|
|
50
|
-
scope: The CDK construct scope
|
|
51
|
-
config: Configuration object with SSM settings
|
|
52
|
-
resource_type: Type of resource (e.g., 'api_gateway', 'cognito', 'dynamodb')
|
|
53
|
-
resource_name: Name of the resource instance
|
|
54
|
-
workload_config: Workload configuration (PRIMARY - contains environment)
|
|
55
|
-
deployment_config: Deployment configuration (DEPRECATED - for backward compatibility)
|
|
56
|
-
"""
|
|
57
|
-
config_dict = config if isinstance(config, dict) else config.dictionary
|
|
58
|
-
workload_dict = workload_config.dictionary if hasattr(workload_config, 'dictionary') else (workload_config or {})
|
|
59
|
-
deployment_dict = deployment_config.dictionary if hasattr(deployment_config, 'dictionary') else (deployment_config or {})
|
|
60
|
-
|
|
61
|
-
self.enhanced_ssm_config = EnhancedSsmConfig(
|
|
62
|
-
config=config_dict,
|
|
63
|
-
resource_type=resource_type or "unknown",
|
|
64
|
-
resource_name=resource_name or "default",
|
|
65
|
-
workload_config=workload_dict,
|
|
66
|
-
deployment_config=deployment_dict # For backward compatibility
|
|
67
|
-
)
|
|
68
|
-
self.scope = scope
|
|
69
|
-
|
|
70
|
-
# Initialize live SSM resolver if configured
|
|
71
|
-
self.live_resolver = LiveSsmResolver(config_dict)
|
|
72
|
-
if self.live_resolver.enabled:
|
|
73
|
-
logger.info(f"Live SSM resolution enabled for {resource_type}/{resource_name}")
|
|
74
|
-
|
|
75
|
-
def auto_export_resources(self, resource_values: Dict[str, Any], context: Dict[str, Any] = None) -> Dict[str, str]:
|
|
76
|
-
"""
|
|
77
|
-
Automatically export resources based on enhanced configuration.
|
|
78
|
-
|
|
79
|
-
Args:
|
|
80
|
-
resource_values: Dictionary of resource values to export
|
|
81
|
-
context: Additional context variables for template formatting
|
|
82
|
-
|
|
83
|
-
Returns:
|
|
84
|
-
Dictionary mapping attribute names to SSM parameter paths
|
|
85
|
-
"""
|
|
86
|
-
if not hasattr(self, 'enhanced_ssm_config') or not self.enhanced_ssm_config.enabled:
|
|
87
|
-
return {}
|
|
88
|
-
|
|
89
|
-
exported_params = {}
|
|
90
|
-
export_definitions = self.enhanced_ssm_config.get_export_definitions()
|
|
91
|
-
|
|
92
|
-
logger.info(f"Auto-exporting {len(export_definitions)} parameters for {self.enhanced_ssm_config.resource_type}")
|
|
93
|
-
|
|
94
|
-
for definition in export_definitions:
|
|
95
|
-
attr = definition.attribute
|
|
96
|
-
ssm_path = definition.path
|
|
97
|
-
|
|
98
|
-
if attr in resource_values:
|
|
99
|
-
value = resource_values[attr]
|
|
100
|
-
if value is not None:
|
|
101
|
-
try:
|
|
102
|
-
param = self._create_enhanced_ssm_parameter(
|
|
103
|
-
ssm_path,
|
|
104
|
-
value,
|
|
105
|
-
definition.description or f"{attr} for {self.enhanced_ssm_config.resource_name}",
|
|
106
|
-
definition.parameter_type
|
|
107
|
-
)
|
|
108
|
-
exported_params[attr] = ssm_path
|
|
109
|
-
logger.info(f"Exported {attr} -> {ssm_path}")
|
|
110
|
-
except Exception as e:
|
|
111
|
-
logger.error(f"Failed to export {attr} to {ssm_path}: {e}")
|
|
112
|
-
else:
|
|
113
|
-
logger.warning(f"Attribute {attr} not found in resource values")
|
|
114
|
-
|
|
115
|
-
return exported_params
|
|
116
|
-
|
|
117
|
-
def auto_import_resources(self, context: Dict[str, Any] = None) -> Dict[str, Any]:
|
|
118
|
-
"""
|
|
119
|
-
Automatically import resources based on enhanced configuration.
|
|
120
|
-
|
|
121
|
-
Args:
|
|
122
|
-
context: Additional context variables for template formatting
|
|
123
|
-
|
|
124
|
-
Returns:
|
|
125
|
-
Dictionary of imported resource values
|
|
126
|
-
"""
|
|
127
|
-
if not hasattr(self, 'enhanced_ssm_config') or not self.enhanced_ssm_config.enabled:
|
|
128
|
-
logger.info("Enhanced SSM integration not enabled or configured")
|
|
129
|
-
return {}
|
|
130
|
-
|
|
131
|
-
imported_values = {}
|
|
132
|
-
import_definitions = self.enhanced_ssm_config.get_import_definitions()
|
|
133
|
-
|
|
134
|
-
logger.info(f"Auto-importing {len(import_definitions)} parameters for {self.enhanced_ssm_config.resource_type}")
|
|
135
|
-
|
|
136
|
-
for definition in import_definitions:
|
|
137
|
-
try:
|
|
138
|
-
value = self._import_enhanced_ssm_parameter(definition.path, definition.attribute)
|
|
139
|
-
if value:
|
|
140
|
-
imported_values[definition.attribute] = value
|
|
141
|
-
logger.info(f"Imported {definition.attribute} <- {definition.path}")
|
|
142
|
-
else:
|
|
143
|
-
logger.warning(f"No value found for {definition.attribute} at {definition.path}")
|
|
144
|
-
except Exception as e:
|
|
145
|
-
# Log warning but continue - allows for optional imports
|
|
146
|
-
logger.warning(f"Could not import {definition.attribute} from {definition.path}: {e}")
|
|
147
|
-
|
|
148
|
-
return imported_values
|
|
149
|
-
|
|
150
|
-
def _create_enhanced_ssm_parameter(self, path: str, value: Any, description: str, param_type: str = "String") -> ssm.StringParameter:
|
|
151
|
-
"""
|
|
152
|
-
Create an SSM parameter with enhanced handling.
|
|
153
|
-
|
|
154
|
-
Args:
|
|
155
|
-
path: SSM parameter path
|
|
156
|
-
value: Value to store
|
|
157
|
-
description: Parameter description
|
|
158
|
-
param_type: Parameter type (String, StringList, SecureString)
|
|
159
|
-
|
|
160
|
-
Returns:
|
|
161
|
-
Created SSM parameter
|
|
162
|
-
"""
|
|
163
|
-
# Generate a unique construct ID from the path
|
|
164
|
-
construct_id = f"ssm-param-{path.replace('/', '-').replace('_', '-')}"
|
|
165
|
-
|
|
166
|
-
# Handle different value types - use appropriate CDK constructs
|
|
167
|
-
if isinstance(value, list):
|
|
168
|
-
# For list values, use StringListParameter
|
|
169
|
-
return ssm.StringListParameter(
|
|
170
|
-
self.scope,
|
|
171
|
-
construct_id,
|
|
172
|
-
parameter_name=path,
|
|
173
|
-
string_list_value=value,
|
|
174
|
-
description=description
|
|
175
|
-
)
|
|
176
|
-
elif param_type == "SecureString":
|
|
177
|
-
# For secure strings, use L1 CfnParameter with Type=SecureString
|
|
178
|
-
return ssm.CfnParameter(
|
|
179
|
-
self.scope,
|
|
180
|
-
construct_id,
|
|
181
|
-
name=path,
|
|
182
|
-
value=str(value),
|
|
183
|
-
type="SecureString",
|
|
184
|
-
description=description
|
|
185
|
-
)
|
|
186
|
-
else:
|
|
187
|
-
# For regular strings, use StringParameter (no type parameter needed in CDK v2)
|
|
188
|
-
return ssm.StringParameter(
|
|
189
|
-
self.scope,
|
|
190
|
-
construct_id,
|
|
191
|
-
parameter_name=path,
|
|
192
|
-
string_value=str(value),
|
|
193
|
-
description=description
|
|
194
|
-
# Note: 'type' parameter removed - deprecated in CDK v2
|
|
195
|
-
)
|
|
196
|
-
|
|
197
|
-
def _import_enhanced_ssm_parameter(self, path: str, attribute: str) -> Optional[str]:
|
|
198
|
-
"""
|
|
199
|
-
Import an SSM parameter value with enhanced error handling and live resolution fallback.
|
|
200
|
-
|
|
201
|
-
Args:
|
|
202
|
-
path: SSM parameter path
|
|
203
|
-
attribute: Attribute name for logging
|
|
204
|
-
|
|
205
|
-
Returns:
|
|
206
|
-
Parameter value or None if not found
|
|
207
|
-
"""
|
|
208
|
-
try:
|
|
209
|
-
# Generate a unique construct ID from the path
|
|
210
|
-
construct_id = f"imported-param-{path.replace('/', '-').replace('_', '-')}"
|
|
211
|
-
|
|
212
|
-
param = ssm.StringParameter.from_string_parameter_name(
|
|
213
|
-
self.scope,
|
|
214
|
-
construct_id,
|
|
215
|
-
path
|
|
216
|
-
)
|
|
217
|
-
cdk_token_value = param.string_value
|
|
218
|
-
|
|
219
|
-
# Check if we should use live resolution for this token
|
|
220
|
-
if hasattr(self, 'live_resolver') and self.live_resolver.should_use_live_resolution(cdk_token_value):
|
|
221
|
-
live_value = self.live_resolver.resolve_parameter(path, fallback_value=None)
|
|
222
|
-
if live_value:
|
|
223
|
-
logger.info(f"Live resolved {attribute} from {path}: {live_value[:20]}...")
|
|
224
|
-
return live_value
|
|
225
|
-
else:
|
|
226
|
-
logger.warning(f"Live resolution failed for {attribute} at {path}, using CDK token")
|
|
227
|
-
|
|
228
|
-
return cdk_token_value
|
|
229
|
-
|
|
230
|
-
except Exception as e:
|
|
231
|
-
# Try live resolution as fallback if CDK parameter import fails
|
|
232
|
-
if hasattr(self, 'live_resolver') and self.live_resolver.enabled:
|
|
233
|
-
logger.info(f"CDK parameter import failed for {path}, attempting live resolution")
|
|
234
|
-
live_value = self.live_resolver.resolve_parameter(path, fallback_value=None)
|
|
235
|
-
if live_value:
|
|
236
|
-
logger.info(f"Live resolved {attribute} from {path} after CDK failure")
|
|
237
|
-
return live_value
|
|
238
|
-
|
|
239
|
-
logger.debug(f"Failed to import SSM parameter {path} for {attribute}: {e}")
|
|
240
|
-
return None
|
|
241
|
-
|
|
242
|
-
# Backward compatibility methods that delegate to enhanced versions
|
|
243
|
-
def export_resource_to_ssm(
|
|
244
|
-
self,
|
|
245
|
-
scope: Construct,
|
|
246
|
-
resource_values: Dict[str, Any],
|
|
247
|
-
config: Any,
|
|
248
|
-
resource_name: str,
|
|
249
|
-
resource_type: str = None,
|
|
250
|
-
context: Dict[str, Any] = None,
|
|
251
|
-
) -> Dict[str, ssm.StringParameter]:
|
|
252
|
-
"""
|
|
253
|
-
Export resource attributes to SSM Parameter Store (backward compatibility).
|
|
254
|
-
|
|
255
|
-
This method provides backward compatibility while leveraging enhanced functionality
|
|
256
|
-
when an EnhancedBaseConfig is provided.
|
|
257
|
-
"""
|
|
258
|
-
# If we have an enhanced config, use the new auto-export functionality
|
|
259
|
-
if isinstance(config, EnhancedBaseConfig):
|
|
260
|
-
if not hasattr(self, 'enhanced_ssm_config'):
|
|
261
|
-
self.setup_enhanced_ssm_integration(scope, config)
|
|
262
|
-
|
|
263
|
-
exported_paths = self.auto_export_resources(resource_values, context)
|
|
264
|
-
|
|
265
|
-
# Convert paths back to parameter objects for backward compatibility
|
|
266
|
-
parameters = {}
|
|
267
|
-
for attr, path in exported_paths.items():
|
|
268
|
-
# Create a mock parameter object with the path
|
|
269
|
-
parameters[f"{attr}_path"] = type('MockParam', (), {'parameter_name': path})()
|
|
270
|
-
|
|
271
|
-
return parameters
|
|
272
|
-
|
|
273
|
-
# Fall back to original implementation for non-enhanced configs
|
|
274
|
-
from .ssm_parameter_mixin import SsmParameterMixin
|
|
275
|
-
mixin = SsmParameterMixin()
|
|
276
|
-
return mixin.export_resource_to_ssm(scope, resource_values, config, resource_name, resource_type, context)
|
|
277
|
-
|
|
278
|
-
def import_resources_from_ssm(
|
|
279
|
-
self,
|
|
280
|
-
scope: Construct,
|
|
281
|
-
config: Any,
|
|
282
|
-
resource_name: str,
|
|
283
|
-
resource_type: str = None,
|
|
284
|
-
context: Dict[str, Any] = None,
|
|
285
|
-
) -> Dict[str, str]:
|
|
286
|
-
"""
|
|
287
|
-
Import resource attributes from SSM Parameter Store (backward compatibility).
|
|
288
|
-
|
|
289
|
-
This method provides backward compatibility while leveraging enhanced functionality
|
|
290
|
-
when an EnhancedBaseConfig is provided.
|
|
291
|
-
"""
|
|
292
|
-
# If we have an enhanced config, use the new auto-import functionality
|
|
293
|
-
if isinstance(config, EnhancedBaseConfig):
|
|
294
|
-
if not hasattr(self, 'enhanced_ssm_config'):
|
|
295
|
-
self.setup_enhanced_ssm_integration(scope, config)
|
|
296
|
-
|
|
297
|
-
return self.auto_import_resources(context)
|
|
298
|
-
|
|
299
|
-
# Fall back to original implementation for non-enhanced configs
|
|
300
|
-
from .ssm_parameter_mixin import SsmParameterMixin
|
|
301
|
-
mixin = SsmParameterMixin()
|
|
302
|
-
return mixin.import_resources_from_ssm(scope, config, resource_name, resource_type, context)
|
|
303
|
-
|
|
304
|
-
# Legacy method delegation for full backward compatibility
|
|
305
|
-
def export_ssm_parameter(self, scope: Construct, id: str, value: str, parameter_name: str, description: str = None, string_list_value: bool = False) -> ssm.StringParameter:
|
|
306
|
-
"""Export a value to SSM Parameter Store (legacy compatibility)."""
|
|
307
|
-
from .ssm_parameter_mixin import SsmParameterMixin
|
|
308
|
-
mixin = SsmParameterMixin()
|
|
309
|
-
return mixin.export_ssm_parameter(scope, id, value, parameter_name, description, string_list_value)
|
|
310
|
-
|
|
311
|
-
def import_ssm_parameter(self, scope: Construct, id: str, parameter_name: str, version: Optional[int] = None) -> str:
|
|
312
|
-
"""Import a value from SSM Parameter Store (legacy compatibility)."""
|
|
313
|
-
from .ssm_parameter_mixin import SsmParameterMixin
|
|
314
|
-
mixin = SsmParameterMixin()
|
|
315
|
-
return mixin.import_ssm_parameter(scope, id, parameter_name, version)
|
|
316
|
-
|
|
317
|
-
def export_ssm_parameters_from_config(self, scope: Construct, config_dict: Dict[str, Any], ssm_config: Dict[str, str], resource: str = "") -> Dict[str, ssm.StringParameter]:
|
|
318
|
-
"""Export multiple SSM parameters based on configuration (legacy compatibility)."""
|
|
319
|
-
from .ssm_parameter_mixin import SsmParameterMixin
|
|
320
|
-
mixin = SsmParameterMixin()
|
|
321
|
-
return mixin.export_ssm_parameters_from_config(scope, config_dict, ssm_config, resource)
|