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

Fix Unresolved dependencies [WebInstanceType] #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions templates/00-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,8 @@ Resources:
!Ref rdsInstanceSecret
DomainName:
!Ref DomainName
InstanceType:
!Ref WebInstanceType
MoodleLocale:
!Ref MoodleLocale
ProjectName:
Expand Down
21 changes: 13 additions & 8 deletions templates/03-pipelinehelper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@ Parameters:
Description: Specifies the TGZ Moodle direct download URL
Type: String

Mappings:
InstanceTypeMap:
t4g: { UseGraviton2Ami: "true" }
c6g: { UseGraviton2Ami: "true" }
c7g: { UseGraviton2Ami: "true" }
m6g: { UseGraviton2Ami: "true" }
m7g: { UseGraviton2Ami: "true" }
r6g: { UseGraviton2Ami: "true" }
r7g: { UseGraviton2Ami: "true" }
other: { UseGraviton2Ami: "false" }

Conditions:
NumberOfSubnets1:
!Equals [ 1, !Ref NumberOfSubnets ]
Expand All @@ -196,14 +207,8 @@ Conditions:
- !Condition NumberOfSubnets2
- !Condition NumberOfSubnets3
Subnet2: !Condition NumberOfSubnets3
UsingGraviton2Ami: !Or
- !Equals ["t4",!Select [0, !Split [ "g.", !Ref WebInstanceType]]]
- !Equals ["c6",!Select [0, !Split [ "g.", !Ref WebInstanceType]]]
- !Equals ["c7",!Select [0, !Split [ "g.", !Ref WebInstanceType]]]
- !Equals ["m6",!Select [0, !Split [ "g.", !Ref WebInstanceType]]]
- !Equals ["m7",!Select [0, !Split [ "g.", !Ref WebInstanceType]]]
- !Equals ["r6",!Select [0, !Split [ "g.", !Ref WebInstanceType]]]
- !Equals ["r7",!Select [0, !Split [ "g.", !Ref WebInstanceType]]]
UsingGraviton2Ami:
!Equals [!FindInMap [InstanceTypeMap, !Select [0, !Split [".", !Ref InstanceType]], UseGraviton2Ami], "true"]

Resources:
########################### TODO put this in the codepipeline template
Expand Down