Skip to content

Commit

Permalink
Merge pull request #244 from zaro0508/it-3184
Browse files Browse the repository at this point in the history
[IT-3184] parameterize throughtput mode
  • Loading branch information
thomasyu888 authored Oct 6, 2023
2 parents 0fd9010 + 60f47bd commit e5e5e46
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/infra-dev/nextflow-efs-file-system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ parameters:
SubnetId: !stack_output_external nextflow-ecs-cluster::EcsAutoScalingGroupSubnetId
EcsSecurityGroupId: !stack_output_external nextflow-ecs-security-group::SecurityGroupId
NextflowTowerConfigBucketArn: !stack_output_external nextflow-tower-config-dev::BucketArn
ThroughputMode: provisioned

stack_tags:
{{stack_group_config.default_stack_tags}}
2 changes: 2 additions & 0 deletions config/infra-prod/nextflow-efs-file-system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ parameters:
SubnetId: !stack_output_external nextflow-ecs-cluster::EcsAutoScalingGroupSubnetId
EcsSecurityGroupId: !stack_output_external nextflow-ecs-security-group::SecurityGroupId
NextflowTowerConfigBucketArn: !stack_output_external nextflow-tower-config::BucketArn
ThroughputMode: provisioned
ProvisionedThroughputInMibps: 1024

stack_tags:
{{stack_group_config.default_stack_tags}}
23 changes: 21 additions & 2 deletions templates/nextflow-efs-file-system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@ Parameters:
Type: String
Description: ARN of the S3 bucket where the tower config is stored

ThroughputMode:
Type: String
AllowedValues:
- bursting
- elastic
- provisioned
Default: bursting
Description: The throughput mode for the EFS file system

ProvisionedThroughputInMibps:
Type: Number
MinValue: 1
MaxValue: 3414
Default: 200
Description: The throughput in MiBps for the EFS file system

Conditions:
ThroughputModeIsProvisioned: !Equals [ "provisioned", !Ref ThroughputMode ]

Resources:

FileSystem:
Expand All @@ -28,8 +47,8 @@ Resources:
BackupPolicy:
Status: DISABLED
Encrypted: true
ThroughputMode: provisioned
ProvisionedThroughputInMibps: 1024
ThroughputMode: !Ref ThroughputMode
ProvisionedThroughputInMibps: !If [ ThroughputModeIsProvisioned, !Ref ProvisionedThroughputInMibps, !Ref "AWS::NoValue" ]

SecurityGroup:
Type: AWS::EC2::SecurityGroup
Expand Down

0 comments on commit e5e5e46

Please sign in to comment.