Skip to content

Commit e8edb30

Browse files
committed
try passing params to cdk deploy
1 parent 0bce0ca commit e8edb30

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.github/actions/deploy-hyp3/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,8 @@ runs:
117117
DISTRIBUTION_URL='${{ inputs.DISTRIBUTION_URL}}'
118118
119119
cdk diff
120-
cdk deploy --require-approval=never
120+
cdk deploy \
121+
--require-approval=never \
122+
--parameters \
123+
AmiId='${{ inputs.AMI_ID }}' \
124+
DefaultMaxvCpus='${{ inputs.DEFAULT_MAX_VCPUS }}'

apps/main-cf.yml.j2

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ Parameters:
5252
- true
5353

5454
AmiId:
55-
# FIXME: retrieve AmiId from ssm parameter store
56-
#Type: AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>
57-
#Default: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
58-
Type: AWS::EC2::Image::Id
55+
Type: AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>
56+
Default: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
5957

6058
DefaultMaxvCpus:
6159
Description: Default maximum size for the AWS Batch compute environment

cdk_app/hyp3_stack.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import aws_cdk as cdk
44
from aws_cdk import cloudformation_include as cfn_inc
5-
from aws_cdk import aws_ssm as ssm
65
from constructs import Construct
76

87

@@ -20,11 +19,9 @@ def __init__(self, scope: Construct, id: str, **kwargs) -> None:
2019
'AuthPublicKey': os.environ['AUTH_PUBLIC_KEY'],
2120
'DefaultCreditsPerUser': os.environ['DEFAULT_CREDITS_PER_USER'],
2221
'DefaultApplicationStatus': os.environ['DEFAULT_APPLICATION_STATUS'],
23-
'DefaultMaxvCpus': os.environ['DEFAULT_MAX_VCPUS'],
2422
'ExpandedMaxvCpus': os.environ['EXPANDED_MAX_VCPUS'],
2523
'MonthlyBudget': os.environ['MONTHLY_BUDGET'],
2624
'RequiredSurplus': os.environ['REQUIRED_SURPLUS'],
27-
'AmiId': ssm.StringParameter.from_string_parameter_name(self, 'AmiId', os.environ['AMI_ID']).string_value,
2825
'InstanceTypes': os.environ['INSTANCE_TYPES'].split(','),
2926
}
3027
if os.environ['SECURITY_ENVIRONMENT'] != 'EDC':

0 commit comments

Comments
 (0)