Skip to content

Commit 5614e92

Browse files
committed
Fixed some linting issues
1 parent 1eb1647 commit 5614e92

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

cdk/cdk/code_artifact_proxy.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import aws_cdk as cdk
22
from aws_cdk import (
3-
Duration,
43
Stack,
54
aws_ecs as ecs,
65
aws_ecs_patterns as ecs_patterns,
@@ -10,15 +9,15 @@
109
aws_elasticloadbalancingv2 as elbv2,
1110
aws_certificatemanager as acm,
1211
aws_iam as iam,
13-
aws_kms as kms,
1412
)
1513
from constructs import Construct
1614

1715

1816
class CodeArtifactProxy(Stack):
17+
"""A CDK stack that creates the resources required for a Code Artifact Proxy (deployed as a load balanced fargate service)"""
18+
1919
__ecs_service: ecs_patterns.ApplicationLoadBalancedFargateService = None
2020
vpc: ec2.Vpc = None
21-
__role_attached: bool = False
2221

2322
domain_name: str = None
2423
repository_name: str = None
@@ -78,7 +77,6 @@ def attach_iam_role(self):
7877
},
7978
)
8079
)
81-
self.__role_attached = True
8280

8381
def create_code_artifact(self):
8482
"""Creates a CodeArtifact repository"""
@@ -125,7 +123,9 @@ def create_loadbalanced_fargate(
125123
raise Exception(
126124
"Both certificate_arn and certificate_ssm_parameter cannot be set"
127125
)
128-
elif certificate_arn:
126+
127+
# Resolve the CDK certificate object via the certificate ARN or SSM parameter value
128+
if certificate_arn:
129129
certificate = acm.Certificate.from_certificate_arn(
130130
self, id="acm_certificate", certificate_arn=certificate_arn
131131
)

0 commit comments

Comments
 (0)