Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(website): own the macro.com apex TXT set in the prod stack (#9820)
Tod07d2996ea6e2
diff --git a/infra/stacks/website/README.md b/infra/stacks/website/README.mdindex ff221d56cc..d59b45a713 100644--- a/infra/stacks/website/README.md+++ b/infra/stacks/website/README.md@@ -47,6 +47,30 @@ bun run check # Includes every web-delivery regression.The mock test constructs the real stack resources without uploading assets orcontacting AWS and checks the policies attached to the app's actual behavior.+## Apex TXT++The prod stack owns the whole TXT set at `macro.com` (SPF, site verifications), as+one resource, retained on delete. Add a value by adding it to the list in+`index.ts`; anything not listed is removed from DNS on the next prod deploy. The+set predates this stack, so it needs adopting into state once, after the code is on+`main` and before the first prod deploy. Importing first would let a release from an+older `main` plan a delete of the whole set; the default `protect` on the import+blocks that, and the first deploy clears it.++From the repo root:++```sh+cd infra/stacks/website+pulumi import --stack macro-inc/prod --generate-code=false --yes --file <(echo '{"resources":[{+ "type": "aws:route53/record:Record", "name": "apex-txt",+ "id": "Z0766278GIHB3CVV9CIL_macro.com_TXT", "version": "6.83.4"}]}')+pulumi preview --stack macro-inc/prod --diff+```++Read that diff before any prod deploy, and stop unless the TXT change only adds the+new value: a list in `index.ts` that went stale would delete a live SPF or+verification value.+## Deploy`.github/workflows/deploy_website.yml` deploys dev on pushes to `main` that touchdiff --git a/infra/stacks/website/index.ts b/infra/stacks/website/index.tsindex c2466ba3f5..a67a2532fc 100644--- a/infra/stacks/website/index.ts+++ b/infra/stacks/website/index.ts@@ -459,6 +459,32 @@ if (stack === 'prod') {},],});++ // Route 53 keeps one record set per name and type, so this owns every TXT value+ // at the apex: SPF included. A value missing here is deleted from DNS on deploy.+ // Retained so destroying the stack or dropping this resource can't take SPF with it.+ new aws.route53.Record(+ 'apex-txt',+ {+ name: domain,+ zoneId: zone.zoneId,+ type: 'TXT',+ ttl: 300,+ records: [+ 'v=spf1 include:_spf.google.com include:amazonses.com include:mailgun.org ~all',+ 'google-site-verification=Qq3OQ1d05G4wOqaUfpC9VrYI-E-IhfLWEHjol2dZPD0',+ '1password-site-verification=4WDFRU6CLJGYDM54E42RIEY3XU',+ 'google-site-verification=VwqOab7iboVZs49aAZZrrSYTpLZO8oCELfj05VsI9rw',+ 'google-site-verification=C8iv1N0NSCeHozm445epWI-fKQQMCRIFSRFEae2R1-E',+ 'google-site-verification=gXDuoHXWgx-OJbnAkfp01Y2zHpTOaai2aqnwWUARueA',+ '_h5l64nu1n1cgrijoyb1xpqs18feaulp',+ 'MS=ms97745247',+ // Macro Connect's Google OAuth app.+ 'google-site-verification=v0VjgBSJnZ-Xl6zjn4QFZibcfAsjWJejEOrmuM93a1Y',+ ],+ },+ { retainOnDelete: true }+ );}if (stack === 'dev') {