Repository navigation
feat(iac-core): the account naming grammar; iac-aws 0.6.0 - #77
Merged
Merged
Conversation
…e map
Implements Pl.Architecture.Meta.NamingConventionsAcrossPlatforms 9 (EA 2026-10-25:
"yes, approved"): pulumi-project-is-one-account, pulumi-stack-shape and
names-migrate-through-an-alias-map.
- The account grammar: project {tenant}-{provider}-{account-purpose}-{env}, stack
{target-env}-{stack-purpose}[-{concern}]-{region} (glb for a global platform). The
project decides the grammar: four segments is the account grammar, three the legacy one.
- parseStackIdentity(project, stack) reads either grammar. A legacy name and its
account-grammar name give the same identity, and detectStackContext the same context
apart from projectName and stackName. targetEnvironment stays present only for a
centralized stack, so StackContext keeps its meaning.
- NameAliasMap is the consumer's one declared map from legacy {project}/{stack} names to
account-grammar ones. iac-core holds no tenant's names. validateNameAliases checks a map:
keys legacy, targets account-grammar, both sides the same identity, one target per key,
one new project per legacy project. canonicalStackName resolves either name.
- detectStackContext({ nameAliases }) refuses a legacy name the map doesn't declare. With no
map it reads both grammars, as before for legacy names.
- projectNameOf and stackNameOf build the account-grammar names. generateStackName and
buildStackReference still build the legacy ones.
- StackContextSchema and ProjectNameSchema accept the account grammar.
Tests: both grammars, every one of iac-worx's 16 renames (as a fixture; the declared map
lives in iac-worx), the map's refusals, and a name in neither grammar.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Implements Bh.Flow.Platform.NetworkDualStack 9 (SubnetTier: role and shareWith required, replacing shareViaRam), ending the one-release deprecation that #75 (0.5.1) opened. - SubnetTier.role and SubnetTier.shareWith are required. validateTierSharing refuses a tier without a role, without shareWith, or still setting shareViaRam, and names the replacement: shareViaRam true is every account in sharedAccounts, false is []. - The main share holds the tiers whose shareWith names every account in sharedAccounts (isInMainShare), as shareViaRam: true did. legacyRamAssociationNames derives a stack's pre-0.6.0 association names from those tiers, so a stack that moves shareViaRam: true to shareWith every account keeps every association with no legacyRamSharedTiers. - DEFAULT_SUBNET_TIERS is now defaultSubnetTiers(sharedAccounts): public in the owner account, private and data shared with every account. tierShareTargets takes the tier only. - The shared route table's SharedByTiers tag joins tier names with "+", not ",", which the tag-charset rule flags. The live tag (e.g. "private,data") updates in place. BREAKING CHANGE: a SubnetTier without role or shareWith, or with shareViaRam, is refused. With no sharedAccounts, the default private and data tiers are no longer associated with the main share (sharing with no principal shared nothing). Consumers: iac-worx dev-ops-vpc-usw2, stg-ops-vpc-use1, stg-ops-vpc-usw2 and prd-ops-vpc-use1 still set shareViaRam. dev-ops-vpc-use1 already uses role and shareWith (#151). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The root README and docs/security-implementation.md showed the shareViaRam tiers that iac-aws 0.6.0 removes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step B2 of the alignment window: two package changes and a docs commit. Rebase-merge it, so Nx Release sees each scoped commit (CONTRIBUTING: multi-package PRs are rebased, never squashed).
feat(iac-core): stack and project names read both grammars through one map. ImplementsPl.Architecture.Meta.NamingConventionsAcrossPlatforms9:pulumi-project-is-one-account,pulumi-stack-shape,names-migrate-through-an-alias-map.{tenant}-{provider}-{account-purpose}-{env}; stack{target-env}-{stack-purpose}[-{concern}]-{region}(glbfor global platforms). The project's segment count decides the grammar.parseStackIdentity: a legacy name and its new name give the same identity.detectStackContextthen gives the same context apart fromprojectNameandstackName, andtargetEnvironmentstays present only for centralized stacks.NameAliasMap: the consumer's one declared old → new map. It lives in iac-worx, because iac-core holds no tenant's names.validateNameAliaseschecks it: keys legacy, targets account-grammar, same identity on both sides, one target per key, one new project per legacy project.canonicalStackNameresolves either name.detectStackContext({ nameAliases })refuses a legacy name the map doesn't declare.feat(iac-aws)!: SharedVpc tiers require role; shareViaRam removed. ImplementsBh.Flow.Platform.NetworkDualStack9 and ends feat(iac-aws): tier aliases and roles for SharedVpc renames #75's deprecation.roleandshareWithare required, andshareViaRamis refused with its replacement named.isInMainShare). Old RAM association names derive from it, so a stack movingshareViaRam: truetoshareWithnaming every account needs nolegacyRamSharedTiers.defaultSubnetTiers(sharedAccounts)replacesDEFAULT_SUBNET_TIERS.SharedByTiersjoins with+(the tag-charset rule flagged,). The tag updates in place.docs(repo): the tier examples in README.md and docs/security-implementation.md now useroleandshareWith.Consumer impact
Does any consumer need to act? That means changing its arguments, config or code, or
accepting a preview it didn't ask for (new or changed resources on a live stack).
No.
Yes. Every commit that causes it carries
!(or aBREAKING CHANGE:footer), whateverits type. Below 1.0 an unmarked
featships as a patch that^0.y.zranges accept(CONTRIBUTING.md#types-we-use).
iac-aws 0.6.0 (
!): the iac-worx stacks still settingshareViaRamare dev-ops-vpc-usw2, stg-ops-vpc-use1, stg-ops-vpc-usw2 and prd-ops-vpc-use1. Each must give every tier aroleand ashareWith: every shared account forshareViaRam: true,[]for false. dev-ops-vpc-use1 already does (#151, applied).SharedByTierstag on the shared route table,private,data→private+data. Each tier'sRoletag is added.iac-core 0.5.1: additive. With no map passed,
detectStackContext()reads legacy names exactly as before. A consumer opts into strict mode by passing its map (B3).Release version (
pnpm release:dry):@adaptiveworx/iac-core0.5.0 → 0.5.1@adaptiveworx/iac-aws0.5.1 → 0.6.0@adaptiveworx/iac-azure0.1.4 → 0.1.5 (a version-only bump that Nx makes for a dependent of iac-core, with no code change)Depends on
Followed by
validateNameAliases. Route discovery, the dispatch resolver, the stack-name guards and the*StackRefconfig values through it. Migrate the four VPC stacks offshareViaRam.pulumi stack renameper project, under the map.SUBNET_TIERSInfisical template, which still showsshareViaRam(iac-worx no longer reads tiers from Infisical).Apply steps
None: library only. The EA merges (rebase), then publishes through the Scheduled Release.
Expected preview (consumers)
See Consumer impact: tag changes only on the migrated VPC stacks, nothing created or replaced.
🤖 Generated with Claude Code