You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(cloudformation): group template Mappings by concern to match funfair-treasury-reporting #435
The repository owner, in live chat while working on funfair-tech/funfair-treasury-reporting#3900:
q21 yes
actually Q21 is the other way round!
BuildBot's CloudFormation template should adopt the grouped Mappings.Deployment.* layout that funfair-tech/funfair-treasury-reporting uses (#3930 / PR #3955), not the other way round.
Problem
BuildBot's cloudformation.json (#427, #433) keeps every setting in one flat Mappings.Settings.Values block, with keys named after the old parameters (TaskDefinitionCPU, TaskDefinitionMemory, ECSClusterName, TaskExecutionRoleArn, SecretsManagerArn, LogRetentionInDays and so on). The treasury templates group them by concern under Mappings.Deployment:
Debug, LogRetentionInDays (and other app settings)
LoadBalancer
ListenerArn
Every value is read with Fn::FindInMap: ["Deployment", <Group>, <Key>]. See memory/code-organisation.instructions.md ("Template Settings") in funfair-treasury-reporting.
Proposed change
Restructure Mappings.Settings.Values in cloudformation.json into Mappings.Deployment.<Group>.<Key> following the treasury layout. Put the BuildBot-only settings (API Gateway, Route 53, VPC Link, throttling) in suitably named groups.
Update every Fn::FindInMap to match. Resolved values must be unchanged.
Update the README and AI memory to match, and add a changelog entry.
BuildBot-only groups: ApiGateway (CertificateArn, ThrottlingBurstLimit, ThrottlingRateLimit) and Dns (HostedZoneName).
The security group and subnet values become real string lists, so the Fn::Split wrappers around those lookups are removed (as the treasury template does). Every other lookup changes only its map name, group and key. Resolved values stay identical.
Test strategy
Confirm the JSON parses and that every Fn::FindInMap resolves to an existing group and key.
Compare old and new resolved values (the comma-split lists must equal the new lists).
Run cfn-lint if available, and the existing dotnet build and tests to confirm nothing else reads the template.
Assumptions
a. The AI memory file named in the issue (memory/code-organisation.instructions.md) lives in funfair-treasury-reporting. BuildBot has no equivalent file, so only the README is updated.
b. List-valued mapping entries work with Fn::FindInMap (the treasury template already relies on this).
c. Group and key names for BuildBot-only settings (ApiGateway, Dns, and where VpcLinkEgressCidr and InternalAlbServerName sit) are my choice.
Open questions
Q1. BuildBot has no AI memory file to update. Should one be created (for example a "Template Settings" section)? I will proceed without creating one unless told otherwise.
Activity
dnyw4l3n13 commentedon Oct 31, 2026
Implementation Plan
Files to change
cloudformation.json- replaceMappings.Settings.ValueswithMappings.Deployment.<Group>.<Key>and update all 33Fn::FindInMaplookupsREADME.md- document the groupedDeploymentmapping in the Deployment sectionCHANGELOG.md- add an entry via the changelog toolApproach
Split the flat block into groups, matching funfair-treasury-reporting where a key exists there:
Network:ClusterName(was ECSClusterName),SecurityGroupIds(string list),SubnetIds(string list),VpcId, plusVpcLinkEgressCidr.Task:Cpu,Memory,ExecutionRole,ContainerOwner,SecretsManagerArn,ContainerPort.Service:DesiredCount,MinimumHealthPercent,MaximumHealthPercent.Settings:LogRetentionInDays.LoadBalancer:ListenerArn,InternalAlbServerName.ApiGateway(CertificateArn,ThrottlingBurstLimit,ThrottlingRateLimit) andDns(HostedZoneName).The security group and subnet values become real string lists, so the
Fn::Splitwrappers around those lookups are removed (as the treasury template does). Every other lookup changes only its map name, group and key. Resolved values stay identical.Test strategy
Fn::FindInMapresolves to an existing group and key.Assumptions
a. The AI memory file named in the issue (
memory/code-organisation.instructions.md) lives in funfair-treasury-reporting. BuildBot has no equivalent file, so only the README is updated.b. List-valued mapping entries work with
Fn::FindInMap(the treasury template already relies on this).c. Group and key names for BuildBot-only settings (
ApiGateway,Dns, and whereVpcLinkEgressCidrandInternalAlbServerNamesit) are my choice.Open questions
Q1. BuildBot has no AI memory file to update. Should one be created (for example a "Template Settings" section)? I will proceed without creating one unless told otherwise.