@beesolve/aws-accounts 1.2.0 → 1.2.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.
package/dist/awsConfig.js CHANGED
@@ -109,6 +109,15 @@ const awsConfigModelSchema = v.strictObject({
109
109
  name: v.string(),
110
110
  path: v.string()
111
111
  })
112
+ ),
113
+ permissionsBoundary: v.optional(
114
+ v.union([
115
+ v.strictObject({ managedPolicyArn: v.string() }),
116
+ v.strictObject({
117
+ customerManagedPolicyName: v.string(),
118
+ customerManagedPolicyPath: v.string()
119
+ })
120
+ ])
112
121
  )
113
122
  })
114
123
  ),
@@ -120,58 +129,60 @@ const awsConfigModelSchema = v.strictObject({
120
129
  accounts: v.array(v.string())
121
130
  })
122
131
  ),
123
- accessControlAttributes: v.optional(
124
- v.array(
125
- v.strictObject({
126
- key: v.string(),
127
- source: v.array(v.string())
128
- })
129
- )
132
+ accessControlAttributes: v.array(
133
+ v.strictObject({
134
+ key: v.string(),
135
+ source: v.array(v.string())
136
+ })
130
137
  ),
131
- policies: v.optional(
138
+ delegatedAdministrators: v.array(
132
139
  v.strictObject({
133
- serviceControlPolicies: v.optional(
134
- v.array(
135
- v.strictObject({
136
- name: v.string(),
137
- description: v.optional(v.string()),
138
- content: v.record(v.string(), v.unknown()),
139
- targets: v.array(v.string())
140
- })
141
- )
142
- ),
143
- resourceControlPolicies: v.optional(
144
- v.array(
145
- v.strictObject({
146
- name: v.string(),
147
- description: v.optional(v.string()),
148
- content: v.record(v.string(), v.unknown()),
149
- targets: v.array(v.string())
150
- })
151
- )
152
- ),
153
- tagPolicies: v.optional(
154
- v.array(
155
- v.strictObject({
156
- name: v.string(),
157
- description: v.optional(v.string()),
158
- content: v.record(v.string(), v.unknown()),
159
- targets: v.array(v.string())
160
- })
161
- )
162
- ),
163
- aiServicesOptOutPolicies: v.optional(
164
- v.array(
165
- v.strictObject({
166
- name: v.string(),
167
- description: v.optional(v.string()),
168
- content: v.record(v.string(), v.unknown()),
169
- targets: v.array(v.string())
170
- })
171
- )
172
- )
140
+ account: v.string(),
141
+ servicePrincipal: v.string()
173
142
  })
174
- )
143
+ ),
144
+ policies: v.strictObject({
145
+ serviceControlPolicies: v.array(
146
+ v.strictObject({
147
+ name: v.string(),
148
+ description: v.optional(v.string()),
149
+ content: v.record(v.string(), v.unknown()),
150
+ targets: v.array(v.string())
151
+ })
152
+ ),
153
+ resourceControlPolicies: v.array(
154
+ v.strictObject({
155
+ name: v.string(),
156
+ description: v.optional(v.string()),
157
+ content: v.record(v.string(), v.unknown()),
158
+ targets: v.array(v.string())
159
+ })
160
+ ),
161
+ tagPolicies: v.array(
162
+ v.strictObject({
163
+ name: v.string(),
164
+ description: v.optional(v.string()),
165
+ content: v.record(v.string(), v.unknown()),
166
+ targets: v.array(v.string())
167
+ })
168
+ ),
169
+ aiServicesOptOutPolicies: v.array(
170
+ v.strictObject({
171
+ name: v.string(),
172
+ description: v.optional(v.string()),
173
+ content: v.record(v.string(), v.unknown()),
174
+ targets: v.array(v.string())
175
+ })
176
+ ),
177
+ backupPolicies: v.array(
178
+ v.strictObject({
179
+ name: v.string(),
180
+ description: v.optional(v.string()),
181
+ content: v.record(v.string(), v.unknown()),
182
+ targets: v.array(v.string())
183
+ })
184
+ )
185
+ })
175
186
  });
176
187
  const moduleDirectoryPath = resolve(
177
188
  fileURLToPath(new URL(".", import.meta.url))
@@ -185,10 +196,7 @@ async function writeAwsConfigFromState(props) {
185
196
  context
186
197
  });
