Skip to content

refactor(cloudformation): group template Mappings by concern to match funfair-treasury-reporting #435

Open

Description

@credfeto

Request

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:

Group Keys
Network ClusterName, SecurityGroupIds (string list), SubnetIds (string list), VpcId
Task Cpu, Memory, ExecutionRole, ContainerOwner, SecretsManagerArn, ContainerPort
Service DesiredCount, MinimumHealthPercent, MaximumHealthPercent
Settings 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions