@radicaltools/mcp 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/README.md +41 -23
  2. package/dist/{chunk-OGN3UW2D.js → chunk-2SZDTOYJ.js} +727 -89
  3. package/dist/{elkLayout-S62RLGTO.js → elkLayout-VYJDCCIT.js} +1 -1
  4. package/dist/hub-catalogue/concern/concern-api-collections.radical +1136 -0
  5. package/dist/hub-catalogue/concern/concern-api-errors.radical +1180 -0
  6. package/dist/hub-catalogue/concern/concern-api-evolution.radical +1174 -0
  7. package/dist/hub-catalogue/concern/concern-api-idempotency.radical +1218 -0
  8. package/dist/hub-catalogue/concern/concern-api-resource-design.radical +1102 -0
  9. package/dist/hub-catalogue/concern/concern-api-style-guide.radical +1210 -0
  10. package/dist/hub-catalogue/concern/concern-architecture-style.radical +1268 -0
  11. package/dist/hub-catalogue/concern/concern-audit-trail.radical +1096 -0
  12. package/dist/hub-catalogue/concern/concern-authentication.radical +895 -0
  13. package/dist/hub-catalogue/concern/concern-authorization.radical +1686 -0
  14. package/dist/hub-catalogue/concern/concern-availability.radical +1028 -0
  15. package/dist/hub-catalogue/concern/concern-backend-stack.radical +1037 -0
  16. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +1560 -0
  17. package/dist/hub-catalogue/concern/concern-caching.radical +1294 -0
  18. package/dist/hub-catalogue/concern/concern-capacity.radical +915 -0
  19. package/dist/hub-catalogue/concern/concern-code-documentation.radical +1397 -0
  20. package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +1409 -0
  21. package/dist/hub-catalogue/concern/concern-code-review-branching.radical +1416 -0
  22. package/dist/hub-catalogue/concern/concern-code-style.radical +1058 -0
  23. package/dist/hub-catalogue/concern/concern-communication-style.radical +1508 -0
  24. package/dist/hub-catalogue/concern/concern-data-classification.radical +970 -0
  25. package/dist/hub-catalogue/concern/concern-data-consistency.radical +1112 -0
  26. package/dist/hub-catalogue/concern/concern-data-store.radical +1282 -0
  27. package/dist/hub-catalogue/concern/concern-decomposition.radical +1318 -0
  28. package/dist/hub-catalogue/concern/concern-definition-of-done.radical +1214 -0
  29. package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +966 -0
  30. package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +1345 -0
  31. package/dist/hub-catalogue/concern/concern-deployment.radical +1203 -0
  32. package/dist/hub-catalogue/concern/concern-encryption.radical +1318 -0
  33. package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +1197 -0
  34. package/dist/hub-catalogue/concern/concern-eu-dora.radical +1321 -0
  35. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +1647 -0
  36. package/dist/hub-catalogue/concern/concern-incident-management.radical +1204 -0
  37. package/dist/hub-catalogue/concern/concern-infrastructure.radical +2183 -0
  38. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +1116 -0
  39. package/dist/hub-catalogue/concern/concern-messaging.radical +973 -0
  40. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +867 -0
  41. package/dist/hub-catalogue/concern/concern-observability.radical +997 -0
  42. package/dist/hub-catalogue/concern/concern-operational-readiness.radical +1249 -0
  43. package/dist/hub-catalogue/concern/concern-personal-data.radical +1949 -0
  44. package/dist/hub-catalogue/concern/concern-quality-priorities.radical +1091 -0
  45. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +1445 -0
  46. package/dist/hub-catalogue/concern/concern-release-versioning.radical +1358 -0
  47. package/dist/hub-catalogue/concern/concern-retention.radical +1399 -0
  48. package/dist/hub-catalogue/concern/concern-secrets.radical +1284 -0
  49. package/dist/hub-catalogue/concern/concern-secure-coding.radical +1379 -0
  50. package/dist/hub-catalogue/concern/concern-secure-development.radical +1245 -0
  51. package/dist/hub-catalogue/concern/concern-security-detection.radical +1153 -0
  52. package/dist/hub-catalogue/concern/concern-supply-chain.radical +1386 -0
  53. package/dist/hub-catalogue/concern/concern-technical-debt.radical +1450 -0
  54. package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +1145 -0
  55. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +1440 -0
  56. package/dist/hub-catalogue/concern/concern-test-strategy.radical +1212 -0
  57. package/dist/hub-catalogue/concern/concern-threat-modelling.radical +1143 -0
  58. package/dist/index.js +10321 -3964
  59. package/package.json +1 -1
  60. package/dist/hub-catalogue/adr/adr-api-versioning.radical +0 -53
  61. package/dist/hub-catalogue/adr/adr-auth-strategy.radical +0 -53
  62. package/dist/hub-catalogue/adr/adr-caching-strategy.radical +0 -59
  63. package/dist/hub-catalogue/adr/adr-data-consistency-model.radical +0 -40
  64. package/dist/hub-catalogue/adr/adr-data-store.radical +0 -47
  65. package/dist/hub-catalogue/adr/adr-deployment-strategy.radical +0 -53
  66. package/dist/hub-catalogue/adr/adr-event-schema-evolution.radical +0 -53
  67. package/dist/hub-catalogue/adr/adr-integration-style.radical +0 -50
  68. package/dist/hub-catalogue/adr/adr-ledger-reconciliation-strategy.radical +0 -38
  69. package/dist/hub-catalogue/adr/adr-llm-provider-strategy.radical +0 -40
  70. package/dist/hub-catalogue/adr/adr-marketplace-payments-model.radical +0 -39
  71. package/dist/hub-catalogue/adr/adr-multi-region.radical +0 -60
  72. package/dist/hub-catalogue/adr/adr-multi-tenancy-strategy.radical +0 -41
  73. package/dist/hub-catalogue/adr/adr-observability.radical +0 -59
  74. package/dist/hub-catalogue/adr/adr-realtime-transport.radical +0 -38
  75. package/dist/hub-catalogue/adr/adr-tech-stack.radical +0 -45
  76. package/dist/hub-catalogue/adr/adr-zero-trust-network.radical +0 -40
  77. package/dist/hub-catalogue/blueprint/bp-ai-assistant-platform.radical +0 -1641
  78. package/dist/hub-catalogue/blueprint/bp-analytical-data-platform.radical +0 -1428
  79. package/dist/hub-catalogue/blueprint/bp-ecommerce-platform.radical +0 -1989
  80. package/dist/hub-catalogue/blueprint/bp-fintech-ledger-platform.radical +0 -1701
  81. package/dist/hub-catalogue/blueprint/bp-marketplace-platform.radical +0 -1792
  82. package/dist/hub-catalogue/blueprint/bp-realtime-collaboration.radical +0 -1421
  83. package/dist/hub-catalogue/blueprint/bp-saas-b2b-platform.radical +0 -1713
  84. package/dist/hub-catalogue/fitness-function/ff-accessibility-scan.radical +0 -34
  85. package/dist/hub-catalogue/fitness-function/ff-ai-eval-gate.radical +0 -52
  86. package/dist/hub-catalogue/fitness-function/ff-api-contract.radical +0 -36
  87. package/dist/hub-catalogue/fitness-function/ff-capacity-load-test.radical +0 -67
  88. package/dist/hub-catalogue/fitness-function/ff-carbon-footprint-guard.radical +0 -62
  89. package/dist/hub-catalogue/fitness-function/ff-change-failure-rate.radical +0 -45
  90. package/dist/hub-catalogue/fitness-function/ff-chaos-resilience-test.radical +0 -53
  91. package/dist/hub-catalogue/fitness-function/ff-cost-efficiency-guard.radical +0 -64
  92. package/dist/hub-catalogue/fitness-function/ff-coupling-guard.radical +0 -45
  93. package/dist/hub-catalogue/fitness-function/ff-data-integrity-check.radical +0 -51
  94. package/dist/hub-catalogue/fitness-function/ff-data-residency.radical +0 -43
  95. package/dist/hub-catalogue/fitness-function/ff-dependency-rules.radical +0 -37
  96. package/dist/hub-catalogue/fitness-function/ff-deploy-frequency.radical +0 -46
  97. package/dist/hub-catalogue/fitness-function/ff-dr-drill-success.radical +0 -52
  98. package/dist/hub-catalogue/fitness-function/ff-duplication-guard.radical +0 -53
  99. package/dist/hub-catalogue/fitness-function/ff-error-budget.radical +0 -59
  100. package/dist/hub-catalogue/fitness-function/ff-fail-safe-verification.radical +0 -34
  101. package/dist/hub-catalogue/fitness-function/ff-infra-drift.radical +0 -34
  102. package/dist/hub-catalogue/fitness-function/ff-latency-slo.radical +0 -59
  103. package/dist/hub-catalogue/fitness-function/ff-lead-time.radical +0 -44
  104. package/dist/hub-catalogue/fitness-function/ff-ledger-balance-integrity.radical +0 -45
  105. package/dist/hub-catalogue/fitness-function/ff-license-compliance.radical +0 -43
  106. package/dist/hub-catalogue/fitness-function/ff-mttr.radical +0 -45
  107. package/dist/hub-catalogue/fitness-function/ff-noisy-neighbor-guard.radical +0 -66
  108. package/dist/hub-catalogue/fitness-function/ff-sast-scan.radical +0 -35
  109. package/dist/hub-catalogue/fitness-function/ff-scale-out-verification.radical +0 -66
  110. package/dist/hub-catalogue/fitness-function/ff-security-scan.radical +0 -45
  111. package/dist/hub-catalogue/fitness-function/ff-startup-shutdown-check.radical +0 -66
  112. package/dist/hub-catalogue/fitness-function/ff-sync-convergence-test.radical +0 -45
  113. package/dist/hub-catalogue/fitness-function/ff-test-coverage.radical +0 -43
  114. package/dist/hub-catalogue/fitness-function/ff-web-vitals.radical +0 -57
  115. package/dist/hub-catalogue/pattern/pattern-anti-corruption-layer.radical +0 -88
  116. package/dist/hub-catalogue/pattern/pattern-api-gateway.radical +0 -168
  117. package/dist/hub-catalogue/pattern/pattern-bff.radical +0 -179
  118. package/dist/hub-catalogue/pattern/pattern-bulkhead.radical +0 -114
  119. package/dist/hub-catalogue/pattern/pattern-circuit-breaker.radical +0 -219
  120. package/dist/hub-catalogue/pattern/pattern-cqrs.radical +0 -195
  121. package/dist/hub-catalogue/pattern/pattern-crdt-sync.radical +0 -200
  122. package/dist/hub-catalogue/pattern/pattern-event-driven.radical +0 -210
  123. package/dist/hub-catalogue/pattern/pattern-event-sourced-ledger.radical +0 -211
  124. package/dist/hub-catalogue/pattern/pattern-hexagonal.radical +0 -196
  125. package/dist/hub-catalogue/pattern/pattern-microservices.radical +0 -262
  126. package/dist/hub-catalogue/pattern/pattern-rag-pipeline.radical +0 -213
  127. package/dist/hub-catalogue/pattern/pattern-rate-limiter.radical +0 -114
  128. package/dist/hub-catalogue/pattern/pattern-saga.radical +0 -208
  129. package/dist/hub-catalogue/pattern/pattern-sidecar.radical +0 -123
  130. package/dist/hub-catalogue/pattern/pattern-strangler-fig.radical +0 -227
  131. package/dist/hub-catalogue/pattern/pattern-transactional-outbox.radical +0 -209
  132. package/dist/hub-catalogue/requirement/req-accessibility.radical +0 -48
  133. package/dist/hub-catalogue/requirement/req-ai-autonomous-resolution.radical +0 -51
  134. package/dist/hub-catalogue/requirement/req-ai-groundedness.radical +0 -45
  135. package/dist/hub-catalogue/requirement/req-ai-human-handoff.radical +0 -46
  136. package/dist/hub-catalogue/requirement/req-alerting.radical +0 -52
  137. package/dist/hub-catalogue/requirement/req-api-response-time.radical +0 -51
  138. package/dist/hub-catalogue/requirement/req-api-standard.radical +0 -45
  139. package/dist/hub-catalogue/requirement/req-audit-logging.radical +0 -43
  140. package/dist/hub-catalogue/requirement/req-auth-response-time.radical +0 -45
  141. package/dist/hub-catalogue/requirement/req-auth.radical +0 -43
  142. package/dist/hub-catalogue/requirement/req-autoscaling.radical +0 -62
  143. package/dist/hub-catalogue/requirement/req-availability.radical +0 -50
  144. package/dist/hub-catalogue/requirement/req-backward-compatibility.radical +0 -46
  145. package/dist/hub-catalogue/requirement/req-batch-job-completion.radical +0 -50
  146. package/dist/hub-catalogue/requirement/req-carbon-efficiency.radical +0 -64
  147. package/dist/hub-catalogue/requirement/req-centralised-logging.radical +0 -45
  148. package/dist/hub-catalogue/requirement/req-ci-pipeline-time.radical +0 -43
  149. package/dist/hub-catalogue/requirement/req-code-complexity.radical +0 -43
  150. package/dist/hub-catalogue/requirement/req-config-propagation.radical +0 -45
  151. package/dist/hub-catalogue/requirement/req-data-integrity.radical +0 -35
  152. package/dist/hub-catalogue/requirement/req-data-retention.radical +0 -44
  153. package/dist/hub-catalogue/requirement/req-db-query-response.radical +0 -44
  154. package/dist/hub-catalogue/requirement/req-disaster-recovery.radical +0 -59
  155. package/dist/hub-catalogue/requirement/req-distributed-tracing.radical +0 -45
  156. package/dist/hub-catalogue/requirement/req-encryption.radical +0 -49
  157. package/dist/hub-catalogue/requirement/req-error-rate.radical +0 -45
  158. package/dist/hub-catalogue/requirement/req-error-recovery.radical +0 -34
  159. package/dist/hub-catalogue/requirement/req-event-schema-compatibility.radical +0 -37
  160. package/dist/hub-catalogue/requirement/req-fail-safe-default.radical +0 -55
  161. package/dist/hub-catalogue/requirement/req-fast-startup-graceful-shutdown.radical +0 -69
  162. package/dist/hub-catalogue/requirement/req-gdpr-erasure.radical +0 -44
  163. package/dist/hub-catalogue/requirement/req-graceful-degradation.radical +0 -39
  164. package/dist/hub-catalogue/requirement/req-health-checks.radical +0 -43
  165. package/dist/hub-catalogue/requirement/req-iac.radical +0 -36
  166. package/dist/hub-catalogue/requirement/req-idempotency.radical +0 -47
  167. package/dist/hub-catalogue/requirement/req-input-validation.radical +0 -37
  168. package/dist/hub-catalogue/requirement/req-least-privilege.radical +0 -47
  169. package/dist/hub-catalogue/requirement/req-ledger-immutability.radical +0 -38
  170. package/dist/hub-catalogue/requirement/req-mfa.radical +0 -36
  171. package/dist/hub-catalogue/requirement/req-ml-extraction-accuracy.radical +0 -42
  172. package/dist/hub-catalogue/requirement/req-onboarding-time.radical +0 -42
  173. package/dist/hub-catalogue/requirement/req-page-load-time.radical +0 -59
  174. package/dist/hub-catalogue/requirement/req-payout-latency.radical +0 -46
  175. package/dist/hub-catalogue/requirement/req-presence-latency.radical +0 -46
  176. package/dist/hub-catalogue/requirement/req-rate-limiting.radical +0 -45
  177. package/dist/hub-catalogue/requirement/req-report-generation.radical +0 -44
  178. package/dist/hub-catalogue/requirement/req-resource-efficiency.radical +0 -64
  179. package/dist/hub-catalogue/requirement/req-resource-headroom.radical +0 -53
  180. package/dist/hub-catalogue/requirement/req-resource-isolation.radical +0 -37
  181. package/dist/hub-catalogue/requirement/req-search-response-time.radical +0 -44
  182. package/dist/hub-catalogue/requirement/req-secrets-management.radical +0 -45
  183. package/dist/hub-catalogue/requirement/req-task-success-rate.radical +0 -42
  184. package/dist/hub-catalogue/requirement/req-test-coverage.radical +0 -42
  185. package/dist/hub-catalogue/requirement/req-throughput.radical +0 -55
  186. package/dist/hub-catalogue/requirement/req-vulnerability-scanning.radical +0 -52
  187. package/dist/hub-catalogue/requirement/req-zero-downtime-deploy.radical +0 -39
