nomoss 0.0.3 → 0.0.5

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.
Files changed (150) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +5 -15
  3. package/ROADMAP.md +2 -0
  4. package/docs/README.md +1 -1
  5. package/docs/application/aws-resource-coverage.md +26 -0
  6. package/docs/application/aws-resource-lifecycle-management.md +13 -23
  7. package/docs/application/cli-workflow.md +1 -1
  8. package/docs/application/engine-design.md +2 -2
  9. package/docs/application/generation-architecture.md +10 -45
  10. package/docs/application/resource-command-policy-stage.md +2 -2
  11. package/docs/application/resource-graph.md +1 -1
  12. package/docs/application/resource-lifecycle-tracker.md +1 -9
  13. package/docs/application/resource-mapping.md +4 -9
  14. package/docs/application/resource-operations.md +4 -2
  15. package/docs/application/tracing.md +2 -6
  16. package/docs/development/code-documentation.md +2 -0
  17. package/docs/development/effect-native-development.md +44 -0
  18. package/docs/development/linting.md +1 -1
  19. package/docs/development/review-code.md +22 -6
  20. package/docs/development/review-remediation-spec.md +28 -37
  21. package/docs/development/spec-writing.md +1 -1
  22. package/docs/development/testing.md +23 -9
  23. package/docs/operations/observability-sop.md +11 -17
  24. package/docs/operations/releasing.md +3 -1
  25. package/examples/README.md +3 -26
  26. package/examples/commands.ts +2 -36
  27. package/examples/queue/application.ts +8 -2
  28. package/examples/state-machine/application.ts +3 -1
  29. package/package.json +40 -46
  30. package/providers/aws/README.md +21 -0
  31. package/providers/aws/awsEnvironment.ts +114 -0
  32. package/providers/aws/generated/managementRegistry.ts +136 -0
  33. package/{src/providers/aws/resources/generated/native/apigatewayv2/api/index.ts → providers/aws/generated/resources/apigatewayv2/api.ts} +13 -50
  34. package/{src/providers/aws/resources/generated/native/apigatewayv2/integration/index.ts → providers/aws/generated/resources/apigatewayv2/integration.ts} +13 -37
  35. package/{src/providers/aws/resources/generated/native/apigatewayv2/route/index.ts → providers/aws/generated/resources/apigatewayv2/route.ts} +23 -40
  36. package/{src/providers/aws/resources/generated/native/apigatewayv2/stage/index.ts → providers/aws/generated/resources/apigatewayv2/stage.ts} +13 -38
  37. package/providers/aws/generated/resources/iam/accesskey.ts +184 -0
  38. package/{src/providers/aws/resources/generated/native/iam/group/index.ts → providers/aws/generated/resources/iam/group.ts} +13 -38
  39. package/{src/providers/aws/resources/generated/native/iam/grouppolicy/index.ts → providers/aws/generated/resources/iam/grouppolicy.ts} +29 -59
  40. package/{src/providers/aws/resources/generated/native/iam/instanceprofile/index.ts → providers/aws/generated/resources/iam/instanceprofile.ts} +13 -41
  41. package/{src/providers/aws/resources/generated/native/iam/managedpolicy/index.ts → providers/aws/generated/resources/iam/managedpolicy.ts} +13 -95
  42. package/providers/aws/generated/resources/iam/oidcprovider.ts +314 -0
  43. package/{src/providers/aws/resources/generated/native/iam/policy/index.ts → providers/aws/generated/resources/iam/policy.ts} +13 -28
  44. package/{src/providers/aws/resources/generated/native/iam/role/index.ts → providers/aws/generated/resources/iam/role.ts} +13 -47
  45. package/{src/providers/aws/resources/generated/native/iam/rolepolicy/index.ts → providers/aws/generated/resources/iam/rolepolicy.ts} +29 -59
  46. package/providers/aws/generated/resources/iam/samlprovider.ts +463 -0
  47. package/providers/aws/generated/resources/iam/servercertificate.ts +465 -0
  48. package/providers/aws/generated/resources/iam/servicelinkedrole.ts +187 -0
  49. package/{src/providers/aws/resources/generated/native/iam/user/index.ts → providers/aws/generated/resources/iam/user.ts} +13 -38
  50. package/{src/providers/aws/resources/generated/native/iam/userpolicy/index.ts → providers/aws/generated/resources/iam/userpolicy.ts} +29 -59
  51. package/{src/providers/aws/resources/generated/native/iam/usertogroupaddition/index.ts → providers/aws/generated/resources/iam/usertogroupaddition.ts} +13 -27
  52. package/providers/aws/generated/resources/iam/virtualmfadevice.ts +298 -0
  53. package/{src/providers/aws/resources/generated/native/kms/key/index.ts → providers/aws/generated/resources/kms/key.ts} +13 -41
  54. package/{src/providers/aws/resources/generated/native/lambda/function/index.ts → providers/aws/generated/resources/lambda/function.ts} +13 -63
  55. package/{src/providers/aws/resources/generated/native/lambda/permission/index.ts → providers/aws/generated/resources/lambda/permission.ts} +13 -55
  56. package/{src/providers/aws/resources/generated/native/s3/bucket/index.ts → providers/aws/generated/resources/s3/bucket.ts} +14 -104
  57. package/{src/providers/aws/resources/generated/native/sns/topic/index.ts → providers/aws/generated/resources/sns/topic.ts} +14 -29
  58. package/{src/providers/aws/resources/generated/native/sqs/queue/index.ts → providers/aws/generated/resources/sqs/queue.ts} +14 -38
  59. package/{src/providers/aws/resources/generated/native/stepfunctions/statemachine/index.ts → providers/aws/generated/resources/stepfunctions/statemachine.ts} +15 -58
  60. package/providers/aws/management/mappings/iam/group.ts +63 -0
  61. package/providers/aws/management/mappings/iam/iamIdentity.ts +41 -0
  62. package/providers/aws/management/mappings/iam/iamLifecycleSettings.ts +8 -0
  63. package/providers/aws/management/mappings/iam/inlinePolicies.ts +159 -0
  64. package/providers/aws/management/mappings/iam/instanceProfile.ts +77 -0
  65. package/providers/aws/management/mappings/iam/oidcProvider.ts +94 -0
  66. package/providers/aws/management/mappings/iam/role.ts +74 -0
  67. package/providers/aws/management/mappings/iam/samlProvider.ts +98 -0
  68. package/providers/aws/management/mappings/iam/serverCertificate.ts +72 -0
  69. package/providers/aws/management/mappings/iam/user.ts +61 -0
  70. package/providers/aws/management/mappings/iam/userToGroupAddition.ts +75 -0
  71. package/providers/aws/management/operations/iam/accessKey.ts +206 -0
  72. package/providers/aws/management/operations/iam/managedPolicy.ts +491 -0
  73. package/providers/aws/management/operations/iam/policy.ts +476 -0
  74. package/providers/aws/management/operations/iam/serviceLinkedRole.ts +172 -0
  75. package/providers/aws/management/operations/iam/virtualMfaDevice.ts +253 -0
  76. package/providers/aws/management/resourceAssociationConfiguration.ts +112 -0
  77. package/providers/aws/management/resourceAssociationRegistration.ts +349 -0
  78. package/providers/aws/management/resourceAssociations.ts +168 -0
  79. package/{src/providers → providers}/aws/management/resourceConfiguration.ts +24 -26
  80. package/providers/aws/management/resourceLifecycleRegistration.ts +540 -0
  81. package/providers/aws/management/resourceManagementModule.ts +31 -0
  82. package/providers/aws/management/resourceManagementRegistry.ts +62 -0
  83. package/providers/aws/management/resourceMapping.ts +84 -0
  84. package/providers/aws/management/resourceOperation.ts +134 -0
  85. package/providers/aws/management/resourceTagOperations.ts +108 -0
  86. package/providers/aws/management/resourceTiming.ts +4 -0
  87. package/providers/aws/runtime.ts +52 -0
  88. package/src/core/resource/resourceCommandPolicy.ts +20 -0
  89. package/src/core/resource/resourceLifecycle.ts +644 -0
  90. package/src/core/resource/resourceStabilization.ts +120 -0
  91. package/src/core/resource/resourceVersions.ts +102 -0
  92. package/src/core/stack/planner.ts +9 -0
  93. package/src/core/stack/resourceStackLifecycle.ts +36 -3
  94. package/src/core/state/resourceState.ts +6 -4
  95. package/src/core/state/stateStore.ts +57 -10
  96. package/src/providers/file/resourcePolicy.ts +13 -12
  97. package/src/providers/providerRuntimeLayer.ts +5 -2
  98. package/src/providers/resourceCommandPolicyLayer.ts +117 -37
  99. package/src/providers/stripe/management/resourcePolicy.ts +22 -11
  100. package/examples/http-echo/application.ts +0 -87
  101. package/src/providers/aws/client/awsClient.ts +0 -418
  102. package/src/providers/aws/client/awsClientConfig.ts +0 -133
  103. package/src/providers/aws/client/awsClientModel.ts +0 -119
  104. package/src/providers/aws/client/awsHttpOperation.ts +0 -153
  105. package/src/providers/aws/client/awsQueryOperation.ts +0 -149
  106. package/src/providers/aws/client/awsRequestSigner.ts +0 -115
  107. package/src/providers/aws/client/awsResponseDecoder.ts +0 -135
  108. package/src/providers/aws/client/awsRetryPolicy.ts +0 -62
  109. package/src/providers/aws/client/generated/apiGatewayV2.ts +0 -3025
  110. package/src/providers/aws/client/generated/cloudControl.ts +0 -5746
  111. package/src/providers/aws/client/generated/iam.ts +0 -10892
  112. package/src/providers/aws/client/generated/lambda.ts +0 -5403
  113. package/src/providers/aws/client/generated/sqs.ts +0 -3769
  114. package/src/providers/aws/client/generated/stepFunctions.ts +0 -1726
  115. package/src/providers/aws/client/openapi/cloudControl/CancelResourceRequest.json +0 -579
  116. package/src/providers/aws/client/openapi/cloudControl/CreateResource.json +0 -1019
  117. package/src/providers/aws/client/openapi/cloudControl/DeleteResource.json +0 -1018
  118. package/src/providers/aws/client/openapi/cloudControl/GetResource.json +0 -883
  119. package/src/providers/aws/client/openapi/cloudControl/GetResourceRequestStatus.json +0 -655
  120. package/src/providers/aws/client/openapi/cloudControl/ListResourceRequests.json +0 -566
  121. package/src/providers/aws/client/openapi/cloudControl/ListResources.json +0 -913
  122. package/src/providers/aws/client/openapi/cloudControl/UpdateResource.json +0 -1027
  123. package/src/providers/aws/cloudControl/client.ts +0 -69
  124. package/src/providers/aws/cloudControl/requestTracker.ts +0 -138
  125. package/src/providers/aws/cloudControl/resourceCommandPolicyLayer.ts +0 -63
  126. package/src/providers/aws/cloudControl/resourceLifecycle.ts +0 -479
  127. package/src/providers/aws/cloudControl/resources/generated/certificatemanager/certificate/index.ts +0 -179
  128. package/src/providers/aws/cloudControl/resources/generated/kms/key/index.ts +0 -362
  129. package/src/providers/aws/cloudControl/resources/generated/s3/bucket/index.ts +0 -2364
  130. package/src/providers/aws/cloudControl/resources/generated/sns/topic/index.ts +0 -326
  131. package/src/providers/aws/cloudControl/resources/generated/sqs/queue/index.ts +0 -307
  132. package/src/providers/aws/cloudControl/resources/generated/sqs/queueinlinepolicy/index.ts +0 -108
  133. package/src/providers/aws/cloudControl/runtime.ts +0 -127
  134. package/src/providers/aws/management/resourceMapping.ts +0 -343
  135. package/src/providers/aws/management/resourceOperation.ts +0 -57
  136. package/src/providers/aws/management/resourcePolicy.ts +0 -549
  137. package/src/providers/aws/management/resourceRegistration.ts +0 -294
  138. package/src/providers/aws/resources/apiGatewayV2/httpApi.ts +0 -327
  139. package/src/providers/aws/resources/generated/native/resourceCommands.ts +0 -152
  140. package/src/providers/aws/resources/iam/grant.ts +0 -150
  141. package/src/providers/aws/resources/iam/grantCommands.ts +0 -283
  142. package/src/providers/aws/resources/iam/policyDocument.ts +0 -30
  143. package/src/providers/aws/resources/iam/policyStatement.ts +0 -59
  144. package/src/providers/aws/resources/iam/role.ts +0 -426
  145. package/src/providers/aws/resources/iam/roleDeclaration.ts +0 -105
  146. package/src/providers/aws/resources/lambda/function.ts +0 -403
  147. package/src/providers/aws/resources/lambda/functionDeclaration.ts +0 -234
  148. package/src/providers/aws/resources/lambda/permission.ts +0 -363
  149. package/src/providers/aws/resources/stepFunctions/stateMachine.ts +0 -95
  150. package/src/providers/aws/runtime.ts +0 -70
