@fjall/components-infrastructure 2.6.0 → 2.7.0

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.
@@ -55,13 +55,20 @@ export class Account extends Stack {
55
55
  }
56
56
  const fjallOrgId = this.node.tryGetContext("fjallOrgId");
57
57
  const oidcAlreadyConfigured = this.node.tryGetContext("fjallOidcConfigured") === "true";
58
- if (isStandaloneAccount && fjallOrgId && !oidcAlreadyConfigured) {
58
+ // True for non-home-region cascade stacks: the org-global IAM resources
59
+ // (OIDC provider/role, FjallMonitoring, FjallAudit) have fixed names that
60
+ // collide across regions, so they are created only in the home region.
61
+ const accountGlobalsConfigured = this.node.tryGetContext("fjallAccountGlobalsConfigured") === "true";
62
+ if (isStandaloneAccount &&
63
+ fjallOrgId &&
64
+ !oidcAlreadyConfigured &&
65
+ !accountGlobalsConfigured) {
59
66
  new OidcConnector(this, "OidcConnector", { fjallOrgId });
60
67
  }
61
- // Per-account monitoring role (unconditional; ExternalId added when orgId known)
62
- new AccountMonitoringRole(this, "MonitoringRole", fjallOrgId ? { fjallOrgId } : undefined);
63
- // Per-account audit role (conditional on fjallOrgId)
64
- if (fjallOrgId) {
68
+ if (!accountGlobalsConfigured) {
69
+ new AccountMonitoringRole(this, "MonitoringRole", fjallOrgId ? { fjallOrgId } : undefined);
70
+ }
71
+ if (fjallOrgId && !accountGlobalsConfigured) {
65
72
  new AccountAuditRole(this, "AuditRole", { fjallOrgId });
66
73
  }
67
74
  new ManagementEventsTrail(this, "CloudTrail", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fjall/components-infrastructure",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "type": "module",
6
6
  "bin": {
@@ -63,8 +63,8 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "@aws-sdk/client-organizations": "^3.1038.0",
66
- "@fjall/generator": "^2.6.0",
67
- "@fjall/util": "^2.6.0",
66
+ "@fjall/generator": "^2.7.0",
67
+ "@fjall/util": "^2.7.0",
68
68
  "constructs": "^10.0.0",
69
69
  "uuid": "^14.0.0"
70
70
  },
@@ -79,5 +79,5 @@
79
79
  "engines": {
80
80
  "node": ">=18.0.0"
81
81
  },
82
- "gitHead": "93666ff94b8b1d0e360a7710e9266d275d15ee34"
82
+ "gitHead": "cfcfbb9f546974d62756e257fce012f629db79ce"
83
83
  }