Skip to content

Commit 1a3b070

Browse files
0.11.7: pin ARecordLegacy logical id; document manual main-stack patch
The 0.11.6 deploy got the cert stack through but choked on the main stack because: 1. CFN evaluates dynamic refs in the DEPLOYED template during changeset creation. The old template's `{{resolve:ssm:…:1:1779216106436}}` (with a timestamp pin) became unresolvable once the writer rewrote the param to a new key. Fix: hand-patch the deployed template via `aws cloudformation update-stack` to replace the broken dynamic ref with a literal cert ARN. Done out of band — gives CDK a clean diff to deploy. 2. The original `ARecord` construct (deployed logical id `ARECORDE7B57761`, pointed at ght.vexom.io) was renamed in code to `ARecordLegacy`. CDK generated a new logical id, CFN tried to create-then-delete, and the create collided on the existing DNS name. Fix: `overrideLogicalId` on the new construct so CDK adopts the existing record without a recreate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5f9c470 commit 1a3b070

4 files changed

Lines changed: 27 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to this project are documented here.
44

55
## [Unreleased]
66

7+
## [0.11.7] - 2026-05-19
8+
9+
Pin the legacy `ght.vexom.io` A-record's CFN logical id to its deployed value
10+
(`ARECORDE7B57761`). The 0.11.6 deploy got far enough to create the apex +
11+
`www.` ARecords, update the cross-region ExportsReader, and start the
12+
CloudFront distribution update — then failed when CFN tried to create
13+
`ARecordLegacyF2E4EB86` for ght.vexom.io while the original `ARECORDE7B57761`
14+
still owned that name. Same physical resource under a new construct id
15+
read as create-then-delete to CFN, which collides. `overrideLogicalId` lets
16+
CDK adopt the existing record under the new construct without a recreate.
17+
18+
Also unblocked the deploy by manually patching the deployed main stack via
19+
`aws cloudformation update-stack` to replace the broken `ssm:…:1:1779216106436`
20+
dynamic ref with a literal cert ARN — CFN evaluates dynamic refs in the
21+
**deployed** template during changeset creation, and the old timestamp pin
22+
became unresolvable once the writer rewrote the SSM param. The literal-ARN
23+
detour gave CDK a clean diff to deploy from.
24+
725
## [0.11.6] - 2026-05-19
826

927
The **actual** fix for the cross-region writer deadlock. After staring at the

infrastructure/lib/stack.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,17 @@ export class HabitAgilityStack extends cdk.Stack {
213213
recordName: 'www',
214214
target: cfTarget,
215215
});
216-
new route53.ARecord(this, 'ARecordLegacy', {
216+
// The legacy `ght.vexom.io` record was originally a single `ARecord` construct
217+
// in this stack (logical id ARECORDE7B57761). Renaming the construct would
218+
// cause CFN to create-then-delete — but the create fails because the name is
219+
// already taken by the existing record. Pin the logical id so CFN treats
220+
// this as a no-op update on the same physical resource.
221+
const aRecordLegacy = new route53.ARecord(this, 'ARecordLegacy', {
217222
zone: vexomZone,
218223
recordName: 'ght',
219224
target: cfTarget,
220225
});
226+
(aRecordLegacy.node.defaultChild as cdk.CfnResource).overrideLogicalId('ARECORDE7B57761');
221227

222228
new cdk.CfnOutput(this, 'URL', { value: 'https://habitagility.com' });
223229
new cdk.CfnOutput(this, 'LegacyURL', { value: 'https://ght.vexom.io' });

infrastructure/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "habit-agility-infrastructure",
3-
"version": "0.11.6",
3+
"version": "0.11.7",
44
"private": true,
55
"license": "MIT",
66
"scripts": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "habit-agility",
33
"private": true,
4-
"version": "0.11.6",
4+
"version": "0.11.7",
55
"description": "HabitAgility — Agile-style habit tracker (sprints, burndown, retrospectives). Root tooling (lint, format, tests). Deploy lives in infrastructure/.",
66
"type": "module",
77
"scripts": {

0 commit comments

Comments
 (0)