File tree Expand file tree Collapse file tree
infrastructure/terraform/components/dl
lambdas/mesh-download/mesh_download
utils/event-publisher-py/event_publisher Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,8 +37,6 @@ module "mesh_download" {
3737 log_subscription_role_arn = local. acct . log_subscription_role_arn
3838
3939 lambda_env_vars = {
40- CERTIFICATE_EXPIRY_METRIC_NAME = " mesh-download-client-certificate-near-expiry"
41- CERTIFICATE_EXPIRY_METRIC_NAMESPACE = " dl-mesh-download"
4240 DOWNLOAD_METRIC_NAME = " mesh-download-successful-downloads"
4341 DOWNLOAD_METRIC_NAMESPACE = " dl-mesh-download"
4442 ENVIRONMENT = var.environment
Original file line number Diff line number Diff line change 99 "ssm_senders_prefix" : "SSM_SENDERS_PREFIX" ,
1010 "ssm_mesh_prefix" : "SSM_MESH_PREFIX" ,
1111 "environment" : "ENVIRONMENT" ,
12- "certificate_expiry_metric_name" : "CERTIFICATE_EXPIRY_METRIC_NAME" ,
13- "certificate_expiry_metric_namespace" : "CERTIFICATE_EXPIRY_METRIC_NAMESPACE" ,
1412 "download_metric_name" : "DOWNLOAD_METRIC_NAME" ,
1513 "download_metric_namespace" : "DOWNLOAD_METRIC_NAMESPACE" ,
1614 "event_publisher_event_bus_arn" : "EVENT_PUBLISHER_EVENT_BUS_ARN" ,
Original file line number Diff line number Diff line change @@ -169,12 +169,13 @@ def build_mesh_client(self):
169169 )
170170
171171 # Use real MESH client
172- report_expiry_time (
173- self .client_cert ,
174- self .certificate_expiry_metric_name ,
175- self .certificate_expiry_metric_namespace ,
176- self .environment
177- )
172+ if self .certificate_expiry_metric_name and self .certificate_expiry_metric_namespace :
173+ report_expiry_time (
174+ self .client_cert ,
175+ self .certificate_expiry_metric_name ,
176+ self .certificate_expiry_metric_namespace ,
177+ self .environment
178+ )
178179
179180 return mesh_client .MeshClient (
180181 self .lookup_endpoint (self .mesh_endpoint ),
You can’t perform that action at this time.
0 commit comments