Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IT-3184] parameterize throughtput mode #244

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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