187
198
  const mappedConfig = mapStateToAwsConfig({ state });
188
- const mergedConfig = props.existingConfig != null ? {
189
- ...props.existingConfig,
190
- policies: props.existingConfig.policies ?? mappedConfig.policies
191
- } : mappedConfig;
199
+ const mergedConfig = props.existingConfig != null ? props.existingConfig : mappedConfig;
192
200
  const sortedConfig = sortAwsConfigModel({
193
201
  config: mergedConfig
194
202
  });
@@ -284,12 +292,9 @@ async function writeAwsConfigFromState(props) {
284
292
  };
285
293
  }
286
294
  async function regenerateAwsConfigTypes(props) {
287
- const typesModule = await loadAwsConfigTypesModule({
288
- typesPath: props.typesPath
289
- });
290
295
  const loadedConfig = await loadAwsConfigFromTsFile({
291
296
  configPath: props.configPath,
292
- schema: typesModule.awsConfigSchema
297
+ schema: awsConfigModelSchema
293
298
  });
294
299
  const sortedConfig = sortAwsConfigModel({
295
300
  config: loadedConfig
@@ -520,37 +525,35 @@ function mapStateToAwsConfig(props) {
520
525
  targets.push(targetName);
521
526
  attachmentsByPolicyId.set(attachment.policyId, targets);
522
527
  }
523
- const scps = orgPolicies.filter((p) => p.type === "SERVICE_CONTROL_POLICY").map((p) => ({
528
+ const mappedOrgPolicies = orgPolicies.map((p) => ({
529
+ type: p.type,
524
530
  name: p.name,
525
531
  description: p.description.length > 0 ? p.description : void 0,
526
532
  content: JSON.parse(p.content),
527
533
  targets: [...attachmentsByPolicyId.get(p.id) ?? []].sort(
528
- (a, b) => a.localeCompare(b)
534
+ (left, right) => left.localeCompare(right)
529
535
  )
530
536
  }));
531
- const rcps = orgPolicies.filter((p) => p.type === "RESOURCE_CONTROL_POLICY").map((p) => ({
532
- name: p.name,
533
- description: p.description.length > 0 ? p.description : void 0,
534
- content: JSON.parse(p.content),
535
- targets: [...attachmentsByPolicyId.get(p.id) ?? []].sort(
536
- (a, b) => a.localeCompare(b)
537
- )
538
- }));
539
- const tagPolicies = orgPolicies.filter((p) => p.type === "TAG_POLICY").map((p) => ({
540
- name: p.name,
541
- description: p.description.length > 0 ? p.description : void 0,
542
- content: JSON.parse(p.content),
543
- targets: [...attachmentsByPolicyId.get(p.id) ?? []].sort(
544
- (a, b) => a.localeCompare(b)
545
- )
546
- }));
547
- const aiServicesOptOutPolicies = orgPolicies.filter((p) => p.type === "AISERVICES_OPT_OUT_POLICY").map((p) => ({
548
- name: p.name,
549
- description: p.description.length > 0 ? p.description : void 0,
550
- content: JSON.parse(p.content),
551
- targets: [...attachmentsByPolicyId.get(p.id) ?? []].sort(
552
- (a, b) => a.localeCompare(b)
553
- )
537
+ const policiesByType = /* @__PURE__ */ new Map();
538
+ for (const policy of mappedOrgPolicies) {
539
+ const bucket = policiesByType.get(policy.type) ?? new Array();
540
+ bucket.push({
541
+ name: policy.name,
542
+ description: policy.description,
543
+ content: policy.content,
544
+ targets: policy.targets
545
+ });
546
+ policiesByType.set(policy.type, bucket);
547
+ }
548
+ const scps = policiesByType.get("SERVICE_CONTROL_POLICY") ?? [];
549
+ const rcps = policiesByType.get("RESOURCE_CONTROL_POLICY") ?? [];
550
+ const tagPolicies = policiesByType.get("TAG_POLICY") ?? [];
551
+ const aiServicesOptOutPolicies = policiesByType.get("AISERVICES_OPT_OUT_POLICY") ?? [];
552
+ const backupPolicies = policiesByType.get("BACKUP_POLICY") ?? [];
553
+ const stateDelegatedAdmins = props.state.organization.delegatedAdministrators ?? [];
554
+ const mappedDelegatedAdministrators = stateDelegatedAdmins.map((da) => ({
555
+ account: accountById[da.accountId]?.name ?? da.accountId,
556
+ servicePrincipal: da.servicePrincipal
554
557
  }));
555
558
  const mapped = {
556
559
  organizationalUnits,
@@ -579,20 +582,23 @@ function mapStateToAwsConfig(props) {
579
582
  name: customerManagedPolicy.name,
580
583
  path: customerManagedPolicy.path
581
584
  })
582
- )
585
+ ),
586
+ permissionsBoundary: permissionSet.permissionsBoundary ?? void 0
583
587
  })
584
588
  ),
585
589
  assignments: [...assignmentsByKey.values()],
586
- accessControlAttributes: props.state.identityCenter.accessControlAttributes.length > 0 ? props.state.identityCenter.accessControlAttributes.map((attr) => ({
590
+ accessControlAttributes: props.state.identityCenter.accessControlAttributes.map((attr) => ({
587
591
  key: attr.key,
588
592
  source: [...attr.source]
589
- })) : void 0,
590
- policies: scps.length > 0 || rcps.length > 0 || tagPolicies.length > 0 || aiServicesOptOutPolicies.length > 0 ? {
591
- serviceControlPolicies: scps.length > 0 ? scps : void 0,
592
- resourceControlPolicies: rcps.length > 0 ? rcps : void 0,
593
- tagPolicies: tagPolicies.length > 0 ? tagPolicies : void 0,
594
- aiServicesOptOutPolicies: aiServicesOptOutPolicies.length > 0 ? aiServicesOptOutPolicies : void 0
595
- } : void 0
593
+ })),
594
+ delegatedAdministrators: mappedDelegatedAdministrators,
595
+ policies: {
596
+ serviceControlPolicies: scps,
597
+ resourceControlPolicies: rcps,
598
+ tagPolicies,
599
+ aiServicesOptOutPolicies,
600
+ backupPolicies
601
+ }
596
602
  };
597
603
  assertUniqueNames({
598
604
  values: mapped.organizationalUnits.map((ou) => ou.name),
@@ -820,7 +826,8 @@ function mapAwsConfigToState(props) {
820
826
  name: customerManagedPolicy.name,
821
827
  path: customerManagedPolicy.path
822
828
  })
823
- )
829
+ ),
830
+ permissionsBoundary: permissionSet.permissionsBoundary ?? null
824
831
  };
825
832
  });
