Skip to content

Commit

Permalink
Add aarch64 ASG capacity provider
Browse files Browse the repository at this point in the history
  • Loading branch information
farski committed Jan 8, 2025
1 parent 2884081 commit a8346f6
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions spire/templates/shared-ecs/asg-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Parameters:

Conditions:
IsProduction: !Equals [!Ref EnvironmentType, Production]
# IsStaging: !Equals [!Ref EnvironmentType, Staging]
IsStaging: !Equals [!Ref EnvironmentType, Staging]
IsPrimaryRegion: !Equals [!Ref RegionMode, Primary]
KeepAsgAlive: !And [!Condition IsProduction, !Condition IsPrimaryRegion]
EnableNestedChangeSetScrubbingResources: !Equals [!Ref NestedChangeSetScrubbingResourcesState, Enabled]
Expand Down Expand Up @@ -400,44 +400,44 @@ Resources:
- !Ref VpcPublicSubnet2Id
- !Ref VpcPublicSubnet3Id

# DefaultCapacityProvider:
# Type: AWS::ECS::CapacityProvider
# Properties:
# AutoScalingGroupProvider:
# AutoScalingGroupArn: !Ref Asg
# ManagedDraining: ENABLED
# ManagedScaling:
# InstanceWarmupPeriod: 180
# MaximumScalingStepSize: 10
# MinimumScalingStepSize: 1
# Status: ENABLED
# TargetCapacity: !If
# - IsProduction
# - 100
# - 100
# ManagedTerminationProtection: DISABLED
# Tags:
# - { Key: prx:meta:tagging-version, Value: "2021-04-07" }
# - { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
# - { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId }
# - { Key: prx:cloudformation:root-stack-name, Value: !Ref RootStackName }
# - { Key: prx:cloudformation:root-stack-id, Value: !Ref RootStackId }
# - { Key: prx:ops:environment, Value: !Ref EnvironmentType }
# - { Key: prx:dev:application, Value: Common }
# ClusterCapacityProviderAssociation:
# Type: AWS::ECS::ClusterCapacityProviderAssociations
# Properties:
# Cluster: !Ref EcsClusterName
# CapacityProviders:
# - !Ref DefaultCapacityProvider
# - !If [IsStaging, FARGATE, !Ref "AWS::NoValue"]
# - !If [IsStaging, FARGATE_SPOT, !Ref "AWS::NoValue"]
# DefaultCapacityProviderStrategy:
# # With only one default capacity provider, the base and weight won't
# # factor into scheduling; everything will be even within the ASG
# - Base: 0
# Weight: 1
# CapacityProvider: !Ref DefaultCapacityProvider
DefaultCapacityProvider:
Type: AWS::ECS::CapacityProvider
Properties:
AutoScalingGroupProvider:
AutoScalingGroupArn: !Ref Asg
ManagedDraining: ENABLED
ManagedScaling:
InstanceWarmupPeriod: 180
MaximumScalingStepSize: 10
MinimumScalingStepSize: 1
Status: ENABLED
TargetCapacity: !If
- IsProduction
- 100
- 100
ManagedTerminationProtection: DISABLED
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
- { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId }
- { Key: prx:cloudformation:root-stack-name, Value: !Ref RootStackName }
- { Key: prx:cloudformation:root-stack-id, Value: !Ref RootStackId }
- { Key: prx:ops:environment, Value: !Ref EnvironmentType }
- { Key: prx:dev:application, Value: Common }
ClusterCapacityProviderAssociation:
Type: AWS::ECS::ClusterCapacityProviderAssociations
Properties:
Cluster: !Ref EcsClusterName
CapacityProviders:
- !Ref DefaultCapacityProvider
- !If [IsStaging, FARGATE, !Ref "AWS::NoValue"]
- !If [IsStaging, FARGATE_SPOT, !Ref "AWS::NoValue"]
DefaultCapacityProviderStrategy:
# With only one default capacity provider, the base and weight won't
# factor into scheduling; everything will be even within the ASG
- Base: 0
Weight: 1
CapacityProvider: !Ref DefaultCapacityProvider

Outputs:
AsgName:
Expand Down

0 comments on commit a8346f6

Please sign in to comment.