@@ -0,0 +1,2183 @@
1
+ {
2
+ "hub": {
3
+ "id": "concern-infrastructure",
4
+ "category": "concern",
5
+ "name": "Infrastructure",
6
+ "description": "Where and how the element runs: the hosting model and the cloud, the infrastructure as code that builds it, the environments and their parity with production, cost guardrails and drift detection.",
7
+ "tags": [
8
+ "technology",
9
+ "infrastructure",
10
+ "cloud",
11
+ "kubernetes",
12
+ "serverless",
13
+ "cdn",
14
+ "infrastructure as code",
15
+ "finops",
16
+ "drift"
17
+ ],
18
+ "requiredMetamodel": "c4-ddd-governance-builtin",
19
+ "concern": {
20
+ "id": "infrastructure",
21
+ "trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
22
+ "why": "these elements are deployed and run somewhere, so the hosting, the cloud, how the infrastructure is built and what it may cost has to be decided.",
23
+ "group": "technology"
24
+ },
25
+ "sources": [
26
+ {
27
+ "title": "The Twelve-Factor App: X. Dev/prod parity",
28
+ "url": "https://12factor.net/dev-prod-parity"
29
+ },
30
+ {
31
+ "title": "AWS Well-Architected Framework",
32
+ "url": "https://aws.amazon.com/architecture/well-architected/"
33
+ },
34
+ {
35
+ "title": "AWS Well-Architected: Serverless Applications Lens",
36
+ "url": "https://docs.aws.amazon.com/wellarchitected/latest/serverless-applications-lens/welcome.html"
37
+ },
38
+ {
39
+ "title": "Microsoft Azure Well-Architected Framework",
40
+ "url": "https://learn.microsoft.com/en-us/azure/well-architected/"
41
+ },
42
+ {
43
+ "title": "Google Cloud Architecture Framework",
44
+ "url": "https://cloud.google.com/architecture/framework"
45
+ },
46
+ {
47
+ "title": "CIS Benchmarks",
48
+ "url": "https://www.cisecurity.org/cis-benchmarks"
49
+ },
50
+ {
51
+ "title": "Kubernetes documentation: configuration best practices",
52
+ "url": "https://kubernetes.io/docs/concepts/configuration/overview/"
53
+ },
54
+ {
55
+ "title": "Terraform documentation",
56
+ "url": "https://developer.hashicorp.com/terraform/docs"
57
+ },
58
+ {
59
+ "title": "Checkov",
60
+ "url": "https://www.checkov.io/"
61
+ },
62
+ {
63
+ "title": "FinOps Framework (FinOps Foundation)",
64
+ "url": "https://www.finops.org/framework/"
65
+ },
66
+ {
67
+ "title": "Humble, Farley: Continuous Delivery",
68
+ "url": "https://continuousdelivery.com/"
69
+ },
70
+ {
71
+ "title": "Ford, Parsons, Kua, Sadalage: Building Evolutionary Architectures, 2nd ed.",
72
+ "url": "https://www.oreilly.com/library/view/building-evolutionary-architectures/9781492097532/"
73
+ }
74
+ ],
75
+ "templateParams": [
76
+ {
77
+ "key": "HOSTING",
78
+ "title": "Hosting",
79
+ "label": "How does the element run?",
80
+ "hint": "The hosting model decides how much of the platform the team runs itself, what the element may do (long requests, background work, state), and how it scales and is billed. A database's engine is hosted as the Data store pack decides.",
81
+ "defaultValue": "paas",
82
+ "options": [
83
+ {
84
+ "value": "paas",
85
+ "label": "a managed container platform (PaaS)",
86
+ "description": "The provider runs the platform; you hand it a container or code. Google Cloud Run, Azure Container Apps or App Service, AWS App Runner or ECS on Fargate. Pick it by default for web apps and APIs when no platform team exists. In our own data centre there is no provider to run it: it is provided on our Kubernetes with Knative instead."
87
+ },
88
+ {
89
+ "value": "kubernetes",
90
+ "label": "containers on Kubernetes",
91
+ "description": "Managed Kubernetes (EKS, AKS, GKE) or an on-premises distribution (OpenShift, Rancher). Pick it when many services share a platform run by a platform team, or workloads need what a PaaS cannot (sidecars, operators, custom networking, portability)."
92
+ },
93
+ {
94
+ "value": "serverless",
95
+ "label": "serverless functions",
96
+ "description": "AWS Lambda, Azure Functions or Google Cloud Functions, run per event and billed per invocation. Pick it for spiky or event-driven work with short executions, when idle cost should be zero. In our own data centre there is no provider to run it: functions run on our Kubernetes with Knative Functions or OpenFaaS instead."
97
+ },
98
+ {
99
+ "value": "vms",
100
+ "label": "virtual machines",
101
+ "description": "Virtual machines built from images, behind a load balancer. Pick it for software that cannot be containerised (licensed products, legacy runtimes, special kernels) or an on-premises virtualisation platform."
102
+ },
103
+ {
104
+ "value": "cdn",
105
+ "label": "static files on object storage behind a CDN",
106
+ "description": "Pre-built files in a private bucket served through a CDN with TLS: Amazon CloudFront with S3, Azure Front Door with Blob Storage, Cloud CDN with Cloud Storage, or a static host (Cloudflare Pages, Netlify). Pick it for a front end built in advance (the Frontend stack pack's static rendering) or documentation; nothing runs on request."
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "key": "CLOUD",
112
+ "title": "Cloud",
113
+ "label": "Where does it run?",
114
+ "hint": "Choose by the team's skills, existing contracts and identity, the managed services you need, and where the data may be kept. Moving later is a project.",
115
+ "defaultValue": "aws",
116
+ "options": [
117
+ {
118
+ "value": "aws",
119
+ "label": "Amazon Web Services",
120
+ "description": "The broadest set of services and regions. Pick it when the team knows AWS, or you need its specific services (DynamoDB, the widest serverless set)."
121
+ },
122
+ {
123
+ "value": "azure",
124
+ "label": "Microsoft Azure",
125
+ "description": "Strong with Microsoft identity (Entra ID), .NET and enterprise agreements. Pick it when the organisation runs on Microsoft 365 and Entra ID, or has an Azure commitment."
126
+ },
127
+ {
128
+ "value": "gcp",
129
+ "label": "Google Cloud",
130
+ "description": "Strong in Kubernetes (GKE), data and analytics (BigQuery) and Cloud Run. Pick it when those services decide, or the team knows Google Cloud. Its own infrastructure tool (Infrastructure Manager) runs Terraform: answer Terraform below."
131
+ },
132
+ {
133
+ "value": "onprem",
134
+ "label": "our own data centre",
135
+ "description": "Servers and virtualisation we run. Pick it when data may not leave the premises, the load is steady enough that owned hardware is cheaper, or regulation demands it, and people run the hardware. A managed platform or functions are then provided on our own Kubernetes (Knative), the cloud's own infrastructure tool means Terraform, and no cloud budget applies."
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "key": "IAC",
141
+ "title": "Infrastructure as code",
142
+ "label": "What describes the infrastructure in code?",
143
+ "hint": "Infrastructure built in a console cannot be reviewed, repeated or rebuilt; the tool decides the language, the state and which clouds it reaches.",
144
+ "defaultValue": "terraform",
145
+ "options": [
146
+ {
147
+ "value": "terraform",
148
+ "label": "Terraform or OpenTofu",
149
+ "description": "HCL with providers for every cloud and many SaaS products, state in a remote backend. Pick it by default, and whenever more than one cloud or SaaS is involved; OpenTofu when an open-source licence matters."
150
+ },
151
+ {
152
+ "value": "pulumi",
153
+ "label": "Pulumi",
154
+ "description": "Infrastructure in TypeScript, Python, Go or C#, with the same providers. Pick it when the team would rather write infrastructure in the language it already uses, with loops, functions and tests."
155
+ },
156
+ {
157
+ "value": "native",
158
+ "label": "the cloud's own (CloudFormation or CDK on AWS, Bicep on Azure)",
159
+ "description": "AWS CloudFormation or the AWS CDK, or Azure Bicep, with state kept by the cloud. Pick it when only one of these two clouds is used and its newest features matter on the day they ship. Not with Google Cloud (its Infrastructure Manager runs Terraform) or our own data centre: with those, the infrastructure is written in Terraform."
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ "key": "ENVIRONMENTS",
165
+ "title": "Environments",
166
+ "label": "Which environments are there?",
167
+ "hint": "Environments that differ from production hide its bugs; environments that are never torn down cost money every hour.",
168
+ "defaultValue": "staged",
169
+ "options": [
170
+ {
171
+ "value": "staged",
172
+ "label": "development, staging and production",
173
+ "description": "Long-lived environments, staging a scaled-down copy of production. Pick it when releases are tested together before going live, or regulation asks for a pre-production environment."
174
+ },
175
+ {
176
+ "value": "ephemeral",
177
+ "label": "one per pull request, plus staging and production",
178
+ "description": "Each pull request gets a short-lived environment built from the same code, destroyed when it closes. Pick it when environments can be created in minutes and several changes are tested in parallel."
179
+ },
180
+ {
181
+ "value": "minimal",
182
+ "label": "one test environment and production",
183
+ "description": "A single shared test environment, and production where releases are proven as the Deployment and rollback pack decides (canaries, rollback). Pick it for small systems and teams that release small changes often with fast rollback."
184
+ }
185
+ ]
186
+ },
187
+ {
188
+ "key": "BUDGET_MONTHLY",
189
+ "label": "What is the monthly cloud budget of the account or subscription (in the billing currency)? One per account: bind it once. Only in a public cloud",
190
+ "defaultValue": "5000",
191
+ "type": "number"
192
+ },
193
+ {
194
+ "key": "BUDGET_ALERT_PERCENT",
195
+ "label": "At what share of the budget, forecast for the month, does an alert go out (%)? Only in a public cloud",
196
+ "defaultValue": "80",
197
+ "type": "number"
198
+ },
199
+ {
200
+ "key": "COST_STEP",
201
+ "label": "Above what monthly cost increase does a change need the budget owner's approval (billing currency)? Only in a public cloud",
202
+ "defaultValue": "500",
203
+ "type": "number"
204
+ },
205
+ {
206
+ "key": "DRIFT_HOURS",
207
+ "label": "Within how many hours must drift from the code be detected?",
208
+ "defaultValue": "24",
209
+ "type": "number"
210
+ },
211
+ {
212
+ "key": "EPHEMERAL_HOURS",
213
+ "label": "After how many hours is an idle ephemeral environment destroyed?",
214
+ "defaultValue": "72",
215
+ "type": "number"
216
+ }
217
+ ]
218
+ },
219
+ "nodes": [
220
+ {
221
+ "id": "need",
222
+ "type": "need",
223
+ "label": "Runs reproducibly within budget",
224
+ "x": 0,
225
+ "y": 0,
226
+ "kind": "brief",
227
+ "source": "Hub concern pack: Infrastructure",
228
+ "description": "The element has to run somewhere that suits its load and the team's skills, and that somewhere has to be built from reviewed code, so it can be rebuilt after a disaster and repeated for every environment. Test environments must behave like production, nothing may change outside the code unnoticed, and the bill must stay within a known budget, with warnings before it is exceeded rather than after. The checks assume one infrastructure repository with envs/<environment>/ holding each environment's root (staging, production, test), policies/ holding the policy files, charts/<name> holding a Helm chart, infra/ holding CloudFormation or Bicep templates, and ephemeral environments named pr-<number>."
229
+ },
230
+ {
231
+ "id": "req-iac",
232
+ "type": "requirement",
233
+ "label": "Infrastructure is code",
234
+ "x": 260,
235
+ "y": 0,
236
+ "ears_type": "ubiquitous",
237
+ "action": "define 100% of the infrastructure as code in version control, in the tool the infrastructure-as-code decision names, applied only by the pipeline after a reviewed plan, with 0 changes made by hand to any shared environment",
238
+ "rationale": "Code can be reviewed, repeated and rebuilt after a disaster; a console click can do none of these (AWS Well-Architected, Operational Excellence: perform operations as code)."
239
+ },
240
+ {
241
+ "id": "req-policy",
242
+ "type": "requirement",
243
+ "label": "Plans checked against policy",
244
+ "x": 260,
245
+ "y": 130,
246
+ "ears_type": "event-driven",
247
+ "trigger": "a plan for an infrastructure change is produced",
248
+ "action": "check it against the security and tagging baseline (encryption at rest, no public storage, no administration port open to the internet, owner, environment and cost-centre tags on every taggable resource) and refuse to apply it on any failed check",
249
+ "rationale": "Misconfiguration is the commonest cause of cloud breaches; a check before apply costs nothing compared to one after (CIS Benchmarks; Azure Well-Architected, Security)."
250
+ },
251
+ {
252
+ "id": "req-parity",
253
+ "type": "requirement",
254
+ "label": "Environments match production",
255
+ "x": 260,
256
+ "y": 260,
257
+ "ears_type": "ubiquitous",
258
+ "action": "build every environment from the same infrastructure code and deploy the same artefacts to it, differing from production only in the values of its variable files, with the same engine versions of every backing service",
259
+ "rationale": "Gaps between environments in time, people and tools hide the bugs that only production shows (The Twelve-Factor App, X. Dev/prod parity)."
260
+ },
261
+ {
262
+ "id": "req-drift",
263
+ "type": "requirement",
264
+ "label": "Drift detected",
265
+ "x": 260,
266
+ "y": 390,
267
+ "ears_type": "unwanted-behaviour",
268
+ "unwanted_condition": "the running infrastructure differs from its code",
269
+ "action": "detect it within {{DRIFT_HOURS}} hours, report it to the owning team, and revert it or bring it into the code within 5 working days",
270
+ "rationale": "A change outside the code is undone or broken by the next apply, and makes the code a false description of what runs (Terraform documentation, drift; Building Evolutionary Architectures)."
271
+ },
272
+ {
273
+ "id": "req-budget",
274
+ "type": "requirement",
275
+ "label": "Budget alerts before overspend",
276
+ "x": 260,
277
+ "y": 520,
278
+ "ears_type": "event-driven",
279
+ "trigger": "the forecast spend of the account for the month reaches {{BUDGET_ALERT_PERCENT}}% of its budget of {{BUDGET_MONTHLY}}",
280
+ "action": "alert the owning team and the budget owner the same day, with the services that grew",
281
+ "rationale": "Cloud spend grows quietly; a forecast alert leaves time to act within the month (FinOps Framework, budget management; AWS Well-Architected, Cost Optimization).",
282
+ "hubWhen": {
283
+ "CLOUD": [
284
+ "aws",
285
+ "azure",
286
+ "gcp"
287
+ ]
288
+ }
289
+ },
290
+ {
291
+ "id": "req-cost-review",
292
+ "type": "requirement",
293
+ "label": "Cost shown in review",
294
+ "x": 260,
295
+ "y": 650,
296
+ "ears_type": "event-driven",
297
+ "trigger": "a change to the infrastructure code is proposed",
298
+ "action": "show its estimated monthly cost change in the pull request, and require the budget owner's approval when it adds more than {{COST_STEP}} a month",
299
+ "rationale": "The cheapest moment to question a cost is before it is incurred (FinOps Framework, shift-left cost estimation).",
300
+ "hubWhen": {
301
+ "IAC": [
302
+ "terraform"
303
+ ],
304
+ "CLOUD": [
305
+ "aws",
306
+ "azure",
307
+ "gcp"
308
+ ]
309
+ }
310
+ },
311
+ {
312
+ "id": "req-cost-review-fallback",
313
+ "type": "requirement",
314
+ "label": "Cost shown in review",
315
+ "x": 260,
316
+ "y": 780,
317
+ "ears_type": "event-driven",
318
+ "trigger": "a change to the infrastructure code is proposed",
319
+ "action": "show its estimated monthly cost change in the pull request, and require the budget owner's approval when it adds more than {{COST_STEP}} a month",
320
+ "rationale": "The cheapest moment to question a cost is before it is incurred (FinOps Framework, shift-left cost estimation).",
321
+ "hubWhen": {
322
+ "IAC": [
323
+ "native"
324
+ ],
325
+ "CLOUD": [
326
+ "gcp"
327
+ ]
328
+ }
329
+ },
330
+ {
331
+ "id": "req-cost-estimate",
332
+ "type": "requirement",
333
+ "label": "Cost estimated in review",
334
+ "x": 260,
335
+ "y": 910,
336
+ "ears_type": "event-driven",
337
+ "trigger": "a change to the infrastructure code adds or resizes a priced resource",
338
+ "action": "attach the provider's pricing-calculator estimate of the monthly change to the pull request, and require the budget owner's approval when it adds more than {{COST_STEP}} a month",
339
+ "rationale": "The cheapest moment to question a cost is before it is incurred; no estimator reads Pulumi or CloudFormation code, so the reviewer makes the estimate (FinOps Framework, shift-left cost estimation).",
340
+ "unchecked": "No tool estimates the cost of Pulumi, CloudFormation or Bicep changes: the reviewer attaches the pricing-calculator estimate to each infrastructure pull request, and the budget owner approves in the review above {{COST_STEP}} a month before it is merged.",
341
+ "hubWhen": {
342
+ "IAC": [
343
+ "pulumi"
344
+ ],
345
+ "CLOUD": [
346
+ "aws",
347
+ "azure",
348
+ "gcp"
349
+ ]
350
+ }
351
+ },
352
+ {
353
+ "id": "req-cost-estimate-native",
354
+ "type": "requirement",
355
+ "label": "Cost estimated in review",
356
+ "x": 260,
357
+ "y": 1040,
358
+ "ears_type": "event-driven",
359
+ "trigger": "a change to the infrastructure code adds or resizes a priced resource",
360
+ "action": "attach the provider's pricing-calculator estimate of the monthly change to the pull request, and require the budget owner's approval when it adds more than {{COST_STEP}} a month",
361
+ "rationale": "The cheapest moment to question a cost is before it is incurred; no estimator reads Pulumi or CloudFormation code, so the reviewer makes the estimate (FinOps Framework, shift-left cost estimation).",
362
+ "unchecked": "No tool estimates the cost of Pulumi, CloudFormation or Bicep changes: the reviewer attaches the pricing-calculator estimate to each infrastructure pull request, and the budget owner approves in the review above {{COST_STEP}} a month before it is merged.",
363
+ "hubWhen": {
364
+ "IAC": [
365
+ "native"
366
+ ],
367
+ "CLOUD": [
368
+ "aws",
369
+ "azure"
370
+ ]
371
+ }
372
+ },
373
+ {
374
+ "id": "req-paas",
375
+ "type": "requirement",
376
+ "label": "Stateless and scaled",
377
+ "x": 260,
378
+ "y": 1170,
379
+ "ears_type": "ubiquitous",
380
+ "action": "keep the element stateless, with no local file or session surviving an instance restart, run at least 2 instances in production and scale out automatically on load",
381
+ "rationale": "A platform may stop or move any instance at any time; stateless processes make that harmless (The Twelve-Factor App, VI. Processes and IX. Disposability).",
382
+ "hubWhen": {
383
+ "HOSTING": [
384
+ "paas"
385
+ ],
386
+ "CLOUD": [
387
+ "aws",
388
+ "azure",
389
+ "gcp"
390
+ ]
391
+ }
392
+ },
393
+ {
394
+ "id": "req-k8s",
395
+ "type": "requirement",
396
+ "label": "Workloads well specified",
397
+ "x": 260,
398
+ "y": 1300,
399
+ "ears_type": "ubiquitous",
400
+ "action": "give every workload CPU and memory requests and a memory limit, readiness and liveness probes, at least 2 replicas with a PodDisruptionBudget in production, and a non-root, read-only root file system",
401
+ "rationale": "Without these the scheduler cannot place, protect or restart pods correctly, and one pod can starve its node (Kubernetes documentation, configuration best practices; CIS Benchmarks for Kubernetes).",
402
+ "hubWhen": {
403
+ "HOSTING": [
404
+ "kubernetes"
405
+ ]
406
+ }
407
+ },
408
+ {
409
+ "id": "req-k8s-onprem",
410
+ "type": "requirement",
411
+ "label": "Workloads well specified",
412
+ "x": 260,
413
+ "y": 1430,
414
+ "ears_type": "ubiquitous",
415
+ "action": "give every workload CPU and memory requests and a memory limit, readiness and liveness probes, at least 2 replicas with a PodDisruptionBudget in production, and a non-root, read-only root file system",
416
+ "rationale": "Without these the scheduler cannot place, protect or restart pods correctly, and one pod can starve its node (Kubernetes documentation, configuration best practices; CIS Benchmarks for Kubernetes).",
417
+ "hubWhen": {
418
+ "HOSTING": [
419
+ "paas",
420
+ "serverless"
421
+ ],
422
+ "CLOUD": [
423
+ "onprem"
424
+ ]
425
+ }
426
+ },
427
+ {
428
+ "id": "req-functions",
429
+ "type": "requirement",
430
+ "label": "Functions bounded",
431
+ "x": 260,
432
+ "y": 1560,
433
+ "ears_type": "ubiquitous",
434
+ "action": "give every function a concurrency or instance limit that protects what it calls, and a dead-letter queue or failure destination for failed asynchronous events; cold starts are bounded as the Capacity and scaling pack decides",
435
+ "rationale": "Unbounded functions scale until something downstream breaks, and silently lose failed events (AWS Well-Architected, Serverless Applications Lens).",
436
+ "hubWhen": {
437
+ "HOSTING": [
438
+ "serverless"
439
+ ],
440
+ "CLOUD": [
441
+ "aws",
442
+ "azure",
443
+ "gcp"
444
+ ]
445
+ }
446
+ },
447
+ {
448
+ "id": "req-images",
449
+ "type": "requirement",
450
+ "label": "Machines are replaced",
451
+ "x": 260,
452
+ "y": 1690,
453
+ "ears_type": "ubiquitous",
454
+ "action": "build every machine from a versioned image that records its build time, replace machines instead of changing them, with 0 changes over SSH in production and no machine running an image older than 30 days",
455
+ "rationale": "Machines changed by hand drift apart and cannot be rebuilt; images rebuilt monthly carry the operating system's patches (AWS Well-Architected, Reliability: immutable infrastructure).",
456
+ "hubWhen": {
457
+ "HOSTING": [
458
+ "vms"
459
+ ]
460
+ }
461
+ },
462
+ {
463
+ "id": "req-cdn",
464
+ "type": "requirement",
465
+ "label": "Served only through the CDN",
466
+ "x": 260,
467
+ "y": 1820,
468
+ "ears_type": "ubiquitous",
469
+ "action": "serve the files only through the CDN over TLS with HSTS, from an origin bucket that refuses direct requests, with every content-hashed asset cached for a year and every HTML page revalidated on each request",
470
+ "rationale": "An origin reachable directly bypasses the CDN's TLS, caching and protections; a hashed asset never changes, so it can be cached for a year, while a page cached without revalidation keeps users on an old build after a publish (AWS Well-Architected, Security and Performance Efficiency).",
471
+ "hubWhen": {
472
+ "HOSTING": [
473
+ "cdn"
474
+ ]
475
+ }
476
+ },
477
+ {
478
+ "id": "req-ephemeral",
479
+ "type": "requirement",
480
+ "label": "Ephemeral environments cleaned up",
481
+ "x": 260,
482
+ "y": 1950,
483
+ "ears_type": "event-driven",
484
+ "trigger": "a pull request is closed, or its environment has been idle for {{EPHEMERAL_HOURS}} hours",
485
+ "action": "destroy its environment and everything in it within 1 hour",
486
+ "rationale": "Environments per pull request pay off only when they disappear; forgotten ones are the commonest waste in cloud bills (FinOps Framework, workload optimisation).",
487
+ "hubWhen": {
488
+ "ENVIRONMENTS": [
489
+ "ephemeral"
490
+ ]
491
+ }
492
+ },
493
+ {
494
+ "id": "req-staging",
495
+ "type": "requirement",
496
+ "label": "Tested artefact promoted",
497
+ "x": 260,
498
+ "y": 2080,
499
+ "ears_type": "event-driven",
500
+ "trigger": "a release is promoted to production",
501
+ "action": "deploy exactly the artefact, by digest, that the latest staging deployment tested",
502
+ "rationale": "Promoting the tested artefact, not a rebuild, keeps the staging test meaningful (Humble, Farley: Continuous Delivery).",
503
+ "hubWhen": {
504
+ "ENVIRONMENTS": [
505
+ "staged",
506
+ "ephemeral"
507
+ ]
508
+ }
509
+ },
510
+ {
511
+ "id": "sc-iac",
512
+ "type": "scenario",
513
+ "label": "Change goes through the pipeline",
514
+ "x": 520,
515
+ "y": 0,
516
+ "given": "a change to the infrastructure",
517
+ "when": "it is proposed",
518
+ "then": "it arrives as a pull request with a plan, only the pipeline applies it after review, and a change made by hand shows up in the next drift check"
519
+ },
520
+ {
521
+ "id": "sc-policy",
522
+ "type": "scenario",
523
+ "label": "Public bucket refused",
524
+ "x": 520,
525
+ "y": 130,
526
+ "given": "a change that makes a storage bucket public and has no owner tag",
527
+ "when": "the pipeline checks the plan",
528
+ "then": "it fails naming both findings and nothing is applied"
529
+ },
530
+ {
531
+ "id": "sc-parity",
532
+ "type": "scenario",
533
+ "label": "Same code everywhere",
534
+ "x": 520,
535
+ "y": 260,
536
+ "given": "the test environment's and production's folders under envs/",
537
+ "when": "they are compared",
538
+ "then": "they differ only in their variable files"
539
+ },
540
+ {
541
+ "id": "sc-drift",
542
+ "type": "scenario",
543
+ "label": "Manual change found",
544
+ "x": 520,
545
+ "y": 390,
546
+ "given": "a security group changed by hand in the console",
547
+ "when": "the drift check runs",
548
+ "then": "within {{DRIFT_HOURS}} hours the owning team is told which resource differs and how"
549
+ },
550
+ {
551
+ "id": "sc-budget",
552
+ "type": "scenario",
553
+ "label": "Forecast alert",
554
+ "x": 520,
555
+ "y": 520,
556
+ "given": "an account with a monthly budget of {{BUDGET_MONTHLY}}",
557
+ "when": "the forecast passes {{BUDGET_ALERT_PERCENT}}% of it",
558
+ "then": "the owning team and the budget owner are alerted the same day",
559
+ "hubWhen": {
560
+ "CLOUD": [
561
+ "aws",
562
+ "azure",
563
+ "gcp"
564
+ ]
565
+ }
566
+ },
567
+ {
568
+ "id": "sc-cost-review",
569
+ "type": "scenario",
570
+ "label": "Costly change approved",
571
+ "x": 520,
572
+ "y": 650,
573
+ "given": "a pull request that adds a large database instance",
574
+ "when": "the cost estimate shows more than {{COST_STEP}} a month",
575
+ "then": "the pull request cannot be merged until the budget owner adds the budget-approved label",
576
+ "hubWhen": {
577
+ "IAC": [
578
+ "terraform"
579
+ ],
580
+ "CLOUD": [
581
+ "aws",
582
+ "azure",
583
+ "gcp"
584
+ ]
585
+ }
586
+ },
587
+ {
588
+ "id": "sc-cost-review-fallback",
589
+ "type": "scenario",
590
+ "label": "Costly change approved",
591
+ "x": 520,
592
+ "y": 780,
593
+ "given": "a pull request that adds a large database instance",
594
+ "when": "the cost estimate shows more than {{COST_STEP}} a month",
595
+ "then": "the pull request cannot be merged until the budget owner adds the budget-approved label",
596
+ "hubWhen": {
597
+ "IAC": [
598
+ "native"
599
+ ],
600
+ "CLOUD": [
601
+ "gcp"
602
+ ]
603
+ }
604
+ },
605
+ {
606
+ "id": "sc-cost-estimate",
607
+ "type": "scenario",
608
+ "label": "Costly change approved",
609
+ "x": 520,
610
+ "y": 910,
611
+ "given": "a pull request that adds a large database instance",
612
+ "when": "the reviewer's estimate shows more than {{COST_STEP}} a month",
613
+ "then": "the pull request is not merged until the budget owner approves it",
614
+ "hubWhen": {
615
+ "IAC": [
616
+ "pulumi"
617
+ ],
618
+ "CLOUD": [
619
+ "aws",
620
+ "azure",
621
+ "gcp"
622
+ ]
623
+ }
624
+ },
625
+ {
626
+ "id": "sc-cost-estimate-native",
627
+ "type": "scenario",
628
+ "label": "Costly change approved",
629
+ "x": 520,
630
+ "y": 1040,
631
+ "given": "a pull request that adds a large database instance",
632
+ "when": "the reviewer's estimate shows more than {{COST_STEP}} a month",
633
+ "then": "the pull request is not merged until the budget owner approves it",
634
+ "hubWhen": {
635
+ "IAC": [
636
+ "native"
637
+ ],
638
+ "CLOUD": [
639
+ "aws",
640
+ "azure"
641
+ ]
642
+ }
643
+ },
644
+ {
645
+ "id": "sc-paas",
646
+ "type": "scenario",
647
+ "label": "Instance lost harmlessly",
648
+ "x": 520,
649
+ "y": 1170,
650
+ "given": "the production service with its scaling settings read",
651
+ "when": "one of its instances is stopped by the platform",
652
+ "then": "at least 2 were running, a replacement starts within the autoscaling range, and no request or session is lost beyond retries",
653
+ "hubWhen": {
654
+ "HOSTING": [
655
+ "paas"
656
+ ],
657
+ "CLOUD": [
658
+ "aws",
659
+ "azure",
660
+ "gcp"
661
+ ]
662
+ }
663
+ },
664
+ {
665
+ "id": "sc-k8s",
666
+ "type": "scenario",
667
+ "label": "Incomplete manifest refused",
668
+ "x": 520,
669
+ "y": 1300,
670
+ "given": "a deployment without a memory limit or a readiness probe",
671
+ "when": "the manifest check runs",
672
+ "then": "it fails naming what is missing",
673
+ "hubWhen": {
674
+ "HOSTING": [
675
+ "kubernetes"
676
+ ]
677
+ }
678
+ },
679
+ {
680
+ "id": "sc-k8s-onprem",
681
+ "type": "scenario",
682
+ "label": "Incomplete manifest refused",
683
+ "x": 520,
684
+ "y": 1430,
685
+ "given": "a deployment without a memory limit or a readiness probe",
686
+ "when": "the manifest check runs",
687
+ "then": "it fails naming what is missing",
688
+ "hubWhen": {
689
+ "HOSTING": [
690
+ "paas",
691
+ "serverless"
692
+ ],
693
+ "CLOUD": [
694
+ "onprem"
695
+ ]
696
+ }
697
+ },
698
+ {
699
+ "id": "sc-functions",
700
+ "type": "scenario",
701
+ "label": "Burst stays bounded",
702
+ "x": 520,
703
+ "y": 1560,
704
+ "given": "a burst of events far above normal",
705
+ "when": "the functions process it",
706
+ "then": "concurrency stays at its limit, the database is not overloaded, and failed events land in the dead-letter queue",
707
+ "hubWhen": {
708
+ "HOSTING": [
709
+ "serverless"
710
+ ],
711
+ "CLOUD": [
712
+ "aws",
713
+ "azure",
714
+ "gcp"
715
+ ]
716
+ }
717
+ },
718
+ {
719
+ "id": "sc-images",
720
+ "type": "scenario",
721
+ "label": "Old image replaced",
722
+ "x": 520,
723
+ "y": 1690,
724
+ "given": "a machine whose image was built 31 days ago",
725
+ "when": "the image-age alert evaluates",
726
+ "then": "it fires and the machine is replaced from the current image",
727
+ "hubWhen": {
728
+ "HOSTING": [
729
+ "vms"
730
+ ]
731
+ }
732
+ },
733
+ {
734
+ "id": "sc-cdn",
735
+ "type": "scenario",
736
+ "label": "Origin refuses direct request",
737
+ "x": 520,
738
+ "y": 1820,
739
+ "given": "the deployed site",
740
+ "when": "a page and one of its hashed assets are requested through the CDN, and the page directly from the origin",
741
+ "then": "the CDN answers over TLS with HSTS, the page marked for revalidation and the asset cached for a year, and the origin refuses",
742
+ "hubWhen": {
743
+ "HOSTING": [
744
+ "cdn"
745
+ ]
746
+ }
747
+ },
748
+ {
749
+ "id": "sc-ephemeral",
750
+ "type": "scenario",
751
+ "label": "Environment removed",
752
+ "x": 520,
753
+ "y": 1950,
754
+ "given": "an ephemeral environment of a pull request",
755
+ "when": "the pull request is merged",
756
+ "then": "within 1 hour the environment and its resources are gone",
757
+ "hubWhen": {
758
+ "ENVIRONMENTS": [
759
+ "ephemeral"
760
+ ]
761
+ }
762
+ },
763
+ {
764
+ "id": "sc-staging",
765
+ "type": "scenario",
766
+ "label": "Tested artefact promoted",
767
+ "x": 520,
768
+ "y": 2080,
769
+ "given": "a build tested on staging",
770
+ "when": "it is released",
771
+ "then": "the same artefact, by digest, runs in production, and a different digest is refused",
772
+ "hubWhen": {
773
+ "ENVIRONMENTS": [
774
+ "staged",
775
+ "ephemeral"
776
+ ]
777
+ }
778
+ },
779
+ {
780
+ "id": "adr-paas",
781
+ "type": "adr",
782
+ "label": "Runs on a managed platform",
783
+ "x": 780,
784
+ "y": 0,
785
+ "concern": "infrastructure",
786
+ "status": "accepted",
787
+ "date": "",
788
+ "context": "This element is deployed and runs somewhere, and that somewhere has to be chosen, built and paid for. The forces: managed platforms take operations work off the team but limit what can run and tie it to a provider, while Kubernetes and virtual machines run anything at the price of running them; the cloud or data centre is chosen once and rarely left, by skills, existing contracts, services needed and where data may live; infrastructure built by hand in a console cannot be reviewed, repeated or rebuilt after a disaster; environments that differ from production hide the bugs that only production shows; cloud spend grows quietly with every resource nobody switches off; and changes made outside the code drift from it until the next apply undoes or breaks them.",
789
+ "decision": "The element runs as a container on a managed platform in {{CLOUD}}: Google Cloud Run, Azure Container Apps (App Service for plain web apps), or AWS App Runner or ECS on Fargate, with at least 2 instances in production and autoscaling above them. The infrastructure is code, written and checked as the infrastructure-as-code decision records and applied only by the pipeline; environments: {{ENVIRONMENTS}}, built from envs/<environment>/ in one repository; drift checked every {{DRIFT_HOURS}} hours. Rollouts and canaries: as decided in the Deployment and rollback pack. Capacity and scaling: as decided in the Capacity and scaling pack. The engine of a database: hosted as decided in the Data store pack. Choosing the platform: the one in the chosen cloud that runs plain containers with scale-to-zero or autoscaling and managed TLS; avoid platform-specific build packs so the container can move.",
790
+ "consequences": "• No nodes, clusters or operating systems to patch; scaling, TLS and rollouts come with the platform.\n• Limits on what can run: request timeouts, no privileged containers, limited networking and sidecars.\n• Tied to the provider's platform, but a plain container moves to another with little change.\n• Per-request or per-instance billing; two instances kept warm are the floor of the bill.",
791
+ "alternatives": "1. Kubernetes: runs anything, at the cost of running a cluster.\n2. Serverless functions: lower idle cost, a different programming model.\n3. Virtual machines: full control, all the operations work.",
792
+ "hubWhen": {
793
+ "HOSTING": [
794
+ "paas"
795
+ ],
796
+ "CLOUD": [
797
+ "aws",
798
+ "azure",
799
+ "gcp"
800
+ ]
801
+ }
802
+ },
803
+ {
804
+ "id": "adr-kubernetes",
805
+ "type": "adr",
806
+ "label": "Runs on Kubernetes",
807
+ "x": 780,
808
+ "y": 130,
809
+ "concern": "infrastructure",
810
+ "status": "accepted",
811
+ "date": "",
812
+ "context": "This element is deployed and runs somewhere, and that somewhere has to be chosen, built and paid for. The forces: managed platforms take operations work off the team but limit what can run and tie it to a provider, while Kubernetes and virtual machines run anything at the price of running them; the cloud or data centre is chosen once and rarely left, by skills, existing contracts, services needed and where data may live; infrastructure built by hand in a console cannot be reviewed, repeated or rebuilt after a disaster; environments that differ from production hide the bugs that only production shows; cloud spend grows quietly with every resource nobody switches off; and changes made outside the code drift from it until the next apply undoes or breaks them.",
813
+ "decision": "The element runs as containers on Kubernetes in {{CLOUD}}: Amazon EKS, Azure AKS or Google GKE (Autopilot where it fits), or OpenShift or Rancher on premises. Manifests are Helm charts under charts/<name> or Kustomize overlays deployed by GitOps (Argo CD or Flux); every workload has requests and limits, probes, a PodDisruptionBudget and runs as non-root with a read-only root file system. The clusters and what surrounds them are infrastructure like any other: The infrastructure is code, written and checked as the infrastructure-as-code decision records and applied only by the pipeline; environments: {{ENVIRONMENTS}}, built from envs/<environment>/ in one repository; drift checked every {{DRIFT_HOURS}} hours. Argo CD shows drift of the manifests. Rollouts and canaries: as decided in the Deployment and rollback pack. Capacity and scaling: as decided in the Capacity and scaling pack. The engine of a database: hosted as decided in the Data store pack. Choose Kubernetes only with a platform team, or a managed offering that removes node operations.",
814
+ "consequences": "• Runs anything that fits in a container, with the same model in every cloud and on premises.\n• A platform to run: cluster upgrades every few months (each minor is supported for about 14 months), add-ons, networking, security policies.\n• A large ecosystem (CNCF) for observability, policy, service mesh and operators, each one more thing to keep up.\n• Cost depends on packing workloads well; requests that are too high waste nodes.",
815
+ "alternatives": "1. A managed container platform: far less to run, fewer options.\n2. Serverless functions: no cluster at all, a different programming model.\n3. Nomad or plain container hosts: simpler, smaller ecosystem.",
816
+ "hubWhen": {
817
+ "HOSTING": [
818
+ "kubernetes"
819
+ ]
820
+ }
821
+ },
822
+ {
823
+ "id": "adr-serverless",
824
+ "type": "adr",
825
+ "label": "Runs as serverless functions",
826
+ "x": 780,
827
+ "y": 260,
828
+ "concern": "infrastructure",
829
+ "status": "accepted",
830
+ "date": "",
831
+ "context": "This element is deployed and runs somewhere, and that somewhere has to be chosen, built and paid for. The forces: managed platforms take operations work off the team but limit what can run and tie it to a provider, while Kubernetes and virtual machines run anything at the price of running them; the cloud or data centre is chosen once and rarely left, by skills, existing contracts, services needed and where data may live; infrastructure built by hand in a console cannot be reviewed, repeated or rebuilt after a disaster; environments that differ from production hide the bugs that only production shows; cloud spend grows quietly with every resource nobody switches off; and changes made outside the code drift from it until the next apply undoes or breaks them.",
832
+ "decision": "The element runs as serverless functions in {{CLOUD}}: AWS Lambda, Azure Functions or Google Cloud Functions (Cloud Run functions), triggered by HTTP through an API gateway and by queues and events. Each function has a concurrency or instance limit and a dead-letter queue or failure destination for asynchronous events. The infrastructure is code, written and checked as the infrastructure-as-code decision records and applied only by the pipeline; environments: {{ENVIRONMENTS}}, built from envs/<environment>/ in one repository; drift checked every {{DRIFT_HOURS}} hours. The AWS SAM or the Serverless Framework may sit on top of the infrastructure tool. Rollouts and canaries: as decided in the Deployment and rollback pack. Capacity and scaling: as decided in the Capacity and scaling pack. The engine of a database: hosted as decided in the Data store pack. Choose functions for event-driven and spiky work with executions under a few minutes; long-running or steady-load work goes to containers.",
833
+ "consequences": "• No servers to run; scales from zero to large bursts, billed per invocation.\n• Cold starts add latency to the first requests; execution time, payload size and connections are limited.\n• Steady high load can cost more than containers; the bill follows traffic, so budgets and alerts matter.\n• Closely tied to the provider's events, gateway and permissions model; moving is a rewrite of the glue.",
834
+ "alternatives": "1. A managed container platform with scale-to-zero (Cloud Run, Container Apps): containers without cold-start limits on code shape.\n2. Kubernetes with KEDA for event-driven scaling.\n3. Virtual machines: steady cost, no limits, all the operations.",
835
+ "hubWhen": {
836
+ "HOSTING": [
837
+ "serverless"
838
+ ],
839
+ "CLOUD": [
840
+ "aws",
841
+ "azure",
842
+ "gcp"
843
+ ]
844
+ }
845
+ },
846
+ {
847
+ "id": "adr-vms",
848
+ "type": "adr",
849
+ "label": "Runs on virtual machines",
850
+ "x": 780,
851
+ "y": 390,
852
+ "concern": "infrastructure",
853
+ "status": "accepted",
854
+ "date": "",
855
+ "context": "This element is deployed and runs somewhere, and that somewhere has to be chosen, built and paid for. The forces: managed platforms take operations work off the team but limit what can run and tie it to a provider, while Kubernetes and virtual machines run anything at the price of running them; the cloud or data centre is chosen once and rarely left, by skills, existing contracts, services needed and where data may live; infrastructure built by hand in a console cannot be reviewed, repeated or rebuilt after a disaster; environments that differ from production hide the bugs that only production shows; cloud spend grows quietly with every resource nobody switches off; and changes made outside the code drift from it until the next apply undoes or breaks them.",
856
+ "decision": "The element runs on virtual machines in {{CLOUD}} (EC2 Auto Scaling groups, Azure Virtual Machine Scale Sets, Google Compute Engine managed instance groups, or VMware or Proxmox on premises), built from versioned images made with Packer that record their build time, and replaced rather than changed; configuration at boot with cloud-init or Ansible, and no changes over SSH in production. The infrastructure is code, written and checked as the infrastructure-as-code decision records and applied only by the pipeline; environments: {{ENVIRONMENTS}}, built from envs/<environment>/ in one repository; drift checked every {{DRIFT_HOURS}} hours. Rollouts and canaries: as decided in the Deployment and rollback pack. Capacity and scaling: as decided in the Capacity and scaling pack. The engine of a database: hosted as decided in the Data store pack. Choose machines only for what cannot run in a container: licensed or legacy software, special kernels or hardware.",
857
+ "consequences": "• Full control: any software, any kernel, any agent.\n• All the operations work: operating system patches, image builds, scaling groups, load balancers.\n• Slower to scale and to roll out than containers; images must be rebuilt at least monthly.\n• Steady, predictable cost; reserved instances or savings plans reduce it.",
858
+ "alternatives": "1. A managed container platform: no machines to patch, if the software fits in a container.\n2. Kubernetes: containers with control, plus a cluster to run.\n3. Configuration management on long-lived machines (Ansible, Puppet): familiar, but machines drift apart.",
859
+ "hubWhen": {
860
+ "HOSTING": [
861
+ "vms"
862
+ ]
863
+ }
864
+ },
865
+ {
866
+ "id": "adr-cdn",
867
+ "type": "adr",
868
+ "label": "Served from object storage behind a CDN",
869
+ "x": 780,
870
+ "y": 520,
871
+ "concern": "infrastructure",
872
+ "status": "accepted",
873
+ "date": "",
874
+ "context": "This element is deployed and runs somewhere, and that somewhere has to be chosen, built and paid for. The forces: managed platforms take operations work off the team but limit what can run and tie it to a provider, while Kubernetes and virtual machines run anything at the price of running them; the cloud or data centre is chosen once and rarely left, by skills, existing contracts, services needed and where data may live; infrastructure built by hand in a console cannot be reviewed, repeated or rebuilt after a disaster; environments that differ from production hide the bugs that only production shows; cloud spend grows quietly with every resource nobody switches off; and changes made outside the code drift from it until the next apply undoes or breaks them.",
875
+ "decision": "The element is a set of pre-built files in a private bucket in {{CLOUD}}, served only through a CDN over TLS with HSTS: Amazon CloudFront with S3 (origin access control), Azure Front Door with Blob Storage, Cloud CDN with Cloud Storage, or a static host such as Cloudflare Pages or Netlify; on premises, a web server with a cache in front. Hashed assets are cached for a year, HTML revalidated, as the Frontend stack pack's caching rules say. The infrastructure is code, written and checked as the infrastructure-as-code decision records and applied only by the pipeline; environments: {{ENVIRONMENTS}}, built from envs/<environment>/ in one repository; drift checked every {{DRIFT_HOURS}} hours. Rollouts and canaries: as decided in the Deployment and rollback pack. Capacity and scaling: as decided in the Capacity and scaling pack. The engine of a database: hosted as decided in the Data store pack. Choose it only when nothing runs on request; an API behind the same domain is its own element with its own hosting.",
876
+ "consequences": "• Nothing to run, patch or scale; the cheapest and most available hosting there is.\n• Every page is the same for everyone until the next publish; personalisation and sign-in need another element.\n• The origin must stay private, or the CDN's TLS, caching and protections are bypassed.\n• Cache invalidation on publish is the one operational step; a bad publish is undone by publishing the previous build.",
877
+ "alternatives": "1. A managed container platform serving the files: more to run, no CDN edge unless added.\n2. A web server on a virtual machine: full control, all the operations work.\n3. Server rendering: personalised pages, a server to run and scale.",
878
+ "hubWhen": {
879
+ "HOSTING": [
880
+ "cdn"
881
+ ]
882
+ }
883
+ },
884
+ {
885
+ "id": "adr-onprem-platform",
886
+ "type": "adr",
887
+ "label": "A platform on our own Kubernetes",
888
+ "x": 780,
889
+ "y": 650,
890
+ "concern": "infrastructure",
891
+ "status": "accepted",
892
+ "date": "",
893
+ "context": "This element is deployed and runs somewhere, and that somewhere has to be chosen, built and paid for. The forces: managed platforms take operations work off the team but limit what can run and tie it to a provider, while Kubernetes and virtual machines run anything at the price of running them; the cloud or data centre is chosen once and rarely left, by skills, existing contracts, services needed and where data may live; infrastructure built by hand in a console cannot be reviewed, repeated or rebuilt after a disaster; environments that differ from production hide the bugs that only production shows; cloud spend grows quietly with every resource nobody switches off; and changes made outside the code drift from it until the next apply undoes or breaks them.",
894
+ "decision": "The hosting chosen, {{HOSTING}}, has no provider to run it in our own data centre, so the platform team provides the same model on our Kubernetes (OpenShift or Rancher): Knative Serving runs containers that scale with requests, down to zero, and Knative Functions or OpenFaaS run functions triggered by HTTP and by events. Every workload has CPU and memory requests and a memory limit, probes, at least 2 replicas with a PodDisruptionBudget in production, and runs as non-root with a read-only root file system. The infrastructure is code, written and checked as the infrastructure-as-code decision records and applied only by the pipeline; environments: {{ENVIRONMENTS}}, built from envs/<environment>/ in one repository; drift checked every {{DRIFT_HOURS}} hours. Rollouts and canaries: as decided in the Deployment and rollback pack. Capacity and scaling: as decided in the Capacity and scaling pack. The engine of a database: hosted as decided in the Data store pack.",
895
+ "consequences": "• The element keeps the platform's programming model: a container or a function, scaled for it.\n• Someone runs the cluster and Knative: upgrades, capacity and the hardware under them are the platform team's work.\n• Scaling stops at the hardware we own; bursts beyond it wait or fail.\n• Moving to a public cloud later is a change of platform, not of the element.",
896
+ "alternatives": "1. Plain Kubernetes Deployments without Knative: one model less, no scale to zero.\n2. Virtual machines: no cluster, all the operations work.\n3. A public cloud's managed platform: no cluster to run, if the data may leave the premises.",
897
+ "hubWhen": {
898
+ "HOSTING": [
899
+ "paas",
900
+ "serverless"
901
+ ],
902
+ "CLOUD": [
903
+ "onprem"
904
+ ]
905
+ }
906
+ },
907
+ {
908
+ "id": "adr-budget",
909
+ "type": "adr",
910
+ "label": "Cloud spend held to a budget",
911
+ "x": 780,
912
+ "y": 780,
913
+ "concern": "infrastructure",
914
+ "status": "accepted",
915
+ "date": "",
916
+ "context": "This element is deployed and runs somewhere, and that somewhere has to be chosen, built and paid for. The forces: managed platforms take operations work off the team but limit what can run and tie it to a provider, while Kubernetes and virtual machines run anything at the price of running them; the cloud or data centre is chosen once and rarely left, by skills, existing contracts, services needed and where data may live; infrastructure built by hand in a console cannot be reviewed, repeated or rebuilt after a disaster; environments that differ from production hide the bugs that only production shows; cloud spend grows quietly with every resource nobody switches off; and changes made outside the code drift from it until the next apply undoes or breaks them.",
917
+ "decision": "The account (AWS account, Azure subscription or Google Cloud billing account) has a monthly cost budget of {{BUDGET_MONTHLY}} in the billing currency, with a forecast alert at {{BUDGET_ALERT_PERCENT}}% to the owning team and the budget owner; the budget is part of the infrastructure code (aws_budgets_budget, azurerm_consumption_budget_subscription, google_billing_budget). One budget per account, bound once, not per element. A change that adds more than {{COST_STEP}} a month needs the budget owner's approval: with Terraform, Infracost shows the change in the pull request and a label records the approval; with Pulumi or the cloud's own tool, which no estimator reads, the reviewer attaches the pricing calculator's estimate.",
918
+ "consequences": "• Overspend is seen within the month, from the forecast, not on the invoice.\n• Every costly change has a named approver before it ships.\n• The budget and the approval step need an owner who answers within a day, or changes wait.",
919
+ "alternatives": "1. Monthly review of the invoice: no tooling, and the money is spent before anyone looks.\n2. Hard spending caps: they stop the bill and the service with it.",
920
+ "hubWhen": {
921
+ "CLOUD": [
922
+ "aws",
923
+ "azure",
924
+ "gcp"
925
+ ]
926
+ }
927
+ },
928
+ {
929
+ "id": "adr-iac-terraform",
930
+ "type": "adr",
931
+ "label": "Infrastructure in Terraform",
932
+ "x": 780,
933
+ "y": 910,
934
+ "concern": "infrastructure",
935
+ "status": "accepted",
936
+ "date": "",
937
+ "context": "This element is deployed and runs somewhere, and that somewhere has to be chosen, built and paid for. The forces: managed platforms take operations work off the team but limit what can run and tie it to a provider, while Kubernetes and virtual machines run anything at the price of running them; the cloud or data centre is chosen once and rarely left, by skills, existing contracts, services needed and where data may live; infrastructure built by hand in a console cannot be reviewed, repeated or rebuilt after a disaster; environments that differ from production hide the bugs that only production shows; cloud spend grows quietly with every resource nobody switches off; and changes made outside the code drift from it until the next apply undoes or breaks them.",
938
+ "decision": "The infrastructure is described in Terraform (OpenTofu where an open-source licence matters): one root per environment under envs/<environment>/, shared modules versioned, state in a remote backend with locking (S3, Azure Storage, Google Cloud Storage or HCP Terraform). Every pull request produces a plan, checked by Checkov against the security and tagging baseline; only the pipeline applies, after review; a refresh-only plan every {{DRIFT_HOURS}} hours reports drift.",
939
+ "consequences": "• One language and workflow for every cloud and most SaaS products.\n• The state file is critical and holds secrets: its backend, locking and access need care.\n• HCL has limited abstraction; large estates need module conventions.",
940
+ "alternatives": "1. Pulumi: the same providers in a general-purpose language.\n2. The cloud's own tool (CloudFormation, Bicep): state kept by the cloud, one cloud only.",
941
+ "hubWhen": {
942
+ "IAC": [
943
+ "terraform"
944
+ ]
945
+ }
946
+ },
947
+ {
948
+ "id": "adr-iac-pulumi",
949
+ "type": "adr",
950
+ "label": "Infrastructure in Pulumi",
951
+ "x": 780,
952
+ "y": 1040,
953
+ "concern": "infrastructure",
954
+ "status": "accepted",
955
+ "date": "",
956
+ "context": "This element is deployed and runs somewhere, and that somewhere has to be chosen, built and paid for. The forces: managed platforms take operations work off the team but limit what can run and tie it to a provider, while Kubernetes and virtual machines run anything at the price of running them; the cloud or data centre is chosen once and rarely left, by skills, existing contracts, services needed and where data may live; infrastructure built by hand in a console cannot be reviewed, repeated or rebuilt after a disaster; environments that differ from production hide the bugs that only production shows; cloud spend grows quietly with every resource nobody switches off; and changes made outside the code drift from it until the next apply undoes or breaks them.",
957
+ "decision": "The infrastructure is written with Pulumi in the language the team already uses, one stack per environment, state in Pulumi Cloud or a self-managed backend (S3, Azure Blob Storage, Google Cloud Storage). A CrossGuard policy pack runs with every preview and stops on a mandatory violation of the security and tagging baseline; only the pipeline runs pulumi up, after review; a refreshed preview every {{DRIFT_HOURS}} hours reports drift.",
958
+ "consequences": "• Loops, functions, types and unit tests for infrastructure, in the team's language.\n• Infrastructure code can grow as complex as application code; it needs the same review discipline.\n• Fewer ready-made scanners and cost estimators read Pulumi than Terraform.",
959
+ "alternatives": "1. Terraform: the widest ecosystem of scanners and estimators.\n2. The cloud's own tool: one cloud, state kept by the cloud.",
960
+ "hubWhen": {
961
+ "IAC": [
962
+ "pulumi"
963
+ ]
964
+ }
965
+ },
966
+ {
967
+ "id": "adr-iac-native",
968
+ "type": "adr",
969
+ "label": "Infrastructure in the cloud's own tool",
970
+ "x": 780,
971
+ "y": 1170,
972
+ "concern": "infrastructure",
973
+ "status": "accepted",
974
+ "date": "",
975
+ "context": "This element is deployed and runs somewhere, and that somewhere has to be chosen, built and paid for. The forces: managed platforms take operations work off the team but limit what can run and tie it to a provider, while Kubernetes and virtual machines run anything at the price of running them; the cloud or data centre is chosen once and rarely left, by skills, existing contracts, services needed and where data may live; infrastructure built by hand in a console cannot be reviewed, repeated or rebuilt after a disaster; environments that differ from production hide the bugs that only production shows; cloud spend grows quietly with every resource nobody switches off; and changes made outside the code drift from it until the next apply undoes or breaks them.",
976
+ "decision": "The infrastructure is described in the cloud's own tool: CloudFormation, written directly or synthesised from the AWS CDK, on AWS; Bicep on Azure. Templates live under infra/ with a parameter file per environment, and the cloud keeps the state. Checkov scans the templates in every pull request; tags are enforced at deployment by AWS Organizations tag policies or Azure Policy; only the pipeline deploys, after review; CloudFormation drift detection or a Bicep what-if every {{DRIFT_HOURS}} hours reports drift.",
977
+ "consequences": "• No state to run, and the newest services on the day they ship.\n• One cloud only: a second cloud or a SaaS product needs another tool.\n• Fewer policy and cost tools read the templates than read Terraform.",
978
+ "alternatives": "1. Terraform: every cloud and SaaS, a state backend to run.\n2. Pulumi: a general-purpose language, the same providers as Terraform.",
979
+ "hubWhen": {
980
+ "IAC": [
981
+ "native"
982
+ ],
983
+ "CLOUD": [
984
+ "aws",
985
+ "azure"
986
+ ]
987
+ }
988
+ },
989
+ {
990
+ "id": "adr-iac-native-fallback",
991
+ "type": "adr",
992
+ "label": "Infrastructure in Terraform, as the cloud has no tool of its own",
993
+ "x": 780,
994
+ "y": 1300,
995
+ "concern": "infrastructure",
996
+ "status": "accepted",
997
+ "date": "",
998
+ "context": "This element is deployed and runs somewhere, and that somewhere has to be chosen, built and paid for. The forces: managed platforms take operations work off the team but limit what can run and tie it to a provider, while Kubernetes and virtual machines run anything at the price of running them; the cloud or data centre is chosen once and rarely left, by skills, existing contracts, services needed and where data may live; infrastructure built by hand in a console cannot be reviewed, repeated or rebuilt after a disaster; environments that differ from production hide the bugs that only production shows; cloud spend grows quietly with every resource nobody switches off; and changes made outside the code drift from it until the next apply undoes or breaks them.",
999
+ "decision": "The cloud's own tool was chosen, but {{CLOUD}} has no CloudFormation or Bicep: Google Cloud's own tool, Infrastructure Manager, deploys Terraform configurations, and our own data centre has no provider tool at all. The infrastructure is therefore described in Terraform, deployed through Infrastructure Manager on Google Cloud and by the pipeline in our own data centre: one root per environment under envs/<environment>/, state in a remote backend with locking, a plan checked by Checkov in every pull request, applied only after review, and a refresh-only plan every {{DRIFT_HOURS}} hours reporting drift.",
1000
+ "consequences": "• The checks of this pack for Terraform apply as they are.\n• On Google Cloud, Infrastructure Manager keeps the state and the deployment history; elsewhere the backend is ours to run.\n• HCL has limited abstraction; large estates need module conventions.",
1001
+ "alternatives": "1. Pulumi: the same providers in a general-purpose language.\n2. Deployment Manager on Google Cloud: retired in favour of Infrastructure Manager.",
1002
+ "hubWhen": {
1003
+ "IAC": [
1004
+ "native"
1005
+ ],
1006
+ "CLOUD": [
1007
+ "gcp",
1008
+ "onprem"
1009
+ ]
1010
+ }
1011
+ },
1012
+ {
1013
+ "id": "ff-checkov",
1014
+ "type": "fitness-fn",
1015
+ "label": "Plans pass policy",
1016
+ "x": 1040,
1017
+ "y": 0,
1018
+ "characteristic": "security",
1019
+ "scope": "atomic",
1020
+ "cadence": "triggered",
1021
+ "trigger": "pull-request",
1022
+ "invocation": "automated",
1023
+ "description": "Checkov scans the Terraform plan in every pull request with its built-in checks and a custom tagging policy over every taggable resource type of every provider (AWS and Azure resources carry tags, Google Cloud resources labels), and fails on any finding. Rules of your own go into Conftest policies over the same plan JSON.\n\nThreshold: 0 failed Checkov checks of the baseline (encryption, public access, open admin ports) and 0 taggable resources without owner, environment and cost-centre tags (labels on Google Cloud) in the plan of every pull request\n\nTool: Checkov\n\n```yaml\n# policies/required_tags.yaml — custom check, run with --external-checks-dir policies\nmetadata:\n id: CKV2_ORG_TAGS\n name: Taggable resources carry owner, environment and cost-centre tags (labels on Google Cloud)\n category: GENERAL_SECURITY\ndefinition:\n or:\n - and:\n - { cond_type: attribute, resource_types: taggable, attribute: tags.owner, operator: exists }\n - { cond_type: attribute, resource_types: taggable, attribute: tags.environment, operator: exists }\n - { cond_type: attribute, resource_types: taggable, attribute: tags.cost-centre, operator: exists }\n - and:\n - { cond_type: attribute, resource_types: taggable, attribute: labels.owner, operator: exists }\n - { cond_type: attribute, resource_types: taggable, attribute: labels.environment, operator: exists }\n - { cond_type: attribute, resource_types: taggable, attribute: labels.cost-centre, operator: exists }\n# CI, in envs/<environment>:\n# terraform plan -out tf.plan && terraform show -json tf.plan > tf.json\n# checkov -f tf.json --framework terraform_plan --external-checks-dir ../../policies --compact\n```",
1024
+ "hubWhen": {
1025
+ "IAC": [
1026
+ "terraform"
1027
+ ]
1028
+ }
1029
+ },
1030
+ {
1031
+ "id": "ff-checkov-fallback",
1032
+ "type": "fitness-fn",
1033
+ "label": "Plans pass policy",
1034
+ "x": 1040,
1035
+ "y": 130,
1036
+ "characteristic": "security",
1037
+ "scope": "atomic",
1038
+ "cadence": "triggered",
1039
+ "trigger": "pull-request",
1040
+ "invocation": "automated",
1041
+ "description": "Checkov scans the Terraform plan in every pull request with its built-in checks and a custom tagging policy over every taggable resource type of every provider (AWS and Azure resources carry tags, Google Cloud resources labels), and fails on any finding. Rules of your own go into Conftest policies over the same plan JSON.\n\nThreshold: 0 failed Checkov checks of the baseline (encryption, public access, open admin ports) and 0 taggable resources without owner, environment and cost-centre tags (labels on Google Cloud) in the plan of every pull request\n\nTool: Checkov\n\n```yaml\n# policies/required_tags.yaml — custom check, run with --external-checks-dir policies\nmetadata:\n id: CKV2_ORG_TAGS\n name: Taggable resources carry owner, environment and cost-centre tags (labels on Google Cloud)\n category: GENERAL_SECURITY\ndefinition:\n or:\n - and:\n - { cond_type: attribute, resource_types: taggable, attribute: tags.owner, operator: exists }\n - { cond_type: attribute, resource_types: taggable, attribute: tags.environment, operator: exists }\n - { cond_type: attribute, resource_types: taggable, attribute: tags.cost-centre, operator: exists }\n - and:\n - { cond_type: attribute, resource_types: taggable, attribute: labels.owner, operator: exists }\n - { cond_type: attribute, resource_types: taggable, attribute: labels.environment, operator: exists }\n - { cond_type: attribute, resource_types: taggable, attribute: labels.cost-centre, operator: exists }\n# CI, in envs/<environment>:\n# terraform plan -out tf.plan && terraform show -json tf.plan > tf.json\n# checkov -f tf.json --framework terraform_plan --external-checks-dir ../../policies --compact\n```",
1042
+ "hubWhen": {
1043
+ "IAC": [
1044
+ "native"
1045
+ ],
1046
+ "CLOUD": [
1047
+ "gcp",
1048
+ "onprem"
1049
+ ]
1050
+ }
1051
+ },
1052
+ {
1053
+ "id": "ff-checkov-native",
1054
+ "type": "fitness-fn",
1055
+ "label": "Templates pass policy",
1056
+ "x": 1040,
1057
+ "y": 260,
1058
+ "characteristic": "security",
1059
+ "scope": "atomic",
1060
+ "cadence": "triggered",
1061
+ "trigger": "pull-request",
1062
+ "invocation": "automated",
1063
+ "description": "Checkov scans the CloudFormation (synthesised from the CDK with cdk synth) or Bicep templates under infra/ in every pull request with its built-in checks and fails on any finding. Tags are enforced at deploy time by the cloud (AWS Organizations tag policies, Azure Policy \"Require a tag on resources\"), not by this check.\n\nThreshold: 0 failed Checkov checks of the baseline (encryption, public access, open admin ports) in the CloudFormation or Bicep templates of every pull request\n\nTool: Checkov\n\n```bash\n#!/usr/bin/env bash\n# CloudFormation (AWS, incl. cdk synth output) and Bicep (Azure) templates under infra/\nset -euo pipefail\ncheckov --directory infra --framework cloudformation,bicep --compact\n```",
1064
+ "hubWhen": {
1065
+ "IAC": [
1066
+ "native"
1067
+ ],
1068
+ "CLOUD": [
1069
+ "aws",
1070
+ "azure"
1071
+ ]
1072
+ }
1073
+ },
1074
+ {
1075
+ "id": "ff-crossguard",
1076
+ "type": "fitness-fn",
1077
+ "label": "Previews pass policy",
1078
+ "x": 1040,
1079
+ "y": 390,
1080
+ "characteristic": "security",
1081
+ "scope": "atomic",
1082
+ "cadence": "triggered",
1083
+ "trigger": "pull-request",
1084
+ "invocation": "automated",
1085
+ "description": "A Pulumi CrossGuard policy pack runs with every preview and update and stops on a mandatory violation. The tag rule covers the listed resource types of AWS, Azure and Google Cloud (labels there); the public-storage rule knows each cloud's bucket setting. Extend the lists with the resource types the stacks use.\n\nThreshold: 0 mandatory policy violations in the preview of every pull request: missing owner, environment or cost-centre tags on the listed resource types, public storage\n\nTool: Pulumi CrossGuard (@pulumi/policy)\n\n```ts\n// policy/index.ts — pulumi preview --policy-pack policy\nimport { PolicyPack, type ResourceValidationArgs } from '@pulumi/policy'\n\nconst TAGGED = new Set([\n 'aws:ec2/instance:Instance', 'aws:rds/instance:Instance', 'aws:s3/bucketV2:BucketV2', 'aws:ecs/service:Service', 'aws:lambda/function:Function',\n 'azure-native:compute:VirtualMachine', 'azure-native:storage:StorageAccount', 'azure-native:app:ContainerApp', 'azure-native:web:WebApp',\n 'gcp:compute/instance:Instance', 'gcp:storage/bucket:Bucket', 'gcp:cloudrunv2/service:Service', 'gcp:cloudfunctions2/function:Function',\n])\nconst PRIVATE: Record<string, (props: Record<string, any>) => boolean> = {\n 'aws:s3/bucketPublicAccessBlock:BucketPublicAccessBlock': (p) => p.blockPublicAcls && p.blockPublicPolicy,\n 'azure-native:storage:StorageAccount': (p) => p.allowBlobPublicAccess === false,\n 'gcp:storage/bucket:Bucket': (p) => p.publicAccessPrevention === 'enforced',\n}\n\nnew PolicyPack('baseline', {\n policies: [\n {\n name: 'required-tags', enforcementLevel: 'mandatory',\n description: 'Every listed resource carries owner, environment and cost-centre tags (labels on Google Cloud).',\n validateResource: (args: ResourceValidationArgs, report) => {\n if (!TAGGED.has(args.type)) return\n const tags = args.props.tags ?? args.props.labels ?? {}\n for (const tag of ['owner', 'environment', 'cost-centre']) if (!tags[tag]) report(`${args.type} ${args.name}: missing tag \"${tag}\"`)\n },\n },\n {\n name: 'no-public-storage', enforcementLevel: 'mandatory',\n description: 'Public access is blocked on every bucket.',\n validateResource: (args: ResourceValidationArgs, report) => {\n const isPrivate = PRIVATE[args.type]\n if (isPrivate && !isPrivate(args.props)) report(`${args.type} ${args.name}: public access must be blocked`)\n },\n },\n ],\n})\n```",
1086
+ "hubWhen": {
1087
+ "IAC": [
1088
+ "pulumi"
1089
+ ]
1090
+ }
1091
+ },
1092
+ {
1093
+ "id": "ff-drift-terraform",
1094
+ "type": "fitness-fn",
1095
+ "label": "Drift detected",
1096
+ "x": 1040,
1097
+ "y": 520,
1098
+ "characteristic": "maintainability",
1099
+ "scope": "atomic",
1100
+ "cadence": "triggered",
1101
+ "trigger": "nightly",
1102
+ "invocation": "automated",
1103
+ "description": "A scheduled pipeline runs a refresh-only plan in each environment's root; exit code 2 means the infrastructure differs from the code, and the job opens an issue for the owning team.\n\nThreshold: A drift check every {{DRIFT_HOURS}} hours per environment; 0 unexplained differences between code and infrastructure\n\nTool: Terraform (plan -detailed-exitcode) with the GitHub CLI\n\n```bash\n#!/usr/bin/env bash\n# scheduled every {{DRIFT_HOURS}} hours, in envs/$ENVIRONMENT\nset -uo pipefail\nterraform init -input=false >/dev/null\nterraform plan -refresh-only -detailed-exitcode -input=false -no-color > drift.txt\ncase $? in\n 0) echo \"no drift\" ;;\n 2) gh issue create --title \"Drift in $ENVIRONMENT\" --body-file drift.txt --label drift; exit 1 ;;\n *) echo \"plan failed\"; exit 1 ;;\nesac\n```",
1104
+ "hubWhen": {
1105
+ "IAC": [
1106
+ "terraform"
1107
+ ]
1108
+ }
1109
+ },
1110
+ {
1111
+ "id": "ff-drift-terraform-fallback",
1112
+ "type": "fitness-fn",
1113
+ "label": "Drift detected",
1114
+ "x": 1040,
1115
+ "y": 650,
1116
+ "characteristic": "maintainability",
1117
+ "scope": "atomic",
1118
+ "cadence": "triggered",
1119
+ "trigger": "nightly",
1120
+ "invocation": "automated",
1121
+ "description": "A scheduled pipeline runs a refresh-only plan in each environment's root; exit code 2 means the infrastructure differs from the code, and the job opens an issue for the owning team.\n\nThreshold: A drift check every {{DRIFT_HOURS}} hours per environment; 0 unexplained differences between code and infrastructure\n\nTool: Terraform (plan -detailed-exitcode) with the GitHub CLI\n\n```bash\n#!/usr/bin/env bash\n# scheduled every {{DRIFT_HOURS}} hours, in envs/$ENVIRONMENT\nset -uo pipefail\nterraform init -input=false >/dev/null\nterraform plan -refresh-only -detailed-exitcode -input=false -no-color > drift.txt\ncase $? in\n 0) echo \"no drift\" ;;\n 2) gh issue create --title \"Drift in $ENVIRONMENT\" --body-file drift.txt --label drift; exit 1 ;;\n *) echo \"plan failed\"; exit 1 ;;\nesac\n```",
1122
+ "hubWhen": {
1123
+ "IAC": [
1124
+ "native"
1125
+ ],
1126
+ "CLOUD": [
1127
+ "gcp",
1128
+ "onprem"
1129
+ ]
1130
+ }
1131
+ },
1132
+ {
1133
+ "id": "ff-drift-pulumi",
1134
+ "type": "fitness-fn",
1135
+ "label": "Drift detected",
1136
+ "x": 1040,
1137
+ "y": 780,
1138
+ "characteristic": "maintainability",
1139
+ "scope": "atomic",
1140
+ "cadence": "triggered",
1141
+ "trigger": "nightly",
1142
+ "invocation": "automated",
1143
+ "description": "A scheduled pipeline refreshes each stack in preview and fails when anything changed outside the code; Pulumi Deployments can run the same as a scheduled drift detection.\n\nThreshold: A drift check every {{DRIFT_HOURS}} hours per stack; 0 unexplained differences between code and infrastructure\n\nTool: Pulumi (preview --refresh --expect-no-changes)\n\n```bash\n#!/usr/bin/env bash\n# scheduled every {{DRIFT_HOURS}} hours per stack\nset -euo pipefail\npulumi stack select \"$STACK\"\npulumi preview --refresh --expect-no-changes --diff --non-interactive\n```",
1144
+ "hubWhen": {
1145
+ "IAC": [
1146
+ "pulumi"
1147
+ ]
1148
+ }
1149
+ },
1150
+ {
1151
+ "id": "ff-drift-native",
1152
+ "type": "fitness-fn",
1153
+ "label": "Drift detected",
1154
+ "x": 1040,
1155
+ "y": 910,
1156
+ "characteristic": "maintainability",
1157
+ "scope": "atomic",
1158
+ "cadence": "triggered",
1159
+ "trigger": "nightly",
1160
+ "invocation": "automated",
1161
+ "description": "A scheduled job runs the part for the cloud in use (the CLOUD variable of the pipeline): on AWS it starts CloudFormation drift detection on every stack and fails when one is DRIFTED; on Azure it runs a what-if of the deployed Bicep template against the resource group and fails on any change other than NoChange or Ignore.\n\nThreshold: A drift check every {{DRIFT_HOURS}} hours; 0 CloudFormation stacks in DRIFTED state, 0 resources a Bicep what-if would change\n\nTool: AWS CloudFormation drift detection (AWS CLI); Azure: az deployment group what-if\n\n```bash\n#!/usr/bin/env bash\n# scheduled every {{DRIFT_HOURS}} hours; the pipeline sets CLOUD to aws or azure\nset -euo pipefail\nfailed=0\ncase \"$CLOUD\" in\n aws)\n for stack in $(aws cloudformation list-stacks --stack-status-filter CREATE_COMPLETE UPDATE_COMPLETE \\\n --query 'StackSummaries[].StackName' --output text); do\n id=$(aws cloudformation detect-stack-drift --stack-name \"$stack\" --query StackDriftDetectionId --output text)\n until [ \"$(aws cloudformation describe-stack-drift-detection-status --stack-drift-detection-id \"$id\" \\\n --query DetectionStatus --output text)\" != DETECTION_IN_PROGRESS ]; do sleep 5; done\n status=$(aws cloudformation describe-stack-drift-detection-status --stack-drift-detection-id \"$id\" \\\n --query StackDriftStatus --output text)\n [ \"$status\" != DRIFTED ] || { echo \"$stack has drifted\"; failed=1; }\n done ;;\n azure)\n changes=$(az deployment group what-if --resource-group \"$RESOURCE_GROUP\" --template-file infra/main.bicep \\\n --parameters \"infra/$ENVIRONMENT.bicepparam\" --no-pretty-print --exclude-change-types NoChange Ignore \\\n --query 'changes[].[resourceId, changeType]' --output tsv)\n [ -z \"$changes\" ] || { echo \"$changes\"; failed=1; } ;;\nesac\nexit $failed\n```",
1162
+ "hubWhen": {
1163
+ "IAC": [
1164
+ "native"
1165
+ ],
1166
+ "CLOUD": [
1167
+ "aws",
1168
+ "azure"
1169
+ ]
1170
+ }
1171
+ },
1172
+ {
1173
+ "id": "ff-budget-aws",
1174
+ "type": "fitness-fn",
1175
+ "label": "Budget alert in place (AWS Budgets)",
1176
+ "x": 1040,
1177
+ "y": 1040,
1178
+ "characteristic": "other",
1179
+ "scope": "atomic",
1180
+ "cadence": "triggered",
1181
+ "trigger": "nightly",
1182
+ "invocation": "automated",
1183
+ "description": "A scheduled job reads the account's budgets through the cloud's CLI and fails when none is a monthly cost budget of {{BUDGET_MONTHLY}} with an enabled forecast notification at {{BUDGET_ALERT_PERCENT}}% or lower; the budget itself is part of the infrastructure code. One budget per account: bind this pack's budget details once per account, not per element.\n\nThreshold: A monthly cost budget of {{BUDGET_MONTHLY}} with a forecast alert at {{BUDGET_ALERT_PERCENT}}% or lower exists in the account the element runs in\n\nTool: AWS CLI (budgets)\n\n```bash\n#!/usr/bin/env bash\n# scheduled: the account's monthly cost budget with a forecast alert exists\nset -euo pipefail\naccount=$(aws sts get-caller-identity --query Account --output text)\nname=$(aws budgets describe-budgets --account-id \"$account\" \\\n --query \"Budgets[?BudgetType=='COST' && TimeUnit=='MONTHLY' && to_number(BudgetLimit.Amount)==\\`{{BUDGET_MONTHLY}}\\`].BudgetName | [0]\" --output text)\n[ \"$name\" != None ] || { echo \"no monthly cost budget of {{BUDGET_MONTHLY}} in account $account\"; exit 1; }\naws budgets describe-notifications-for-budget --account-id \"$account\" --budget-name \"$name\" \\\n --query \"Notifications[?NotificationType=='FORECASTED' && ThresholdType=='PERCENTAGE' && Threshold<=\\`{{BUDGET_ALERT_PERCENT}}\\`]\" --output text | grep -q . \\\n || { echo \"budget $name has no forecast alert at {{BUDGET_ALERT_PERCENT}} % or lower\"; exit 1; }\n```",
1184
+ "hubWhen": {
1185
+ "CLOUD": [
1186
+ "aws"
1187
+ ]
1188
+ }
1189
+ },
1190
+ {
1191
+ "id": "ff-budget-azure",
1192
+ "type": "fitness-fn",
1193
+ "label": "Budget alert in place (Azure Cost Management)",
1194
+ "x": 1040,
1195
+ "y": 1170,
1196
+ "characteristic": "other",
1197
+ "scope": "atomic",
1198
+ "cadence": "triggered",
1199
+ "trigger": "nightly",
1200
+ "invocation": "automated",
1201
+ "description": "A scheduled job reads the account's budgets through the cloud's CLI and fails when none is a monthly cost budget of {{BUDGET_MONTHLY}} with an enabled forecast notification at {{BUDGET_ALERT_PERCENT}}% or lower; the budget itself is part of the infrastructure code. One budget per account: bind this pack's budget details once per account, not per element.\n\nThreshold: A monthly cost budget of {{BUDGET_MONTHLY}} with a forecast alert at {{BUDGET_ALERT_PERCENT}}% or lower exists in the account the element runs in\n\nTool: Azure CLI (consumption budget) with jq\n\n```bash\n#!/usr/bin/env bash\n# scheduled: the subscription's monthly budget with a forecast alert exists\nset -euo pipefail\naz consumption budget list --output json | jq -e --argjson amount {{BUDGET_MONTHLY}} --argjson pct {{BUDGET_ALERT_PERCENT}} '\n map(select(.timeGrain == \"Monthly\" and .amount == $amount\n and any(.notifications[]?; .enabled and .thresholdType == \"Forecasted\" and .threshold <= $pct))) | length > 0' >/dev/null \\\n || { echo \"no monthly budget of {{BUDGET_MONTHLY}} with a forecast alert at {{BUDGET_ALERT_PERCENT}} % or lower in this subscription\"; exit 1; }\n```",
1202
+ "hubWhen": {
1203
+ "CLOUD": [
1204
+ "azure"
1205
+ ]
1206
+ }
1207
+ },
1208
+ {
1209
+ "id": "ff-budget-gcp",
1210
+ "type": "fitness-fn",
1211
+ "label": "Budget alert in place (Cloud Billing budgets)",
1212
+ "x": 1040,
1213
+ "y": 1300,
1214
+ "characteristic": "other",
1215
+ "scope": "atomic",
1216
+ "cadence": "triggered",
1217
+ "trigger": "nightly",
1218
+ "invocation": "automated",
1219
+ "description": "A scheduled job reads the account's budgets through the cloud's CLI and fails when none is a monthly cost budget of {{BUDGET_MONTHLY}} with an enabled forecast notification at {{BUDGET_ALERT_PERCENT}}% or lower; the budget itself is part of the infrastructure code. One budget per account: bind this pack's budget details once per account, not per element.\n\nThreshold: A monthly cost budget of {{BUDGET_MONTHLY}} with a forecast alert at {{BUDGET_ALERT_PERCENT}}% or lower exists in the account the element runs in\n\nTool: gcloud (billing budgets) with jq\n\n```bash\n#!/usr/bin/env bash\n# scheduled: the billing account's monthly budget with a forecast alert exists\nset -euo pipefail\ngcloud billing budgets list --billing-account \"$BILLING_ACCOUNT\" --format=json | jq -e --argjson amount {{BUDGET_MONTHLY}} --argjson pct {{BUDGET_ALERT_PERCENT}} '\n map(select((.budgetFilter.calendarPeriod // \"MONTH\") == \"MONTH\" and (.amount.specifiedAmount.units | tonumber) == $amount\n and any(.thresholdRules[]?; .spendBasis == \"FORECASTED_SPEND\" and (.thresholdPercent * 100) <= $pct))) | length > 0' >/dev/null \\\n || { echo \"no monthly budget of {{BUDGET_MONTHLY}} with a forecast alert at {{BUDGET_ALERT_PERCENT}} % or lower on $BILLING_ACCOUNT\"; exit 1; }\n```",
1220
+ "hubWhen": {
1221
+ "CLOUD": [
1222
+ "gcp"
1223
+ ]
1224
+ }
1225
+ },
1226
+ {
1227
+ "id": "ff-infracost",
1228
+ "type": "fitness-fn",
1229
+ "label": "Cost change in review",
1230
+ "x": 1040,
1231
+ "y": 1430,
1232
+ "characteristic": "other",
1233
+ "scope": "atomic",
1234
+ "cadence": "triggered",
1235
+ "trigger": "pull-request",
1236
+ "invocation": "manual",
1237
+ "description": "Infracost compares the cost of the pull request's Terraform with the main branch and comments the difference; the step then fails above the limit unless the budget owner has added the label budget-approved, which only they may add (a CODEOWNERS-protected label rule or a workflow that checks who added it).\n\nThreshold: 100% of infrastructure pull requests show the monthly cost change; above {{COST_STEP}} a month the check fails until the pull request carries the label budget-approved\n\nTool: Infracost with the GitHub CLI\n\n```bash\ninfracost breakdown --path . --format json --out-file base.json # run on the main branch checkout\ninfracost diff --path . --compare-to base.json --format json --out-file diff.json\ninfracost comment github --path diff.json --repo \"$GITHUB_REPOSITORY\" \\\n --pull-request \"$PR_NUMBER\" --github-token \"$GITHUB_TOKEN\" --behavior update\nincrease=$(jq -r '(.diffTotalMonthlyCost // \"0\") | tonumber | floor' diff.json)\napproved=$(gh pr view \"$PR_NUMBER\" --json labels -q '.labels[].name' | grep -cx budget-approved || true)\n[ \"$increase\" -le {{COST_STEP}} ] || [ \"$approved\" -gt 0 ] \\\n || { echo \"adds $increase a month: the budget owner adds the label budget-approved\"; exit 1; }\n```",
1238
+ "hubWhen": {
1239
+ "IAC": [
1240
+ "terraform"
1241
+ ],
1242
+ "CLOUD": [
1243
+ "aws",
1244
+ "azure",
1245
+ "gcp"
1246
+ ]
1247
+ }
1248
+ },
1249
+ {
1250
+ "id": "ff-infracost-fallback",
1251
+ "type": "fitness-fn",
1252
+ "label": "Cost change in review",
1253
+ "x": 1040,
1254
+ "y": 1560,
1255
+ "characteristic": "other",
1256
+ "scope": "atomic",
1257
+ "cadence": "triggered",
1258
+ "trigger": "pull-request",
1259
+ "invocation": "manual",
1260
+ "description": "Infracost compares the cost of the pull request's Terraform with the main branch and comments the difference; the step then fails above the limit unless the budget owner has added the label budget-approved, which only they may add (a CODEOWNERS-protected label rule or a workflow that checks who added it).\n\nThreshold: 100% of infrastructure pull requests show the monthly cost change; above {{COST_STEP}} a month the check fails until the pull request carries the label budget-approved\n\nTool: Infracost with the GitHub CLI\n\n```bash\ninfracost breakdown --path . --format json --out-file base.json # run on the main branch checkout\ninfracost diff --path . --compare-to base.json --format json --out-file diff.json\ninfracost comment github --path diff.json --repo \"$GITHUB_REPOSITORY\" \\\n --pull-request \"$PR_NUMBER\" --github-token \"$GITHUB_TOKEN\" --behavior update\nincrease=$(jq -r '(.diffTotalMonthlyCost // \"0\") | tonumber | floor' diff.json)\napproved=$(gh pr view \"$PR_NUMBER\" --json labels -q '.labels[].name' | grep -cx budget-approved || true)\n[ \"$increase\" -le {{COST_STEP}} ] || [ \"$approved\" -gt 0 ] \\\n || { echo \"adds $increase a month: the budget owner adds the label budget-approved\"; exit 1; }\n```",
1261
+ "hubWhen": {
1262
+ "IAC": [
1263
+ "native"
1264
+ ],
1265
+ "CLOUD": [
1266
+ "gcp"
1267
+ ]
1268
+ }
1269
+ },
1270
+ {
1271
+ "id": "ff-paas-aws",
1272
+ "type": "fitness-fn",
1273
+ "label": "Scaled on ECS on Fargate",
1274
+ "x": 1040,
1275
+ "y": 1690,
1276
+ "characteristic": "reliability",
1277
+ "scope": "atomic",
1278
+ "cadence": "triggered",
1279
+ "trigger": "deploy",
1280
+ "invocation": "automated",
1281
+ "description": "A check after each deploy reads the production service's scaling settings from ECS on Fargate and fails when fewer than 2 instances are kept or no autoscaling range exists above them.\n\nThreshold: The production service runs at least 2 instances and autoscales above that minimum\n\nTool: AWS CLI (ecs, application-autoscaling); App Runner: describe-service and its auto-scaling configuration's MinSize\n\n```bash\n#!/usr/bin/env bash\n# production: the service keeps at least 2 tasks and has an autoscaling target above them\nset -euo pipefail\ndesired=$(aws ecs describe-services --cluster \"$CLUSTER\" --services \"$SERVICE\" --query 'services[0].desiredCount' --output text)\nread -r min max < <(aws application-autoscaling describe-scalable-targets --service-namespace ecs \\\n --resource-ids \"service/$CLUSTER/$SERVICE\" --query 'ScalableTargets[0].[MinCapacity, MaxCapacity]' --output text)\n[ \"$desired\" -ge 2 ] && [ \"$min\" != None ] && [ \"$min\" -ge 2 ] && [ \"$max\" -gt \"$min\" ] \\\n || { echo \"desired $desired, autoscaling $min-$max (at least 2, scaling above it)\"; exit 1; }\n```",
1282
+ "hubWhen": {
1283
+ "HOSTING": [
1284
+ "paas"
1285
+ ],
1286
+ "CLOUD": [
1287
+ "aws"
1288
+ ]
1289
+ }
1290
+ },
1291
+ {
1292
+ "id": "ff-paas-azure",
1293
+ "type": "fitness-fn",
1294
+ "label": "Scaled on Container Apps",
1295
+ "x": 1040,
1296
+ "y": 1820,
1297
+ "characteristic": "reliability",
1298
+ "scope": "atomic",
1299
+ "cadence": "triggered",
1300
+ "trigger": "deploy",
1301
+ "invocation": "automated",
1302
+ "description": "A check after each deploy reads the production service's scaling settings from Container Apps and fails when fewer than 2 instances are kept or no autoscaling range exists above them.\n\nThreshold: The production service runs at least 2 instances and autoscales above that minimum\n\nTool: Azure CLI (containerapp)\n\n```bash\n#!/usr/bin/env bash\n# production: the container app keeps at least 2 replicas and scales above them\nset -euo pipefail\nread -r min max < <(az containerapp show --name \"$APP\" --resource-group \"$RESOURCE_GROUP\" \\\n --query '[properties.template.scale.minReplicas, properties.template.scale.maxReplicas]' --output tsv)\n[ \"$min\" -ge 2 ] && [ \"$max\" -gt \"$min\" ] || { echo \"replicas $min-$max (at least 2, scaling above it)\"; exit 1; }\n```",
1303
+ "hubWhen": {
1304
+ "HOSTING": [
1305
+ "paas"
1306
+ ],
1307
+ "CLOUD": [
1308
+ "azure"
1309
+ ]
1310
+ }
1311
+ },
1312
+ {
1313
+ "id": "ff-paas-gcp",
1314
+ "type": "fitness-fn",
1315
+ "label": "Scaled on Cloud Run",
1316
+ "x": 1040,
1317
+ "y": 1950,
1318
+ "characteristic": "reliability",
1319
+ "scope": "atomic",
1320
+ "cadence": "triggered",
1321
+ "trigger": "deploy",
1322
+ "invocation": "automated",
1323
+ "description": "A check after each deploy reads the production service's scaling settings from Cloud Run and fails when fewer than 2 instances are kept or no autoscaling range exists above them.\n\nThreshold: The production service runs at least 2 instances and autoscales above that minimum\n\nTool: gcloud (run services) with jq\n\n```bash\n#!/usr/bin/env bash\n# production: the service keeps at least 2 instances and scales above them\nset -euo pipefail\nread -r min max < <(gcloud run services describe \"$SERVICE\" --region \"$REGION\" --format=json \\\n | jq -r '.spec.template.metadata.annotations | \"\\(.[\"autoscaling.knative.dev/minScale\"] // 0) \\(.[\"autoscaling.knative.dev/maxScale\"] // 0)\"')\n[ \"$min\" -ge 2 ] && [ \"$max\" -gt \"$min\" ] || { echo \"instances $min-$max (at least 2, scaling above it)\"; exit 1; }\n```",
1324
+ "hubWhen": {
1325
+ "HOSTING": [
1326
+ "paas"
1327
+ ],
1328
+ "CLOUD": [
1329
+ "gcp"
1330
+ ]
1331
+ }
1332
+ },
1333
+ {
1334
+ "id": "ff-kube-score",
1335
+ "type": "fitness-fn",
1336
+ "label": "Manifests well specified",
1337
+ "x": 1040,
1338
+ "y": 2080,
1339
+ "characteristic": "reliability",
1340
+ "scope": "atomic",
1341
+ "cadence": "triggered",
1342
+ "trigger": "pull-request",
1343
+ "invocation": "automated",
1344
+ "description": "The rendered manifests of every chart or overlay are scored in each pull request; a critical finding fails the build. The chart renders its PodDisruptionBudget with the Deployment, so the deployment-has-poddisruptionbudget check sees both; the user-and-group and read-only-root-file-system checks are on by default in current kube-score. The defaults that ask for more than the requirement (a CPU limit, ephemeral-storage requests and limits, pull policy Always, a NetworkPolicy per pod, host anti-affinity) are switched off; network reachability is not decided in this pack.\n\nThreshold: 0 critical kube-score findings in the rendered manifests (CPU and memory requests, memory limit, probes, replicas, PodDisruptionBudget, non-root user and group, read-only root file system, and kube-score's correctness checks), with the default checks the requirement does not ask for switched off\n\nTool: kube-score\n\n```bash\nhelm template order-api charts/order-api -f charts/order-api/values-production.yaml \\\n | kube-score score - --output-format ci \\\n --ignore-container-cpu-limit \\\n --ignore-test container-ephemeral-storage-request-and-limit \\\n --ignore-test container-image-pull-policy \\\n --ignore-test pod-networkpolicy \\\n --ignore-test deployment-has-host-podantiaffinity \\\n --ignore-test statefulset-has-host-podantiaffinity\n```",
1345
+ "hubWhen": {
1346
+ "HOSTING": [
1347
+ "kubernetes"
1348
+ ]
1349
+ }
1350
+ },
1351
+ {
1352
+ "id": "ff-kube-score-onprem",
1353
+ "type": "fitness-fn",
1354
+ "label": "Manifests well specified",
1355
+ "x": 1040,
1356
+ "y": 2210,
1357
+ "characteristic": "reliability",
1358
+ "scope": "atomic",
1359
+ "cadence": "triggered",
1360
+ "trigger": "pull-request",
1361
+ "invocation": "automated",
1362
+ "description": "The rendered manifests of every chart or overlay are scored in each pull request; a critical finding fails the build. The chart renders its PodDisruptionBudget with the Deployment, so the deployment-has-poddisruptionbudget check sees both; the user-and-group and read-only-root-file-system checks are on by default in current kube-score. The defaults that ask for more than the requirement (a CPU limit, ephemeral-storage requests and limits, pull policy Always, a NetworkPolicy per pod, host anti-affinity) are switched off; network reachability is not decided in this pack.\n\nThreshold: 0 critical kube-score findings in the rendered manifests (CPU and memory requests, memory limit, probes, replicas, PodDisruptionBudget, non-root user and group, read-only root file system, and kube-score's correctness checks), with the default checks the requirement does not ask for switched off\n\nTool: kube-score\n\n```bash\nhelm template order-api charts/order-api -f charts/order-api/values-production.yaml \\\n | kube-score score - --output-format ci \\\n --ignore-container-cpu-limit \\\n --ignore-test container-ephemeral-storage-request-and-limit \\\n --ignore-test container-image-pull-policy \\\n --ignore-test pod-networkpolicy \\\n --ignore-test deployment-has-host-podantiaffinity \\\n --ignore-test statefulset-has-host-podantiaffinity\n```",
1363
+ "hubWhen": {
1364
+ "HOSTING": [
1365
+ "paas",
1366
+ "serverless"
1367
+ ],
1368
+ "CLOUD": [
1369
+ "onprem"
1370
+ ]
1371
+ }
1372
+ },
1373
+ {
1374
+ "id": "ff-functions-aws",
1375
+ "type": "fitness-fn",
1376
+ "label": "Lambda functions bounded",
1377
+ "x": 1040,
1378
+ "y": 2340,
1379
+ "characteristic": "reliability",
1380
+ "scope": "atomic",
1381
+ "cadence": "triggered",
1382
+ "trigger": "deploy",
1383
+ "invocation": "automated",
1384
+ "description": "A check after each deploy lists the account's functions and fails on one with neither a reserved concurrency nor a maximum concurrency on each of its SQS triggers (the event source mapping's ScalingConfig, which caps the function's pollers without carving from the account's pool), or without either a dead-letter queue or an on-failure destination. Provisioned concurrency keeps instances warm but sets no ceiling, so it does not count as a limit.\n\nThreshold: 100% of functions have a concurrency limit (reserved concurrency, or a maximum concurrency on every SQS trigger) and a dead-letter queue or on-failure destination\n\nTool: AWS CLI (lambda) with jq\n\n```bash\n#!/usr/bin/env bash\n# every function: a concurrency limit (reserved, or a maximum on every SQS trigger)\n# and a dead-letter queue or on-failure destination\nset -euo pipefail\nfail=0\nfor fn in $(aws lambda list-functions --query 'Functions[].FunctionName' --output text); do\n reserved=$(aws lambda get-function-concurrency --function-name \"$fn\" --query ReservedConcurrentExecutions --output text)\n read -r sqs unbounded < <(aws lambda list-event-source-mappings --function-name \"$fn\" --output json | jq -r '\n [.EventSourceMappings[] | select(.EventSourceArn | startswith(\"arn:aws:sqs:\"))]\n | \"\\(length) \\(map(select(.ScalingConfig.MaximumConcurrency == null)) | length)\"')\n dlq=$(aws lambda get-function-configuration --function-name \"$fn\" --query 'DeadLetterConfig.TargetArn' --output text)\n dest=$(aws lambda get-function-event-invoke-config --function-name \"$fn\" \\\n --query 'DestinationConfig.OnFailure.Destination' --output text 2>/dev/null || echo None)\n if [ \"$reserved\" = None ] && { [ \"$sqs\" -eq 0 ] || [ \"$unbounded\" -gt 0 ]; }; then\n echo \"$fn: no concurrency limit (reserved, or a maximum concurrency on every SQS trigger)\"; fail=1\n fi\n [ \"$dlq\" != None ] || [ \"$dest\" != None ] || { echo \"$fn: no dead-letter queue or on-failure destination\"; fail=1; }\ndone\nexit $fail\n```",
1385
+ "hubWhen": {
1386
+ "HOSTING": [
1387
+ "serverless"
1388
+ ],
1389
+ "CLOUD": [
1390
+ "aws"
1391
+ ]
1392
+ }
1393
+ },
1394
+ {
1395
+ "id": "ff-functions-azure",
1396
+ "type": "fitness-fn",
1397
+ "label": "Azure Functions functions bounded",
1398
+ "x": 1040,
1399
+ "y": 2470,
1400
+ "characteristic": "reliability",
1401
+ "scope": "atomic",
1402
+ "cadence": "triggered",
1403
+ "trigger": "deploy",
1404
+ "invocation": "automated",
1405
+ "description": "A check after each deploy lists the subscription's function apps and fails on one whose site configuration has no scale-out limit. Failed Service Bus and Event Hubs events dead-letter on the queue itself, which the Messaging pack decides; Flex Consumption apps carry the limit in az functionapp scale config show instead.\n\nThreshold: 100% of function apps have a scale-out limit (functionAppScaleLimit above 0)\n\nTool: Azure CLI (functionapp)\n\n```bash\n#!/usr/bin/env bash\n# every function app: a scale-out limit\nset -euo pipefail\nfail=0\nwhile IFS=$'\\t' read -r name group; do\n limit=$(az functionapp config show --name \"$name\" --resource-group \"$group\" --query functionAppScaleLimit --output tsv)\n [ \"${limit:-0}\" -gt 0 ] || { echo \"$name: no scale-out limit (functionAppScaleLimit)\"; fail=1; }\ndone < <(az functionapp list --query '[].[name, resourceGroup]' --output tsv)\nexit $fail\n```",
1406
+ "hubWhen": {
1407
+ "HOSTING": [
1408
+ "serverless"
1409
+ ],
1410
+ "CLOUD": [
1411
+ "azure"
1412
+ ]
1413
+ }
1414
+ },
1415
+ {
1416
+ "id": "ff-functions-gcp",
1417
+ "type": "fitness-fn",
1418
+ "label": "Cloud Run functions functions bounded",
1419
+ "x": 1040,
1420
+ "y": 2600,
1421
+ "characteristic": "reliability",
1422
+ "scope": "atomic",
1423
+ "cadence": "triggered",
1424
+ "trigger": "deploy",
1425
+ "invocation": "automated",
1426
+ "description": "A check after each deploy lists the project's functions (2nd gen) and fails on one without a maximum instance count or, for an event trigger, without an explicit retry policy; failed events dead-letter on the Pub/Sub subscription, which the Messaging pack decides.\n\nThreshold: 100% of functions have a maximum instance count, and every event-triggered one an explicit retry policy\n\nTool: gcloud (functions)\n\n```bash\n#!/usr/bin/env bash\n# every function: a maximum instance count; event-triggered ones an explicit retry policy\nset -euo pipefail\nfail=0\nwhile IFS=, read -r name max trigger retry; do\n [ -n \"$max\" ] && [ \"$max\" -gt 0 ] || { echo \"$name: no maximum instance count\"; fail=1; }\n [ -z \"$trigger\" ] || [ -n \"$retry\" ] || { echo \"$name: event trigger without an explicit retry policy\"; fail=1; }\ndone < <(gcloud functions list --v2 --format='csv[no-heading](name, serviceConfig.maxInstanceCount, eventTrigger.trigger, eventTrigger.retryPolicy)')\nexit $fail\n```",
1427
+ "hubWhen": {
1428
+ "HOSTING": [
1429
+ "serverless"
1430
+ ],
1431
+ "CLOUD": [
1432
+ "gcp"
1433
+ ]
1434
+ }
1435
+ },
1436
+ {
1437
+ "id": "ff-image-age",
1438
+ "type": "fitness-fn",
1439
+ "label": "No machine on an old image",
1440
+ "x": 1040,
1441
+ "y": 2730,
1442
+ "characteristic": "security",
1443
+ "scope": "atomic",
1444
+ "cadence": "continual",
1445
+ "invocation": "automated",
1446
+ "description": "Packer bakes the build time into /etc/image-release; at boot, cloud-init writes it as a node_exporter textfile metric, and a Prometheus rule fires for any machine whose image is older than 30 days, in every cloud and on premises alike.\n\nThreshold: 0 machines whose image was built more than 30 days ago; the alert opens a ticket after 1 hour\n\nTool: Prometheus with node_exporter (textfile collector)\n\n```yaml\n# at boot (cloud-init), from the file Packer baked in: /etc/image-release holds BUILD_DATE=<epoch seconds>\n# . /etc/image-release && echo \"image_build_timestamp_seconds $BUILD_DATE\" > /var/lib/node_exporter/textfile/image.prom\ngroups:\n - name: machine-images\n rules:\n - alert: MachineImageOlderThan30Days\n expr: time() - image_build_timestamp_seconds > 30 * 86400\n for: 1h\n labels: { severity: ticket }\n annotations:\n summary: \"{{ $labels.instance }} runs an image built {{ $value | humanizeDuration }} ago; replace it from the current image\"\n```",
1447
+ "hubWhen": {
1448
+ "HOSTING": [
1449
+ "vms"
1450
+ ]
1451
+ }
1452
+ },
1453
+ {
1454
+ "id": "ff-cdn-origin",
1455
+ "type": "fitness-fn",
1456
+ "label": "Only through the CDN",
1457
+ "x": 1040,
1458
+ "y": 2860,
1459
+ "characteristic": "performance-efficiency",
1460
+ "scope": "atomic",
1461
+ "cadence": "triggered",
1462
+ "trigger": "deploy",
1463
+ "invocation": "automated",
1464
+ "description": "A check after each deploy fetches the page and one content-hashed asset of the build through the CDN and reads their headers against adr-cdn's caching rule (hashed assets cached for a year, the page revalidated), then requests the page directly from the origin bucket's URL and expects it refused: 403 or 404 from S3 and Cloud Storage, 409 (PublicAccessNotPermitted) from Azure Blob Storage with public access off.\n\nThreshold: The site answers over TLS with an HSTS header; its page with Cache-Control no-cache (or max-age=0 with must-revalidate) and a content-hashed asset with max-age=31536000; the origin answers a direct request for the page with 403, 404 or 409\n\nTool: curl (post-deploy check)\n\n```bash\n#!/usr/bin/env bash\n# SITE_URL: through the CDN; ORIGIN_URL: the bucket's own endpoint;\n# ASSET_PATH: one content-hashed file of this build (by default the first script under dist/assets)\nset -euo pipefail\nasset=${ASSET_PATH:-$(cd dist && ls assets/*.js | head -n 1)}\npage=$(curl -fsSI \"$SITE_URL/\" | tr -d '\\r')\ngrep -qi '^strict-transport-security:' <<<\"$page\" || { echo \"no HSTS header on $SITE_URL\"; exit 1; }\npage_cc=$(grep -i '^cache-control:' <<<\"$page\" || true)\n[[ \"$page_cc\" =~ no-cache ]] || { [[ \"$page_cc\" =~ max-age=0([^0-9]|$) ]] && [[ \"$page_cc\" =~ must-revalidate ]]; } \\\n || { echo \"the page is not revalidated on each request ($page_cc)\"; exit 1; }\nasset_cc=$(curl -fsSI \"$SITE_URL/$asset\" | tr -d '\\r' | grep -i '^cache-control:' || true)\n[[ \"$asset_cc\" =~ max-age=31536000 ]] || { echo \"$asset is not cached for a year ($asset_cc)\"; exit 1; }\ncode=$(curl -s -o /dev/null -w '%{http_code}' \"$ORIGIN_URL/index.html\")\n[ \"$code\" = 403 ] || [ \"$code\" = 404 ] || [ \"$code\" = 409 ] \\\n || { echo \"origin $ORIGIN_URL answers $code to a direct request (must refuse)\"; exit 1; }\n```",
1465
+ "hubWhen": {
1466
+ "HOSTING": [
1467
+ "cdn"
1468
+ ]
1469
+ }
1470
+ },
1471
+ {
1472
+ "id": "ff-ephemeral-k8s",
1473
+ "type": "fitness-fn",
1474
+ "label": "No forgotten environments (namespaces)",
1475
+ "x": 1040,
1476
+ "y": 2990,
1477
+ "characteristic": "other",
1478
+ "scope": "atomic",
1479
+ "cadence": "triggered",
1480
+ "trigger": "nightly",
1481
+ "invocation": "automated",
1482
+ "description": "A scheduled job lists the namespaces labelled as ephemeral, deletes those whose pull request is closed or whose last deploy (an annotation the deploy writes) is past the limit, and reports what it removed. Runs on Linux (GNU date).\n\nThreshold: 0 ephemeral namespaces alive after their pull request closed or idle for more than {{EPHEMERAL_HOURS}} hours\n\nTool: kubectl with the GitHub CLI (scheduled job)\n\n```bash\n#!/usr/bin/env bash\nset -euo pipefail\nlimit=$(( $(date +%s) - {{EPHEMERAL_HOURS}} * 3600 ))\nkubectl get ns -l env-type=ephemeral -o json \\\n | jq -r '.items[] | [.metadata.name, .metadata.labels.pr, (.metadata.annotations[\"last-deploy\"] // \"\")] | @tsv' |\nwhile IFS=$'\\t' read -r ns pr last; do\n state=$(gh pr view \"$pr\" --repo \"$GITHUB_REPOSITORY\" --json state -q .state)\n if [ \"$state\" != OPEN ] || [ -z \"$last\" ] || [ \"$(date -d \"$last\" +%s)\" -lt \"$limit\" ]; then\n echo \"deleting $ns (PR $pr $state, last deploy ${last:-unknown})\"; kubectl delete ns \"$ns\" --wait=false\n fi\ndone\n```",
1483
+ "hubWhen": {
1484
+ "ENVIRONMENTS": [
1485
+ "ephemeral"
1486
+ ],
1487
+ "HOSTING": [
1488
+ "kubernetes"
1489
+ ]
1490
+ }
1491
+ },
1492
+ {
1493
+ "id": "ff-ephemeral-terraform",
1494
+ "type": "fitness-fn",
1495
+ "label": "No forgotten environments (workspaces)",
1496
+ "x": 1040,
1497
+ "y": 3120,
1498
+ "characteristic": "other",
1499
+ "scope": "atomic",
1500
+ "cadence": "triggered",
1501
+ "trigger": "nightly",
1502
+ "invocation": "automated",
1503
+ "description": "A scheduled job lists the Terraform workspaces named pr-<number>, destroys those whose pull request is closed or last updated past the limit, and deletes the workspace. Runs on Linux (GNU date).\n\nThreshold: 0 ephemeral environments alive after their pull request closed or idle for more than {{EPHEMERAL_HOURS}} hours\n\nTool: Terraform with the GitHub CLI (scheduled job)\n\n```bash\n#!/usr/bin/env bash\n# in envs/ephemeral; workspaces are named pr-<number>\nset -euo pipefail\nlimit=$(( $(date +%s) - {{EPHEMERAL_HOURS}} * 3600 ))\nfor ws in $(terraform workspace list | tr -d '* ' | grep -E '^pr-[0-9]+$'); do\n pr=${ws#pr-}\n read -r state updated < <(gh pr view \"$pr\" --repo \"$GITHUB_REPOSITORY\" --json state,updatedAt -q '\"\\(.state) \\(.updatedAt)\"')\n if [ \"$state\" != OPEN ] || [ \"$(date -d \"$updated\" +%s)\" -lt \"$limit\" ]; then\n echo \"destroying $ws (PR $pr $state, last activity $updated)\"\n terraform workspace select \"$ws\"\n terraform destroy -auto-approve -input=false -var \"pr=$pr\"\n terraform workspace select default && terraform workspace delete \"$ws\"\n fi\ndone\n```",
1504
+ "hubWhen": {
1505
+ "ENVIRONMENTS": [
1506
+ "ephemeral"
1507
+ ],
1508
+ "HOSTING": [
1509
+ "paas",
1510
+ "serverless",
1511
+ "vms",
1512
+ "cdn"
1513
+ ],
1514
+ "IAC": [
1515
+ "terraform"
1516
+ ]
1517
+ }
1518
+ },
1519
+ {
1520
+ "id": "ff-ephemeral-terraform-fallback",
1521
+ "type": "fitness-fn",
1522
+ "label": "No forgotten environments (workspaces)",
1523
+ "x": 1040,
1524
+ "y": 3250,
1525
+ "characteristic": "other",
1526
+ "scope": "atomic",
1527
+ "cadence": "triggered",
1528
+ "trigger": "nightly",
1529
+ "invocation": "automated",
1530
+ "description": "A scheduled job lists the Terraform workspaces named pr-<number>, destroys those whose pull request is closed or last updated past the limit, and deletes the workspace. Runs on Linux (GNU date).\n\nThreshold: 0 ephemeral environments alive after their pull request closed or idle for more than {{EPHEMERAL_HOURS}} hours\n\nTool: Terraform with the GitHub CLI (scheduled job)\n\n```bash\n#!/usr/bin/env bash\n# in envs/ephemeral; workspaces are named pr-<number>\nset -euo pipefail\nlimit=$(( $(date +%s) - {{EPHEMERAL_HOURS}} * 3600 ))\nfor ws in $(terraform workspace list | tr -d '* ' | grep -E '^pr-[0-9]+$'); do\n pr=${ws#pr-}\n read -r state updated < <(gh pr view \"$pr\" --repo \"$GITHUB_REPOSITORY\" --json state,updatedAt -q '\"\\(.state) \\(.updatedAt)\"')\n if [ \"$state\" != OPEN ] || [ \"$(date -d \"$updated\" +%s)\" -lt \"$limit\" ]; then\n echo \"destroying $ws (PR $pr $state, last activity $updated)\"\n terraform workspace select \"$ws\"\n terraform destroy -auto-approve -input=false -var \"pr=$pr\"\n terraform workspace select default && terraform workspace delete \"$ws\"\n fi\ndone\n```",
1531
+ "hubWhen": {
1532
+ "ENVIRONMENTS": [
1533
+ "ephemeral"
1534
+ ],
1535
+ "HOSTING": [
1536
+ "paas",
1537
+ "serverless",
1538
+ "vms",
1539
+ "cdn"
1540
+ ],
1541
+ "IAC": [
1542
+ "native"
1543
+ ],
1544
+ "CLOUD": [
1545
+ "gcp",
1546
+ "onprem"
1547
+ ]
1548
+ }
1549
+ },
1550
+ {
1551
+ "id": "ff-ephemeral-pulumi",
1552
+ "type": "fitness-fn",
1553
+ "label": "No forgotten environments (stacks)",
1554
+ "x": 1040,
1555
+ "y": 3380,
1556
+ "characteristic": "other",
1557
+ "scope": "atomic",
1558
+ "cadence": "triggered",
1559
+ "trigger": "nightly",
1560
+ "invocation": "automated",
1561
+ "description": "A scheduled job lists the stacks named pr-<number> with their last update, destroys those whose pull request is closed or last updated past the limit, and removes the stack. Runs on Linux (GNU date).\n\nThreshold: 0 ephemeral environments alive after their pull request closed or idle for more than {{EPHEMERAL_HOURS}} hours\n\nTool: Pulumi with the GitHub CLI (scheduled job)\n\n```bash\n#!/usr/bin/env bash\n# stacks are named pr-<number>\nset -euo pipefail\nlimit=$(( $(date +%s) - {{EPHEMERAL_HOURS}} * 3600 ))\npulumi stack ls --json | jq -r '.[] | select(.name | test(\"^pr-[0-9]+$\")) | \"\\(.name) \\(.lastUpdate // \"\")\"' |\nwhile read -r stack last; do\n pr=${stack#pr-}\n state=$(gh pr view \"$pr\" --repo \"$GITHUB_REPOSITORY\" --json state -q .state)\n if [ \"$state\" != OPEN ] || [ -z \"$last\" ] || [ \"$(date -d \"$last\" +%s)\" -lt \"$limit\" ]; then\n echo \"destroying $stack (PR $pr $state, last update ${last:-unknown})\"\n pulumi destroy --stack \"$stack\" --yes --non-interactive && pulumi stack rm \"$stack\" --yes\n fi\ndone\n```",
1562
+ "hubWhen": {
1563
+ "ENVIRONMENTS": [
1564
+ "ephemeral"
1565
+ ],
1566
+ "HOSTING": [
1567
+ "paas",
1568
+ "serverless",
1569
+ "vms",
1570
+ "cdn"
1571
+ ],
1572
+ "IAC": [
1573
+ "pulumi"
1574
+ ]
1575
+ }
1576
+ },
1577
+ {
1578
+ "id": "ff-ephemeral-native",
1579
+ "type": "fitness-fn",
1580
+ "label": "No forgotten environments (stacks and resource groups)",
1581
+ "x": 1040,
1582
+ "y": 3510,
1583
+ "characteristic": "other",
1584
+ "scope": "atomic",
1585
+ "cadence": "triggered",
1586
+ "trigger": "nightly",
1587
+ "invocation": "automated",
1588
+ "description": "A scheduled job runs the part for the cloud in use (the CLOUD variable): on AWS it lists the CloudFormation stacks tagged pr=<number>, on Azure the resource groups tagged pr=<number>, and deletes those whose pull request is closed or last updated past the limit. Runs on Linux (GNU date).\n\nThreshold: 0 ephemeral environments alive after their pull request closed or idle for more than {{EPHEMERAL_HOURS}} hours\n\nTool: AWS CLI (cloudformation) or Azure CLI (group) with the GitHub CLI (scheduled job)\n\n```bash\n#!/usr/bin/env bash\n# the pipeline sets CLOUD to aws or azure; ephemeral stacks or resource groups are tagged pr=<number>\nset -euo pipefail\nlimit=$(( $(date +%s) - {{EPHEMERAL_HOURS}} * 3600 ))\ngone() { [ \"$(gh pr view \"$1\" --repo \"$GITHUB_REPOSITORY\" --json state -q .state)\" != OPEN ] || [ \"$(date -d \"$2\" +%s)\" -lt \"$limit\" ]; }\ncase \"$CLOUD\" in\n aws)\n aws cloudformation describe-stacks \\\n --query \"Stacks[?Tags[?Key=='pr']].[StackName, Tags[?Key=='pr'].Value | [0], LastUpdatedTime || CreationTime]\" --output text |\n while IFS=$'\\t' read -r stack pr updated; do\n if gone \"$pr\" \"$updated\"; then echo \"deleting $stack (PR $pr)\"; aws cloudformation delete-stack --stack-name \"$stack\"; fi\n done ;;\n azure)\n az group list --query \"[?tags.pr].[name, tags.pr]\" --output tsv |\n while IFS=$'\\t' read -r group pr; do\n updated=$(gh pr view \"$pr\" --repo \"$GITHUB_REPOSITORY\" --json updatedAt -q .updatedAt)\n if gone \"$pr\" \"$updated\"; then echo \"deleting $group (PR $pr)\"; az group delete --name \"$group\" --yes --no-wait; fi\n done ;;\nesac\n```",
1589
+ "hubWhen": {
1590
+ "ENVIRONMENTS": [
1591
+ "ephemeral"
1592
+ ],
1593
+ "HOSTING": [
1594
+ "paas",
1595
+ "serverless",
1596
+ "vms",
1597
+ "cdn"
1598
+ ],
1599
+ "IAC": [
1600
+ "native"
1601
+ ],
1602
+ "CLOUD": [
1603
+ "aws",
1604
+ "azure"
1605
+ ]
1606
+ }
1607
+ },
1608
+ {
1609
+ "id": "ff-parity",
1610
+ "type": "fitness-fn",
1611
+ "label": "Environments share their code",
1612
+ "x": 1040,
1613
+ "y": 3640,
1614
+ "characteristic": "maintainability",
1615
+ "scope": "atomic",
1616
+ "cadence": "triggered",
1617
+ "trigger": "pull-request",
1618
+ "invocation": "automated",
1619
+ "description": "A check in every pull request compares the test environment's root with production's, ignoring the variable files of the tool in use (tfvars, Pulumi stack configuration, Bicep or CloudFormation parameter files); any other difference, a module version or an extra resource, fails it.\n\nThreshold: The test environment's and production's folders under envs/ differ only in their variable files\n\nTool: diff (CI job)\n\n```bash\n#!/usr/bin/env bash\n# TEST_ENV: staging, or test when there is no staging\nset -euo pipefail\ndiff -rq \"envs/${TEST_ENV:-staging}\" envs/production \\\n --exclude='*.tfvars' --exclude='*.auto.tfvars' --exclude='Pulumi.*.yaml' --exclude='*.bicepparam' --exclude='*.params.json' \\\n && echo \"environments share the same code\" \\\n || { echo \"the environments differ beyond their variable files (above)\"; exit 1; }\n```"
1620
+ },
1621
+ {
1622
+ "id": "ff-promote",
1623
+ "type": "fitness-fn",
1624
+ "label": "Only the tested digest reaches production",
1625
+ "x": 1040,
1626
+ "y": 3770,
1627
+ "characteristic": "reliability",
1628
+ "scope": "atomic",
1629
+ "cadence": "triggered",
1630
+ "trigger": "deploy",
1631
+ "invocation": "automated",
1632
+ "description": "The staging deploy job records the image digest in the payload of the GitHub deployment it creates; the production deploy job reads the latest staging deployment's payload and refuses to continue with any other digest, so production never gets a rebuild or a newer image than staging tested.\n\nThreshold: The digest the production deploy job deploys equals the digest recorded by the latest staging deployment; any other digest fails the job\n\nTool: GitHub CLI (deployments API) in the deploy pipeline\n\n```bash\n#!/usr/bin/env bash\n# production deploy step; IMAGE_DIGEST is what this job is about to deploy\nset -euo pipefail\ntested=$(gh api \"repos/$GITHUB_REPOSITORY/deployments?environment=staging&per_page=1\" -q '.[0].payload.digest')\n[ \"$tested\" = \"$IMAGE_DIGEST\" ] || { echo \"production would get $IMAGE_DIGEST; staging tested $tested\"; exit 1; }\n# the staging deploy job created its deployment with:\n# gh api \"repos/$GITHUB_REPOSITORY/deployments\" -f ref=\"$GITHUB_SHA\" -f environment=staging -f \"payload[digest]=$IMAGE_DIGEST\"\n```",
1633
+ "hubWhen": {
1634
+ "ENVIRONMENTS": [
1635
+ "staged",
1636
+ "ephemeral"
1637
+ ]
1638
+ }
1639
+ }
1640
+ ],
1641
+ "relations": [
1642
+ {
1643
+ "id": "req-iac--derives--need",
1644
+ "sourceId": "req-iac",
1645
+ "targetId": "need",
1646
+ "relationType": "derives"
1647
+ },
1648
+ {
1649
+ "id": "req-policy--derives--need",
1650
+ "sourceId": "req-policy",
1651
+ "targetId": "need",
1652
+ "relationType": "derives"
1653
+ },
1654
+ {
1655
+ "id": "req-parity--derives--need",
1656
+ "sourceId": "req-parity",
1657
+ "targetId": "need",
1658
+ "relationType": "derives"
1659
+ },
1660
+ {
1661
+ "id": "req-drift--derives--need",
1662
+ "sourceId": "req-drift",
1663
+ "targetId": "need",
1664
+ "relationType": "derives"
1665
+ },
1666
+ {
1667
+ "id": "req-budget--derives--need",
1668
+ "sourceId": "req-budget",
1669
+ "targetId": "need",
1670
+ "relationType": "derives"
1671
+ },
1672
+ {
1673
+ "id": "req-cost-review--derives--need",
1674
+ "sourceId": "req-cost-review",
1675
+ "targetId": "need",
1676
+ "relationType": "derives"
1677
+ },
1678
+ {
1679
+ "id": "req-cost-review-fallback--derives--need",
1680
+ "sourceId": "req-cost-review-fallback",
1681
+ "targetId": "need",
1682
+ "relationType": "derives"
1683
+ },
1684
+ {
1685
+ "id": "req-cost-estimate--derives--need",
1686
+ "sourceId": "req-cost-estimate",
1687
+ "targetId": "need",
1688
+ "relationType": "derives"
1689
+ },
1690
+ {
1691
+ "id": "req-cost-estimate-native--derives--need",
1692
+ "sourceId": "req-cost-estimate-native",
1693
+ "targetId": "need",
1694
+ "relationType": "derives"
1695
+ },
1696
+ {
1697
+ "id": "req-paas--derives--need",
1698
+ "sourceId": "req-paas",
1699
+ "targetId": "need",
1700
+ "relationType": "derives"
1701
+ },
1702
+ {
1703
+ "id": "req-k8s--derives--need",
1704
+ "sourceId": "req-k8s",
1705
+ "targetId": "need",
1706
+ "relationType": "derives"
1707
+ },
1708
+ {
1709
+ "id": "req-k8s-onprem--derives--need",
1710
+ "sourceId": "req-k8s-onprem",
1711
+ "targetId": "need",
1712
+ "relationType": "derives"
1713
+ },
1714
+ {
1715
+ "id": "req-functions--derives--need",
1716
+ "sourceId": "req-functions",
1717
+ "targetId": "need",
1718
+ "relationType": "derives"
1719
+ },
1720
+ {
1721
+ "id": "req-images--derives--need",
1722
+ "sourceId": "req-images",
1723
+ "targetId": "need",
1724
+ "relationType": "derives"
1725
+ },
1726
+ {
1727
+ "id": "req-cdn--derives--need",
1728
+ "sourceId": "req-cdn",
1729
+ "targetId": "need",
1730
+ "relationType": "derives"
1731
+ },
1732
+ {
1733
+ "id": "req-ephemeral--derives--need",
1734
+ "sourceId": "req-ephemeral",
1735
+ "targetId": "need",
1736
+ "relationType": "derives"
1737
+ },
1738
+ {
1739
+ "id": "req-staging--derives--need",
1740
+ "sourceId": "req-staging",
1741
+ "targetId": "need",
1742
+ "relationType": "derives"
1743
+ },
1744
+ {
1745
+ "id": "sc-iac--verifies--req-iac",
1746
+ "sourceId": "sc-iac",
1747
+ "targetId": "req-iac",
1748
+ "relationType": "verifies"
1749
+ },
1750
+ {
1751
+ "id": "sc-policy--verifies--req-policy",
1752
+ "sourceId": "sc-policy",
1753
+ "targetId": "req-policy",
1754
+ "relationType": "verifies"
1755
+ },
1756
+ {
1757
+ "id": "sc-parity--verifies--req-parity",
1758
+ "sourceId": "sc-parity",
1759
+ "targetId": "req-parity",
1760
+ "relationType": "verifies"
1761
+ },
1762
+ {
1763
+ "id": "sc-drift--verifies--req-drift",
1764
+ "sourceId": "sc-drift",
1765
+ "targetId": "req-drift",
1766
+ "relationType": "verifies"
1767
+ },
1768
+ {
1769
+ "id": "sc-budget--verifies--req-budget",
1770
+ "sourceId": "sc-budget",
1771
+ "targetId": "req-budget",
1772
+ "relationType": "verifies"
1773
+ },
1774
+ {
1775
+ "id": "sc-cost-review--verifies--req-cost-review",
1776
+ "sourceId": "sc-cost-review",
1777
+ "targetId": "req-cost-review",
1778
+ "relationType": "verifies"
1779
+ },
1780
+ {
1781
+ "id": "sc-cost-review-fallback--verifies--req-cost-review-fallback",
1782
+ "sourceId": "sc-cost-review-fallback",
1783
+ "targetId": "req-cost-review-fallback",
1784
+ "relationType": "verifies"
1785
+ },
1786
+ {
1787
+ "id": "sc-cost-estimate--verifies--req-cost-estimate",
1788
+ "sourceId": "sc-cost-estimate",
1789
+ "targetId": "req-cost-estimate",
1790
+ "relationType": "verifies"
1791
+ },
1792
+ {
1793
+ "id": "sc-cost-estimate-native--verifies--req-cost-estimate-native",
1794
+ "sourceId": "sc-cost-estimate-native",
1795
+ "targetId": "req-cost-estimate-native",
1796
+ "relationType": "verifies"
1797
+ },
1798
+ {
1799
+ "id": "sc-paas--verifies--req-paas",
1800
+ "sourceId": "sc-paas",
1801
+ "targetId": "req-paas",
1802
+ "relationType": "verifies"
1803
+ },
1804
+ {
1805
+ "id": "sc-k8s--verifies--req-k8s",
1806
+ "sourceId": "sc-k8s",
1807
+ "targetId": "req-k8s",
1808
+ "relationType": "verifies"
1809
+ },
1810
+ {
1811
+ "id": "sc-k8s-onprem--verifies--req-k8s-onprem",
1812
+ "sourceId": "sc-k8s-onprem",
1813
+ "targetId": "req-k8s-onprem",
1814
+ "relationType": "verifies"
1815
+ },
1816
+ {
1817
+ "id": "sc-functions--verifies--req-functions",
1818
+ "sourceId": "sc-functions",
1819
+ "targetId": "req-functions",
1820
+ "relationType": "verifies"
1821
+ },
1822
+ {
1823
+ "id": "sc-images--verifies--req-images",
1824
+ "sourceId": "sc-images",
1825
+ "targetId": "req-images",
1826
+ "relationType": "verifies"
1827
+ },
1828
+ {
1829
+ "id": "sc-cdn--verifies--req-cdn",
1830
+ "sourceId": "sc-cdn",
1831
+ "targetId": "req-cdn",
1832
+ "relationType": "verifies"
1833
+ },
1834
+ {
1835
+ "id": "sc-ephemeral--verifies--req-ephemeral",
1836
+ "sourceId": "sc-ephemeral",
1837
+ "targetId": "req-ephemeral",
1838
+ "relationType": "verifies"
1839
+ },
1840
+ {
1841
+ "id": "sc-staging--verifies--req-staging",
1842
+ "sourceId": "sc-staging",
1843
+ "targetId": "req-staging",
1844
+ "relationType": "verifies"
1845
+ },
1846
+ {
1847
+ "id": "ff-checkov--implements--adr-iac-terraform",
1848
+ "sourceId": "ff-checkov",
1849
+ "targetId": "adr-iac-terraform",
1850
+ "relationType": "implements"
1851
+ },
1852
+ {
1853
+ "id": "ff-checkov-fallback--implements--adr-iac-native-fallback",
1854
+ "sourceId": "ff-checkov-fallback",
1855
+ "targetId": "adr-iac-native-fallback",
1856
+ "relationType": "implements"
1857
+ },
1858
+ {
1859
+ "id": "ff-checkov-native--implements--adr-iac-native",
1860
+ "sourceId": "ff-checkov-native",
1861
+ "targetId": "adr-iac-native",
1862
+ "relationType": "implements"
1863
+ },
1864
+ {
1865
+ "id": "ff-crossguard--implements--adr-iac-pulumi",
1866
+ "sourceId": "ff-crossguard",
1867
+ "targetId": "adr-iac-pulumi",
1868
+ "relationType": "implements"
1869
+ },
1870
+ {
1871
+ "id": "ff-drift-terraform--implements--adr-iac-terraform",
1872
+ "sourceId": "ff-drift-terraform",
1873
+ "targetId": "adr-iac-terraform",
1874
+ "relationType": "implements"
1875
+ },
1876
+ {
1877
+ "id": "ff-drift-terraform-fallback--implements--adr-iac-native-fallback",
1878
+ "sourceId": "ff-drift-terraform-fallback",
1879
+ "targetId": "adr-iac-native-fallback",
1880
+ "relationType": "implements"
1881
+ },
1882
+ {
1883
+ "id": "ff-drift-pulumi--implements--adr-iac-pulumi",
1884
+ "sourceId": "ff-drift-pulumi",
1885
+ "targetId": "adr-iac-pulumi",
1886
+ "relationType": "implements"
1887
+ },
1888
+ {
1889
+ "id": "ff-drift-native--implements--adr-iac-native",
1890
+ "sourceId": "ff-drift-native",
1891
+ "targetId": "adr-iac-native",
1892
+ "relationType": "implements"
1893
+ },
1894
+ {
1895
+ "id": "ff-budget-aws--implements--adr-budget",
1896
+ "sourceId": "ff-budget-aws",
1897
+ "targetId": "adr-budget",
1898
+ "relationType": "implements"
1899
+ },
1900
+ {
1901
+ "id": "ff-budget-azure--implements--adr-budget",
1902
+ "sourceId": "ff-budget-azure",
1903
+ "targetId": "adr-budget",
1904
+ "relationType": "implements"
1905
+ },
1906
+ {
1907
+ "id": "ff-budget-gcp--implements--adr-budget",
1908
+ "sourceId": "ff-budget-gcp",
1909
+ "targetId": "adr-budget",
1910
+ "relationType": "implements"
1911
+ },
1912
+ {
1913
+ "id": "ff-infracost--implements--adr-budget",
1914
+ "sourceId": "ff-infracost",
1915
+ "targetId": "adr-budget",
1916
+ "relationType": "implements"
1917
+ },
1918
+ {
1919
+ "id": "ff-infracost-fallback--implements--adr-budget",
1920
+ "sourceId": "ff-infracost-fallback",
1921
+ "targetId": "adr-budget",
1922
+ "relationType": "implements"
1923
+ },
1924
+ {
1925
+ "id": "ff-paas-aws--implements--adr-paas",
1926
+ "sourceId": "ff-paas-aws",
1927
+ "targetId": "adr-paas",
1928
+ "relationType": "implements"
1929
+ },
1930
+ {
1931
+ "id": "ff-paas-azure--implements--adr-paas",
1932
+ "sourceId": "ff-paas-azure",
1933
+ "targetId": "adr-paas",
1934
+ "relationType": "implements"
1935
+ },
1936
+ {
1937
+ "id": "ff-paas-gcp--implements--adr-paas",
1938
+ "sourceId": "ff-paas-gcp",
1939
+ "targetId": "adr-paas",
1940
+ "relationType": "implements"
1941
+ },
1942
+ {
1943
+ "id": "ff-kube-score--implements--adr-kubernetes",
1944
+ "sourceId": "ff-kube-score",
1945
+ "targetId": "adr-kubernetes",
1946
+ "relationType": "implements"
1947
+ },
1948
+ {
1949
+ "id": "ff-kube-score-onprem--implements--adr-onprem-platform",
1950
+ "sourceId": "ff-kube-score-onprem",
1951
+ "targetId": "adr-onprem-platform",
1952
+ "relationType": "implements"
1953
+ },
1954
+ {
1955
+ "id": "ff-functions-aws--implements--adr-serverless",
1956
+ "sourceId": "ff-functions-aws",
1957
+ "targetId": "adr-serverless",
1958
+ "relationType": "implements"
1959
+ },
1960
+ {
1961
+ "id": "ff-functions-azure--implements--adr-serverless",
1962
+ "sourceId": "ff-functions-azure",
1963
+ "targetId": "adr-serverless",
1964
+ "relationType": "implements"
1965
+ },
1966
+ {
1967
+ "id": "ff-functions-gcp--implements--adr-serverless",
1968
+ "sourceId": "ff-functions-gcp",
1969
+ "targetId": "adr-serverless",
1970
+ "relationType": "implements"
1971
+ },
1972
+ {
1973
+ "id": "ff-image-age--implements--adr-vms",
1974
+ "sourceId": "ff-image-age",
1975
+ "targetId": "adr-vms",
1976
+ "relationType": "implements"
1977
+ },
1978
+ {
1979
+ "id": "ff-cdn-origin--implements--adr-cdn",
1980
+ "sourceId": "ff-cdn-origin",
1981
+ "targetId": "adr-cdn",
1982
+ "relationType": "implements"
1983
+ },
1984
+ {
1985
+ "id": "ff-ephemeral-k8s--implements--adr-kubernetes",
1986
+ "sourceId": "ff-ephemeral-k8s",
1987
+ "targetId": "adr-kubernetes",
1988
+ "relationType": "implements"
1989
+ },
1990
+ {
1991
+ "id": "ff-ephemeral-terraform--implements--adr-paas",
1992
+ "sourceId": "ff-ephemeral-terraform",
1993
+ "targetId": "adr-paas",
1994
+ "relationType": "implements"
1995
+ },
1996
+ {
1997
+ "id": "ff-ephemeral-terraform--implements--adr-serverless",
1998
+ "sourceId": "ff-ephemeral-terraform",
1999
+ "targetId": "adr-serverless",
2000
+ "relationType": "implements"
2001
+ },
2002
+ {
2003
+ "id": "ff-ephemeral-terraform--implements--adr-vms",
2004
+ "sourceId": "ff-ephemeral-terraform",
2005
+ "targetId": "adr-vms",
2006
+ "relationType": "implements"
2007
+ },
2008
+ {
2009
+ "id": "ff-ephemeral-terraform--implements--adr-cdn",
2010
+ "sourceId": "ff-ephemeral-terraform",
2011
+ "targetId": "adr-cdn",
2012
+ "relationType": "implements"
2013
+ },
2014
+ {
2015
+ "id": "ff-ephemeral-terraform--implements--adr-onprem-platform",
2016
+ "sourceId": "ff-ephemeral-terraform",
2017
+ "targetId": "adr-onprem-platform",
2018
+ "relationType": "implements"
2019
+ },
2020
+ {
2021
+ "id": "ff-ephemeral-terraform-fallback--implements--adr-paas",
2022
+ "sourceId": "ff-ephemeral-terraform-fallback",
2023
+ "targetId": "adr-paas",
2024
+ "relationType": "implements"
2025
+ },
2026
+ {
2027
+ "id": "ff-ephemeral-terraform-fallback--implements--adr-serverless",
2028
+ "sourceId": "ff-ephemeral-terraform-fallback",
2029
+ "targetId": "adr-serverless",
2030
+ "relationType": "implements"
2031
+ },
2032
+ {
2033
+ "id": "ff-ephemeral-terraform-fallback--implements--adr-vms",
2034
+ "sourceId": "ff-ephemeral-terraform-fallback",
2035
+ "targetId": "adr-vms",
2036
+ "relationType": "implements"
2037
+ },
2038
+ {
2039
+ "id": "ff-ephemeral-terraform-fallback--implements--adr-cdn",
2040
+ "sourceId": "ff-ephemeral-terraform-fallback",
2041
+ "targetId": "adr-cdn",
2042
+ "relationType": "implements"
2043
+ },
2044
+ {
2045
+ "id": "ff-ephemeral-terraform-fallback--implements--adr-onprem-platform",
2046
+ "sourceId": "ff-ephemeral-terraform-fallback",
2047
+ "targetId": "adr-onprem-platform",
2048
+ "relationType": "implements"
2049
+ },
2050
+ {
2051
+ "id": "ff-ephemeral-pulumi--implements--adr-paas",
2052
+ "sourceId": "ff-ephemeral-pulumi",
2053
+ "targetId": "adr-paas",
2054
+ "relationType": "implements"
2055
+ },
2056
+ {
2057
+ "id": "ff-ephemeral-pulumi--implements--adr-serverless",
2058
+ "sourceId": "ff-ephemeral-pulumi",
2059
+ "targetId": "adr-serverless",
2060
+ "relationType": "implements"
2061
+ },
2062
+ {
2063
+ "id": "ff-ephemeral-pulumi--implements--adr-vms",
2064
+ "sourceId": "ff-ephemeral-pulumi",
2065
+ "targetId": "adr-vms",
2066
+ "relationType": "implements"
2067
+ },
2068
+ {
2069
+ "id": "ff-ephemeral-pulumi--implements--adr-cdn",
2070
+ "sourceId": "ff-ephemeral-pulumi",
2071
+ "targetId": "adr-cdn",
2072
+ "relationType": "implements"
2073
+ },
2074
+ {
2075
+ "id": "ff-ephemeral-pulumi--implements--adr-onprem-platform",
2076
+ "sourceId": "ff-ephemeral-pulumi",
2077
+ "targetId": "adr-onprem-platform",
2078
+ "relationType": "implements"
2079
+ },
2080
+ {
2081
+ "id": "ff-ephemeral-native--implements--adr-paas",
2082
+ "sourceId": "ff-ephemeral-native",
2083
+ "targetId": "adr-paas",
2084
+ "relationType": "implements"
2085
+ },
2086
+ {
2087
+ "id": "ff-ephemeral-native--implements--adr-serverless",
2088
+ "sourceId": "ff-ephemeral-native",
2089
+ "targetId": "adr-serverless",
2090
+ "relationType": "implements"
2091
+ },
2092
+ {
2093
+ "id": "ff-ephemeral-native--implements--adr-vms",
2094
+ "sourceId": "ff-ephemeral-native",
2095
+ "targetId": "adr-vms",
2096
+ "relationType": "implements"
2097
+ },
2098
+ {
2099
+ "id": "ff-ephemeral-native--implements--adr-cdn",
2100
+ "sourceId": "ff-ephemeral-native",
2101
+ "targetId": "adr-cdn",
2102
+ "relationType": "implements"
2103
+ },
2104
+ {
2105
+ "id": "ff-ephemeral-native--implements--adr-onprem-platform",
2106
+ "sourceId": "ff-ephemeral-native",
2107
+ "targetId": "adr-onprem-platform",
2108
+ "relationType": "implements"
2109
+ },
2110
+ {
2111
+ "id": "ff-parity--implements--adr-paas",
2112
+ "sourceId": "ff-parity",
2113
+ "targetId": "adr-paas",
2114
+ "relationType": "implements"
2115
+ },
2116
+ {
2117
+ "id": "ff-parity--implements--adr-kubernetes",
2118
+ "sourceId": "ff-parity",
2119
+ "targetId": "adr-kubernetes",
2120
+ "relationType": "implements"
2121
+ },
2122
+ {
2123
+ "id": "ff-parity--implements--adr-serverless",
2124
+ "sourceId": "ff-parity",
2125
+ "targetId": "adr-serverless",
2126
+ "relationType": "implements"
2127
+ },
2128
+ {
2129
+ "id": "ff-parity--implements--adr-vms",
2130
+ "sourceId": "ff-parity",
2131
+ "targetId": "adr-vms",
2132
+ "relationType": "implements"
2133
+ },
2134
+ {
2135
+ "id": "ff-parity--implements--adr-cdn",
2136
+ "sourceId": "ff-parity",
2137
+ "targetId": "adr-cdn",
2138
+ "relationType": "implements"
2139
+ },
2140
+ {
2141
+ "id": "ff-parity--implements--adr-onprem-platform",
2142
+ "sourceId": "ff-parity",
2143
+ "targetId": "adr-onprem-platform",
2144
+ "relationType": "implements"
2145
+ },
2146
+ {
2147
+ "id": "ff-promote--implements--adr-paas",
2148
+ "sourceId": "ff-promote",
2149
+ "targetId": "adr-paas",
2150
+ "relationType": "implements"
2151
+ },
2152
+ {
2153
+ "id": "ff-promote--implements--adr-kubernetes",
2154
+ "sourceId": "ff-promote",
2155
+ "targetId": "adr-kubernetes",
2156
+ "relationType": "implements"
2157
+ },
2158
+ {
2159
+ "id": "ff-promote--implements--adr-serverless",
2160
+ "sourceId": "ff-promote",
2161
+ "targetId": "adr-serverless",
2162
+ "relationType": "implements"
2163
+ },
2164
+ {
2165
+ "id": "ff-promote--implements--adr-vms",
2166
+ "sourceId": "ff-promote",
2167
+ "targetId": "adr-vms",
2168
+ "relationType": "implements"
2169
+ },
2170
+ {
2171
+ "id": "ff-promote--implements--adr-cdn",
2172
+ "sourceId": "ff-promote",
2173
+ "targetId": "adr-cdn",
2174
+ "relationType": "implements"
2175
+ },
2176
+ {
2177
+ "id": "ff-promote--implements--adr-onprem-platform",
2178
+ "sourceId": "ff-promote",
2179
+ "targetId": "adr-onprem-platform",
2180
+ "relationType": "implements"
2181
+ }
2182
+ ]
2183
+ }