826
833
  const mappedPermissionSetByName = toRecordByProperty(
@@ -880,7 +887,7 @@ function mapAwsConfigToState(props) {
880
887
  }
881
888
  return { targetId: pendingCreationId, targetType: "ACCOUNT" };
882
889
  }
883
- for (const policy of configPolicies?.serviceControlPolicies ?? []) {
890
+ for (const policy of configPolicies.serviceControlPolicies) {
884
891
  allConfigPolicies.push({
885
892
  name: policy.name,
886
893
  description: policy.description ?? "",
@@ -889,7 +896,7 @@ function mapAwsConfigToState(props) {
889
896
  targets: policy.targets.map((t) => resolveTargetId(t))
890
897
  });
891
898
  }
892
- for (const policy of configPolicies?.resourceControlPolicies ?? []) {
899
+ for (const policy of configPolicies.resourceControlPolicies) {
893
900
  allConfigPolicies.push({
894
901
  name: policy.name,
895
902
  description: policy.description ?? "",
@@ -898,7 +905,7 @@ function mapAwsConfigToState(props) {
898
905
  targets: policy.targets.map((t) => resolveTargetId(t))
899
906
  });
900
907
  }
901
- for (const policy of configPolicies?.tagPolicies ?? []) {
908
+ for (const policy of configPolicies.tagPolicies) {
902
909
  allConfigPolicies.push({
903
910
  name: policy.name,
904
911
  description: policy.description ?? "",
@@ -907,7 +914,7 @@ function mapAwsConfigToState(props) {
907
914
  targets: policy.targets.map((t) => resolveTargetId(t))
908
915
  });
909
916
  }
910
- for (const policy of configPolicies?.aiServicesOptOutPolicies ?? []) {
917
+ for (const policy of configPolicies.aiServicesOptOutPolicies) {
911
918
  allConfigPolicies.push({
912
919
  name: policy.name,
913
920
  description: policy.description ?? "",
@@ -916,6 +923,15 @@ function mapAwsConfigToState(props) {
916
923
  targets: policy.targets.map((t) => resolveTargetId(t))
917
924
  });
918
925
  }
926
+ for (const policy of configPolicies.backupPolicies) {
927
+ allConfigPolicies.push({
928
+ name: policy.name,
929
+ description: policy.description ?? "",
930
+ type: "BACKUP_POLICY",
931
+ content: JSON.stringify(policy.content),
932
+ targets: policy.targets.map((t) => resolveTargetId(t))
933
+ });
934
+ }
919
935
  const currentPoliciesByNameAndType = new Map(
920
936
  (props.currentState.organization.policies ?? []).map((p) => [
921
937
  `${p.type}|${p.name}`,
@@ -945,6 +961,11 @@ function mapAwsConfigToState(props) {
945
961
  });
946
962
  }
947
963
  }
964
+ const configDelegatedAdmins = props.config.delegatedAdministrators;
965
+ const mappedDelegatedAdministrators = configDelegatedAdmins.length > 0 ? configDelegatedAdmins.map(({ account, servicePrincipal }) => ({
966
+ accountId: stateAccountByName[account]?.id ?? pendingCreationId,
967
+ servicePrincipal
968
+ })) : void 0;
948
969
  const mapped = {
949
970
  version: props.currentState.version,
950
971
  generatedAt: props.currentState.generatedAt,
@@ -953,7 +974,8 @@ function mapAwsConfigToState(props) {
953
974
  organizationalUnits: mappedOrganizationalUnits,
954
975
  accounts: mappedAccounts,
955
976
  policies: mappedPolicies,
956
- policyAttachments: mappedPolicyAttachments
977
+ policyAttachments: mappedPolicyAttachments,
978
+ delegatedAdministrators: mappedDelegatedAdministrators
957
979
  },
958
980
  identityCenter: {
959
981
  instanceArn: props.context.identityCenter.instanceArn,
@@ -1002,29 +1024,34 @@ function mapAwsConfigToState(props) {
1002
1024
  entityName: "permission set"
1003
1025
  });
1004
1026
  assertUniqueNames({
1005
- values: (props.config.policies?.serviceControlPolicies ?? []).map(
1006
- (p) => p.name
1007
- ),
1027
+ values: props.config.policies.serviceControlPolicies.map((p) => p.name),
1008
1028
  entityName: "SCP"
1009
1029
  });
1010
1030
  assertUniqueNames({
1011
- values: (props.config.policies?.resourceControlPolicies ?? []).map(
1012
- (p) => p.name
1013
- ),
1031
+ values: props.config.policies.resourceControlPolicies.map((p) => p.name),
1014
1032
  entityName: "RCP"
1015
1033
  });
1016
1034
  assertUniqueNames({
1017
- values: (props.config.policies?.tagPolicies ?? []).map((p) => p.name),
1035
+ values: props.config.policies.tagPolicies.map((p) => p.name),
1018
1036
  entityName: "tag policy"
1019
1037
  });
1020
1038
  assertUniqueNames({
1021
- values: (props.config.policies?.aiServicesOptOutPolicies ?? []).map(
1022
- (p) => p.name
1023
- ),
1039
+ values: props.config.policies.aiServicesOptOutPolicies.map((p) => p.name),
1024
1040
  entityName: "AI services opt-out policy"
1025
1041
  });
1042
+ assertUniqueNames({
1043
+ values: props.config.policies.backupPolicies.map((p) => p.name),
1044
+ entityName: "backup policy"
1045
+ });
1026
1046
  return validateState(mapped);
1027
1047
  }
1048
+ function sortConfigPolicies(policies) {
1049
+ return [...policies].map((p) => ({
1050
+ ...p,
1051
+ content: sortJsonRecord(p.content),
1052
+ targets: [...p.targets].sort((left, right) => left.localeCompare(right))
1053
+ })).sort((left, right) => left.name.localeCompare(right.name));
1054
+ }
1028
1055
  function sortAwsConfigModel(props) {
1029
1056
  const childrenByParentName = /* @__PURE__ */ new Map();
1030
1057
  for (const organizationalUnit of props.config.organizationalUnits) {
@@ -1104,39 +1131,33 @@ function sortAwsConfigModel(props) {
1104
1131
  }
1105
1132
  return left.permissionSet.localeCompare(right.permissionSet);
1106
1133
  }),
1107
- accessControlAttributes: props.config.accessControlAttributes == null ? void 0 : [...props.config.accessControlAttributes].map((attr) => ({
1134
+ accessControlAttributes: [...props.config.accessControlAttributes].map((attr) => ({
1108
1135
  ...attr,
1109
- source: [...attr.source].sort((a, b) => a.localeCompare(b))
1110
- })).sort((a, b) => a.key.localeCompare(b.key)),
1111
- policies: props.config.policies == null ? void 0 : {
1112
- serviceControlPolicies: props.config.policies.serviceControlPolicies == null ? void 0 : [...props.config.policies.serviceControlPolicies].map((p) => ({
1113
- ...p,
1114
- content: sortJsonRecord(p.content),
1115
- targets: [...p.targets].sort(
1116
- (a, b) => a.localeCompare(b)
1117
- )
1118
- })).sort((a, b) => a.name.localeCompare(b.name)),
1119
- resourceControlPolicies: props.config.policies.resourceControlPolicies == null ? void 0 : [...props.config.policies.resourceControlPolicies].map((p) => ({
1120
- ...p,
1121
- content: sortJsonRecord(p.content),
1122
- targets: [...p.targets].sort(
1123
- (a, b) => a.localeCompare(b)
1124
- )
1125
- })).sort((a, b) => a.name.localeCompare(b.name)),
1126
- tagPolicies: props.config.policies.tagPolicies == null ? void 0 : [...props.config.policies.tagPolicies].map((p) => ({
1127
- ...p,
1128
- content: sortJsonRecord(p.content),
1129
- targets: [...p.targets].sort(
1130
- (a, b) => a.localeCompare(b)
1131
- )
1132
- })).sort((a, b) => a.name.localeCompare(b.name)),
1133
- aiServicesOptOutPolicies: props.config.policies.aiServicesOptOutPolicies == null ? void 0 : [...props.config.policies.aiServicesOptOutPolicies].map((p) => ({
1134
- ...p,
1135
- content: sortJsonRecord(p.content),
1136
- targets: [...p.targets].sort(
1137
- (a, b) => a.localeCompare(b)
1138
- )
1139
- })).sort((a, b) => a.name.localeCompare(b.name))
1136
+ source: [...attr.source].sort(
1137
+ (left, right) => left.localeCompare(right)
1138
+ )
1139
+ })).sort((left, right) => left.key.localeCompare(right.key)),
1140
+ delegatedAdministrators: [...props.config.delegatedAdministrators].sort(
1141
+ (left, right) => {
1142
+ const accountComparison = left.account.localeCompare(right.account);
1143
+ if (accountComparison !== 0) {
1144
+ return accountComparison;
1145
+ }
1146
+ return left.servicePrincipal.localeCompare(right.servicePrincipal);
1147
+ }
1148
+ ),
1149
+ policies: {
1150
+ serviceControlPolicies: sortConfigPolicies(
1151
+ props.config.policies.serviceControlPolicies
1152
+ ),
1153
+ resourceControlPolicies: sortConfigPolicies(
1154
+ props.config.policies.resourceControlPolicies
1155
+ ),
1156
+ tagPolicies: sortConfigPolicies(props.config.policies.tagPolicies),
1157
+ aiServicesOptOutPolicies: sortConfigPolicies(
1158
+ props.config.policies.aiServicesOptOutPolicies
1159
+ ),
1160
+ backupPolicies: sortConfigPolicies(props.config.policies.backupPolicies)
1140
1161
  }
1141
1162
  };
1142
1163
  }
@@ -1382,6 +1403,15 @@ export const awsConfigSchema = v.strictObject({
1382
1403
  path: v.string(),
1383
1404
  }),
1384
1405
  ),
1406
+ permissionsBoundary: v.optional(
1407
+ v.union([
1408
+ v.strictObject({ managedPolicyArn: v.string() }),
1409
+ v.strictObject({
1410
+ customerManagedPolicyName: v.string(),
1411
+ customerManagedPolicyPath: v.string(),
1412
+ }),
1413
+ ]),
1414
+ ),
1385
1415
  }),
1386
1416
  ),
1387
1417
  assignments: v.array(
@@ -1392,58 +1422,60 @@ export const awsConfigSchema = v.strictObject({
1392
1422
  accounts: v.array(accountNameSchema),
1393
1423
  }),
1394
1424
  ),
1395
- accessControlAttributes: v.optional(
1396
- v.array(
1397
- v.strictObject({
1398
- key: v.string(),
1399
- source: v.array(v.string()),
1400
- }),
1401
- ),
1425
+ accessControlAttributes: v.array(
1426
+ v.strictObject({
1427
+ key: v.string(),
1428
+ source: v.array(v.string()),
1429
+ }),
1402
1430
  ),
1403
- policies: v.optional(
1431
+ delegatedAdministrators: v.array(
1404
1432
  v.strictObject({
1405
- serviceControlPolicies: v.optional(
1406
- v.array(
1407
- v.strictObject({
1408
- name: v.string(),
1409
- description: v.optional(v.string()),
1410
- content: v.record(v.string(), v.unknown()),
1411
- targets: v.array(v.union([organizationalUnitNameSchema, accountNameSchema])),
1412
- }),
1413
- ),
1414
- ),
1415
- resourceControlPolicies: v.optional(
1416
- v.array(
1417
- v.strictObject({
1418
- name: v.string(),
1419
- description: v.optional(v.string()),
1420
- content: v.record(v.string(), v.unknown()),
1421
- targets: v.array(v.union([organizationalUnitNameSchema, accountNameSchema])),
1422
- }),
1423
- ),
1424
- ),
1425
- tagPolicies: v.optional(
1426
- v.array(
1427
- v.strictObject({
1428
- name: v.string(),
1429
- description: v.optional(v.string()),
1430
- content: v.record(v.string(), v.unknown()),
1431
- targets: v.array(v.union([organizationalUnitNameSchema, accountNameSchema])),
1432
- }),
1433
- ),
1434
- ),
1435
- aiServicesOptOutPolicies: v.optional(
1436
- v.array(
1437
- v.strictObject({
1438
- name: v.string(),
1439
- description: v.optional(v.string()),
1440
- content: v.record(v.string(), v.unknown()),
1441
- targets: v.array(v.union([organizationalUnitNameSchema, accountNameSchema])),
1442
- }),
1443
- ),
1444
- ),
1433
+ account: accountNameSchema,
1434
+ servicePrincipal: v.string(),
1445
1435
  }),
1446
1436
  ),
1437
+ policies: v.strictObject({
1438
+ serviceControlPolicies: v.array(
1439
+ v.strictObject({
1440
+ name: v.string(),
1441
+ description: v.optional(v.string()),
1442
+ content: v.record(v.string(), v.unknown()),
1443
+ targets: v.array(v.union([organizationalUnitNameSchema, accountNameSchema])),
1444
+ }),
1445
+ ),
1446
+ resourceControlPolicies: v.array(
1447
+ v.strictObject({
1448
+ name: v.string(),
1449
+ description: v.optional(v.string()),
1450
+ content: v.record(v.string(), v.unknown()),
1451
+ targets: v.array(v.union([organizationalUnitNameSchema, accountNameSchema])),
1452
+ }),
1453
+ ),
1454
+ tagPolicies: v.array(
1455
+ v.strictObject({
1456
+ name: v.string(),
1457
+ description: v.optional(v.string()),
1458
+ content: v.record(v.string(), v.unknown()),
1459
+ targets: v.array(v.union([organizationalUnitNameSchema, accountNameSchema])),
1460
+ }),
1461
+ ),
1462
+ aiServicesOptOutPolicies: v.array(
1463
+ v.strictObject({
1464
+ name: v.string(),
1465
+ description: v.optional(v.string()),
1466
+ content: v.record(v.string(), v.unknown()),
1467
+ targets: v.array(v.union([organizationalUnitNameSchema, accountNameSchema])),
1468
+ }),
1469
+ ),
1470
+ backupPolicies: v.array(
1471
+ v.strictObject({
1472
+ name: v.string(),
1473
+ description: v.optional(v.string()),
1474
+ content: v.record(v.string(), v.unknown()),
1475
+ targets: v.array(v.union([organizationalUnitNameSchema, accountNameSchema])),
1476
+ }),
1477
+ ),
1478
+ }),
1447
1479
  });
1448
1480
 
1449
1481
  export type AwsConfig = v.InferOutput<typeof awsConfigSchema>;