@@ -9,7 +9,7 @@ import {
9
9
  ResourceReferenceSchema,
10
10
  ResourceSchemaAnnotationSchema,
11
11
  } from "nomoss/core";
12
- import { ResourceOutputBinding } from "../../../../../../../core/resource/resourceOutputBinding.js";
12
+ import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
13
13
 
14
14
  export interface AWSManagedPolicyProps {
15
15
  readonly Description?: string;
@@ -59,6 +59,7 @@ export const AWSManagedPolicyResourceSchema =
59
59
  },
60
60
  primaryIdentifier: ["/properties/PolicyArn"],
61
61
  });
62
+
62
63
  export const AWSManagedPolicyPropsSchema = annotateResourceSchema(
63
64
  Schema.Struct({
64
65
  Description: Schema.optionalKey(
@@ -303,7 +304,14 @@ export const AWSManagedPolicyRequestSchema = Schema.Struct({
303
304
  ),
304
305
  ),
305
306
  });
307
+
308
+ /**
309
+ * The AWSManagedPolicyRelationshipIssues array lists inputs that can use several outputs
310
+ * from one source type. Each input retains its provider value until a reviewed
311
+ * mapping chooses an output.
312
+ */
306
313
  export const AWSManagedPolicyRelationshipIssues = [];
314
+
307
315
  export const AWSManagedPolicyResourceTypeSchema = Schema.Struct({
308
316
  provider: Schema.Literal("aws"),
309
317
  service: Schema.Literal("iam"),
@@ -479,7 +487,10 @@ export function createAWSManagedPolicyDeclaration<Props>(
479
487
  return resource;
480
488
  }
481
489
 
482
- /** The AWSManagedPolicy resource factory validates properties and registers the resource in the shared graph. Provider values become available after apply saves the resource. */
490
+ /**
491
+ * The AWSManagedPolicy resource factory registers a validated declaration in the
492
+ * stack graph. Its outputs become available after apply saves the resource.
493
+ */
483
494
  export const AWSManagedPolicy = Effect.fn("AWSManagedPolicy")(
484
495
  function* (input: { logicalId: string; props: AWSManagedPolicyProps }) {
485
496
  const graph = yield* ResourceGraphBuilder;
@@ -505,96 +516,3 @@ export const AWSManagedPolicy = Effect.fn("AWSManagedPolicy")(
505
516
  return resource;
506
517
  },
507
518
  );
508
- export const AWSManagedPolicyOutputCatalog = [
509
- {
510
- source: {
511
- provider: "AWS",
512
- service: "CloudFormation",
513
- name: "refs/aws-cdk-service-spec/sources/CloudFormationSchema/us-east-1/aws-iam-managedpolicy.json",
514
- format: "CloudFormation",
515
- },
516
- typeName: "AWS::IAM::ManagedPolicy",
517
- resource: "managedpolicy",
518
- primaryIdentifier: ["/properties/PolicyArn"],
519
- createOnlyProperties: [
520
- "/properties/ManagedPolicyName",
521
- "/properties/Description",
522
- "/properties/Path",
523
- ],
524
- writeOnlyProperties: [],
525
- outputs: {
526
- PolicyArn: {
527
- schema: {
528
- type: "string",
529
- description: "",
530
- },
531
- schemaPath: "/properties/PolicyArn",
532
- valuePath: "/PolicyArn",
533
- required: false,
534
- },
535
- AttachmentCount: {
536
- schema: {
537
- type: "integer",
538
- description: "",
539
- },
540
- schemaPath: "/properties/AttachmentCount",
541
- valuePath: "/AttachmentCount",
542
- required: false,
543
- },
544
- CreateDate: {
545
- schema: {
546
- type: "string",
547
- description: "",
548
- },
549
- schemaPath: "/properties/CreateDate",
550
- valuePath: "/CreateDate",
551
- required: false,
552
- },
553
- DefaultVersionId: {
554
- schema: {
555
- type: "string",
556
- description: "",
557
- },
558
- schemaPath: "/properties/DefaultVersionId",
559
- valuePath: "/DefaultVersionId",
560
- required: false,
561
- },
562
- IsAttachable: {
563
- schema: {
564
- type: "boolean",
565
- description: "",
566
- },
567
- schemaPath: "/properties/IsAttachable",
568
- valuePath: "/IsAttachable",
569
- required: false,
570
- },
571
- PermissionsBoundaryUsageCount: {
572
- schema: {
573
- type: "integer",
574
- description: "",
575
- },
576
- schemaPath: "/properties/PermissionsBoundaryUsageCount",
577
- valuePath: "/PermissionsBoundaryUsageCount",
578
- required: false,
579
- },
580
- PolicyId: {
581
- schema: {
582
- type: "string",
583
- description: "",
584
- },
585
- schemaPath: "/properties/PolicyId",
586
- valuePath: "/PolicyId",
587
- required: false,
588
- },
589
- UpdateDate: {
590
- schema: {
591
- type: "string",
592
- description: "",
593
- },
594
- schemaPath: "/properties/UpdateDate",
595
- valuePath: "/UpdateDate",
596
- required: false,
597
- },
598
- },
599
- },
600
- ];
@@ -0,0 +1,314 @@
1
+ // Generated from the CloudFormation Registry resource schema. Do not edit.
2
+ // biome-ignore-all lint/complexity/useRegexLiterals: Preserve Effect's generated regular expressions.
3
+ import { Effect, Schema } from "effect";
4
+ import {
5
+ annotateResourceSchema,
6
+ ResourceEntity,
7
+ ResourceGraphBuilder,
8
+ type ResourceKey,
9
+ ResourceSchemaAnnotationSchema,
10
+ } from "nomoss/core";
11
+ import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
12
+
13
+ interface Tag {
14
+ readonly Value: string;
15
+ readonly Key: string;
16
+ }
17
+
18
+ const Tag = Schema.Struct({
19
+ Value: Schema.String.annotate({
20
+ description:
21
+ "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
22
+ })
23
+ .check(
24
+ Schema.isMinLength(1).annotate({
25
+ expected: "a value with a length of at least 1",
26
+ }),
27
+ )
28
+ .check(
29
+ Schema.isMaxCodePoints(256).annotate({
30
+ expected: "a string with at most 256 code points",
31
+ }),
32
+ ),
33
+ Key: Schema.String.annotate({
34
+ description:
35
+ "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
36
+ })
37
+ .check(
38
+ Schema.isMinLength(1).annotate({
39
+ expected: "a value with a length of at least 1",
40
+ }),
41
+ )
42
+ .check(
43
+ Schema.isMaxCodePoints(128).annotate({
44
+ expected: "a string with at most 128 code points",
45
+ }),
46
+ ),
47
+ }).annotate({
48
+ description: "A key-value pair to associate with a resource.",
49
+ identifier: "Tag",
50
+ });
51
+
52
+ export interface AWSOIDCProviderProps {
53
+ readonly ClientIdList?: ReadonlyArray<string>;
54
+ readonly Url?: string;
55
+ readonly ThumbprintList?: ReadonlyArray<string>;
56
+ readonly Tags?: ReadonlyArray<Tag>;
57
+ }
58
+
59
+ export const AWSOIDCProviderResourceSchema =
60
+ ResourceSchemaAnnotationSchema.make({
61
+ provider: "aws",
62
+ service: "iam",
63
+ resource: "oidcprovider",
64
+ operation: "create",
65
+ stateSecretOutputKeys: [],
66
+ replacement: {
67
+ order: "createBeforeDestroy",
68
+ properties: [["Url"]],
69
+ },
70
+ primaryIdentifier: ["/properties/Arn"],
71
+ });
72
+
73
+ export const AWSOIDCProviderPropsSchema = annotateResourceSchema(
74
+ Schema.Struct({
75
+ ClientIdList: Schema.optionalKey(
76
+ Schema.Array(
77
+ Schema.String.check(
78
+ Schema.isMinLength(1).annotate({
79
+ expected: "a value with a length of at least 1",
80
+ }),
81
+ ).check(
82
+ Schema.isMaxCodePoints(255).annotate({
83
+ expected: "a string with at most 255 code points",
84
+ }),
85
+ ),
86
+ ),
87
+ ),
88
+ Url: Schema.optionalKey(
89
+ Schema.String.check(
90
+ Schema.isMinLength(1).annotate({
91
+ expected: "a value with a length of at least 1",
92
+ }),
93
+ ).check(
94
+ Schema.isMaxCodePoints(255).annotate({
95
+ expected: "a string with at most 255 code points",
96
+ }),
97
+ ),
98
+ ),
99
+ ThumbprintList: Schema.optionalKey(
100
+ Schema.Array(
101
+ Schema.String.check(
102
+ Schema.isMinCodePoints(40).annotate({
103
+ expected: "a string with at least 40 code points",
104
+ }),
105
+ )
106
+ .check(
107
+ Schema.isMaxCodePoints(40).annotate({
108
+ expected: "a string with at most 40 code points",
109
+ }),
110
+ )
111
+ .check(
112
+ Schema.isPattern(
113
+ new globalThis.RegExp("[0-9A-Fa-f]{40}", "u"),
114
+ ).annotate({
115
+ expected: "a string matching the RegExp [0-9A-Fa-f]{40}",
116
+ }),
117
+ ),
118
+ ).check(
119
+ Schema.isMaxLength(5).annotate({
120
+ expected: "a value with a length of at most 5",
121
+ }),
122
+ ),
123
+ ),
124
+ Tags: Schema.optionalKey(Schema.Array(Tag)),
125
+ }),
126
+ AWSOIDCProviderResourceSchema,
127
+ );
128
+
129
+ export interface AWSOIDCProviderOutputs {
130
+ readonly Arn?: string;
131
+ }
132
+
133
+ export const AWSOIDCProviderOutputsSchema = Schema.Struct({
134
+ Arn: Schema.optionalKey(
135
+ Schema.String.annotate({
136
+ description: "Amazon Resource Name (ARN) of the OIDC provider",
137
+ })
138
+ .check(
139
+ Schema.isMinCodePoints(20).annotate({
140
+ expected: "a string with at least 20 code points",
141
+ }),
142
+ )
143
+ .check(
144
+ Schema.isMaxCodePoints(2048).annotate({
145
+ expected: "a string with at most 2048 code points",
146
+ }),
147
+ ),
148
+ ),
149
+ });
150
+
151
+ export interface AWSOIDCProviderRequest {
152
+ readonly ClientIdList?: ReadonlyArray<string>;
153
+ readonly Url?: string;
154
+ readonly ThumbprintList?: ReadonlyArray<string>;
155
+ readonly Tags?: ReadonlyArray<Tag>;
156
+ }
157
+
158
+ export const AWSOIDCProviderRequestSchema = Schema.Struct({
159
+ ClientIdList: Schema.optionalKey(
160
+ Schema.Array(
161
+ Schema.String.check(
162
+ Schema.isMinLength(1).annotate({
163
+ expected: "a value with a length of at least 1",
164
+ }),
165
+ ).check(
166
+ Schema.isMaxCodePoints(255).annotate({
167
+ expected: "a string with at most 255 code points",
168
+ }),
169
+ ),
170
+ ),
171
+ ),
172
+ Url: Schema.optionalKey(
173
+ Schema.String.check(
174
+ Schema.isMinLength(1).annotate({
175
+ expected: "a value with a length of at least 1",
176
+ }),
177
+ ).check(
178
+ Schema.isMaxCodePoints(255).annotate({
179
+ expected: "a string with at most 255 code points",
180
+ }),
181
+ ),
182
+ ),
183
+ ThumbprintList: Schema.optionalKey(
184
+ Schema.Array(
185
+ Schema.String.check(
186
+ Schema.isMinCodePoints(40).annotate({
187
+ expected: "a string with at least 40 code points",
188
+ }),
189
+ )
190
+ .check(
191
+ Schema.isMaxCodePoints(40).annotate({
192
+ expected: "a string with at most 40 code points",
193
+ }),
194
+ )
195
+ .check(
196
+ Schema.isPattern(
197
+ new globalThis.RegExp("[0-9A-Fa-f]{40}", "u"),
198
+ ).annotate({
199
+ expected: "a string matching the RegExp [0-9A-Fa-f]{40}",
200
+ }),
201
+ ),
202
+ ).check(
203
+ Schema.isMaxLength(5).annotate({
204
+ expected: "a value with a length of at most 5",
205
+ }),
206
+ ),
207
+ ),
208
+ Tags: Schema.optionalKey(Schema.Array(Tag)),
209
+ });
210
+
211
+ /**
212
+ * The AWSOIDCProviderRelationshipIssues array lists inputs that can use several outputs
213
+ * from one source type. Each input retains its provider value until a reviewed
214
+ * mapping chooses an output.
215
+ */
216
+ export const AWSOIDCProviderRelationshipIssues = [];
217
+
218
+ export const AWSOIDCProviderResourceTypeSchema = Schema.Struct({
219
+ provider: Schema.Literal("aws"),
220
+ service: Schema.Literal("iam"),
221
+ resource: Schema.Literal("oidcprovider"),
222
+ });
223
+
224
+ /**
225
+ * The AWSOIDCProviderResource class retains its owning stack across declarations.
226
+ * Applied output properties are ordinary values maintained by the lifecycle.
227
+ */
228
+ export class AWSOIDCProviderResource<
229
+ Props = AWSOIDCProviderProps,
230
+ > extends ResourceEntity<{
231
+ readonly provider: "aws";
232
+ readonly service: "iam";
233
+ readonly resource: "oidcprovider";
234
+ }> {
235
+ constructor(
236
+ key: ResourceKey,
237
+ readonly props: Props,
238
+ private readonly binding?: ResourceOutputBinding,
239
+ ) {
240
+ super({
241
+ key,
242
+ resourceType: {
243
+ provider: "aws",
244
+ service: "iam",
245
+ resource: "oidcprovider",
246
+ },
247
+ });
248
+ }
249
+
250
+ /**
251
+ * Successful lifecycle writes update this value for declarations owned by the stack.
252
+ * Reading an unavailable value throws ResourceOutputResolutionMissing.
253
+ */
254
+ get Arn(): Required<AWSOIDCProviderOutputs>["Arn"] {
255
+ const value: Required<AWSOIDCProviderOutputs>["Arn"] =
256
+ ResourceOutputBinding.value(
257
+ this.binding,
258
+ this.key,
259
+ "Arn",
260
+ Schema.requiredKey(AWSOIDCProviderOutputsSchema.fields.Arn),
261
+ );
262
+ return value;
263
+ }
264
+ }
265
+
266
+ /**
267
+ * Callers must validate properties before constructing the declaration.
268
+ * Compatible resources can depend on it before apply supplies provider values.
269
+ * Reading applied outputs requires a binding to the owning stack.
270
+ */
271
+ export function createAWSOIDCProviderDeclaration<Props>(
272
+ key: ResourceKey,
273
+ props: Props,
274
+ binding?: ResourceOutputBinding,
275
+ ): AWSOIDCProviderResource<Props> {
276
+ const resource: AWSOIDCProviderResource<Props> =
277
+ new AWSOIDCProviderResource<Props>(key, props, binding);
278
+
279
+ return resource;
280
+ }
281
+
282
+ /**
283
+ * The AWSOIDCProvider resource factory registers a validated declaration in the
284
+ * stack graph. Its outputs become available after apply saves the resource.
285
+ */
286
+ export const AWSOIDCProvider = Effect.fn("AWSOIDCProvider")(function* (input: {
287
+ logicalId: string;
288
+ props: AWSOIDCProviderProps;
289
+ }) {
290
+ const graph = yield* ResourceGraphBuilder;
291
+
292
+ const key: ResourceKey = { logicalId: input.logicalId };
293
+
294
+ const declaration = yield* graph.resource(key);
295
+
296
+ const props = yield* Schema.decodeEffect(AWSOIDCProviderPropsSchema)(
297
+ input.props,
298
+ );
299
+
300
+ yield* declaration.registerEntity(AWSOIDCProviderResourceTypeSchema, {
301
+ propsSchema: AWSOIDCProviderPropsSchema,
302
+ requestSchema: AWSOIDCProviderRequestSchema,
303
+ outputsSchema: AWSOIDCProviderOutputsSchema,
304
+ props,
305
+ });
306
+
307
+ const resource: AWSOIDCProviderResource = createAWSOIDCProviderDeclaration(
308
+ key,
309
+ props,
310
+ declaration.outputs,
311
+ );
312
+
313
+ return resource;
314
+ });
@@ -8,7 +8,7 @@ import {
8
8
  type ResourceKey,
9
9
  ResourceSchemaAnnotationSchema,
10
10
  } from "nomoss/core";
11
- import { ResourceOutputBinding } from "../../../../../../../core/resource/resourceOutputBinding.js";
11
+ import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
12
12
 
13
13
  export interface AWSPolicyProps {
14
14
  readonly Groups?: ReadonlyArray<string>;
@@ -30,6 +30,7 @@ export const AWSPolicyResourceSchema = ResourceSchemaAnnotationSchema.make({
30
30
  stateSecretOutputKeys: [],
31
31
  primaryIdentifier: ["/properties/Id"],
32
32
  });
33
+
33
34
  export const AWSPolicyPropsSchema = annotateResourceSchema(
34
35
  Schema.Struct({
35
36
  Groups: Schema.optionalKey(
@@ -158,7 +159,14 @@ export const AWSPolicyRequestSchema = Schema.Struct({
158
159
  }),
159
160
  ),
160
161
  });
162
+
163
+ /**
164
+ * The AWSPolicyRelationshipIssues array lists inputs that can use several outputs
165
+ * from one source type. Each input retains its provider value until a reviewed
166
+ * mapping chooses an output.
167
+ */
161
168
  export const AWSPolicyRelationshipIssues = [];
169
+
162
170
  export const AWSPolicyResourceTypeSchema = Schema.Struct({
163
171
  provider: Schema.Literal("aws"),
164
172
  service: Schema.Literal("iam"),
@@ -223,7 +231,10 @@ export function createAWSPolicyDeclaration<Props>(
223
231
  return resource;
224
232
  }
225
233
 
226
- /** The AWSPolicy resource factory validates properties and registers the resource in the shared graph. Provider values become available after apply saves the resource. */
234
+ /**
235
+ * The AWSPolicy resource factory registers a validated declaration in the
236
+ * stack graph. Its outputs become available after apply saves the resource.
237
+ */
227
238
  export const AWSPolicy = Effect.fn("AWSPolicy")(function* (input: {
228
239
  logicalId: string;
229
240
  props: AWSPolicyProps;
@@ -251,29 +262,3 @@ export const AWSPolicy = Effect.fn("AWSPolicy")(function* (input: {
251
262
 
252
263
  return resource;
253
264
  });
254
- export const AWSPolicyOutputCatalog = [
255
- {
256
- source: {
257
- provider: "AWS",
258
- service: "CloudFormation",
259
- name: "refs/aws-cdk-service-spec/sources/CloudFormationSchema/us-east-1/aws-iam-policy.json",
260
- format: "CloudFormation",
261
- },
262
- typeName: "AWS::IAM::Policy",
263
- resource: "policy",
264
- primaryIdentifier: ["/properties/Id"],
265
- createOnlyProperties: [],
266
- writeOnlyProperties: [],
267
- outputs: {
268
- Id: {
269
- schema: {
270
- description: "",
271
- type: "string",
272
- },
273
- schemaPath: "/properties/Id",
274
- valuePath: "/Id",
275
- required: false,
276
- },
277
- },
278
- },
279
- ];
@@ -9,7 +9,7 @@ import {
9
9
  ResourceReferenceSchema,
10
10
  ResourceSchemaAnnotationSchema,
11
11
  } from "nomoss/core";
12
- import { ResourceOutputBinding } from "../../../../../../../core/resource/resourceOutputBinding.js";
12
+ import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
13
13
 
14
14
  interface Policy {
15
15
  readonly PolicyDocument:
@@ -101,6 +101,7 @@ export const AWSRoleResourceSchema = ResourceSchemaAnnotationSchema.make({
101
101
  },
102
102
  primaryIdentifier: ["/properties/RoleName"],
103
103
  });
104
+
104
105
  export const AWSRolePropsSchema = annotateResourceSchema(
105
106
  Schema.Struct({
106
107
  AssumeRolePolicyDocument: Schema.Union([
@@ -308,7 +309,14 @@ export const AWSRoleRequestSchema = Schema.Struct({
308
309
  }),
309
310
  ),
310
311
  });
312
+
313
+ /**
314
+ * The AWSRoleRelationshipIssues array lists inputs that can use several outputs
315
+ * from one source type. Each input retains its provider value until a reviewed
316
+ * mapping chooses an output.
317
+ */
311
318
  export const AWSRoleRelationshipIssues = [];
319
+
312
320
  export const AWSRoleResourceTypeSchema = Schema.Struct({
313
321
  provider: Schema.Literal("aws"),
314
322
  service: Schema.Literal("iam"),
@@ -403,7 +411,10 @@ export function createAWSRoleDeclaration<Props>(
403
411
  return resource;
404
412
  }
405
413
 
406
- /** The AWSRole resource factory validates properties and registers the resource in the shared graph. Provider values become available after apply saves the resource. */
414
+ /**
415
+ * The AWSRole resource factory registers a validated declaration in the
416
+ * stack graph. Its outputs become available after apply saves the resource.
417
+ */
407
418
  export const AWSRole = Effect.fn("AWSRole")(function* (input: {
408
419
  logicalId: string;
409
420
  props: AWSRoleProps;
@@ -431,48 +442,3 @@ export const AWSRole = Effect.fn("AWSRole")(function* (input: {
431
442
 
432
443
  return resource;
433
444
  });
434
- export const AWSRoleOutputCatalog = [
435
- {
436
- source: {
437
- provider: "AWS",
438
- service: "CloudFormation",
439
- name: "refs/aws-cdk-service-spec/sources/CloudFormationSchema/us-east-1/aws-iam-role.json",
440
- format: "CloudFormation",
441
- },
442
- typeName: "AWS::IAM::Role",
443
- resource: "role",
444
- primaryIdentifier: ["/properties/RoleName"],
445
- createOnlyProperties: ["/properties/Path", "/properties/RoleName"],
446
- writeOnlyProperties: [],
447
- outputs: {
448
- Arn: {
449
- schema: {
450
- description: "",
451
- type: "string",
452
- },
453
- schemaPath: "/properties/Arn",
454
- valuePath: "/Arn",
455
- required: false,
456
- },
457
- RoleId: {
458
- schema: {
459
- description: "",
460
- type: "string",
461
- },
462
- schemaPath: "/properties/RoleId",
463
- valuePath: "/RoleId",
464
- required: false,
465
- },
466
- RoleName: {
467
- schema: {
468
- description:
469
- 'A name for the IAM role, up to 64 characters in length. For valid values, see the ``RoleName`` parameter for the [CreateRole](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html) action in the *User Guide*.\n This parameter allows (per its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The role name must be unique within the account. Role names are not distinguished by case. For example, you cannot create roles named both "Role1" and "role1".\n If you don\'t specify a name, CFN generates a unique physical ID and uses that ID for the role name.\n If you specify a name, you must specify the ``CAPABILITY_NAMED_IAM`` value to acknowledge your template\'s capabilities. For more information, see [Acknowledging Resources in Templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities).\n Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using ``Fn::Join`` and ``AWS::Region`` to create a Region-specific name, as in the following example: ``{"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]}``.',
470
- type: "string",
471
- },
472
- schemaPath: "/properties/RoleName",
473
- valuePath: "/RoleName",
474
- required: false,
475
- },
476
- },
477
- },
478
- ];