@reventlessdev/reventless-aws 3.0.0-alpha.219 → 3.0.0-alpha.221
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/CHANGELOG.md +18 -0
- package/package.json +8 -8
- package/src/Platform.res.mjs +4 -0
- package/src/Platform_Stack.res +6 -0
- package/src/Platform_Stack.res.mjs +3 -1
- package/src/adapter/AWS_Tags.res +127 -12
- package/src/adapter/AWS_Tags.res.mjs +58 -17
- package/src/adapter/Api/AppSync_SourceApiAssociation_Retrying.res +26 -1
- package/src/adapter/Api/AppSync_SourceApiAssociation_Retrying.res.mjs +12 -1
- package/src/adapter/Api/Platform_ComponentDefinitions_Lambda.res +13 -1
- package/src/adapter/Api/Platform_ComponentDefinitions_Lambda.res.mjs +3 -4
- package/src/adapter/Api/Platform_UIFragments_Lambda.res +13 -1
- package/src/adapter/Api/Platform_UIFragments_Lambda.res.mjs +3 -4
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync.res +12 -0
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync.res.mjs +4 -2
- package/src/adapter/CommandGenerator/InboundTranslationResolvers_AppSync.res +6 -0
- package/src/adapter/CommandGenerator/InboundTranslationResolvers_AppSync.res.mjs +2 -1
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS.res +2 -2
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS.res.mjs +2 -2
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Async.res +2 -2
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Async.res.mjs +2 -2
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_FIFO.res +2 -2
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_FIFO.res.mjs +2 -2
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Sync.res +2 -2
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Sync.res.mjs +2 -2
- package/src/adapter/Counter/CounterHandler_DynamoDbStream.res +1 -0
- package/src/adapter/Counter/CounterHandler_DynamoDbStream.res.mjs +1 -1
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb.res +1 -1
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb.res.mjs +1 -2
- package/src/adapter/EventCollector/EventCollectorChannel_DynamoDbStream.res +1 -1
- package/src/adapter/EventCollector/EventCollectorChannel_DynamoDbStream.res.mjs +1 -1
- package/src/adapter/EventCollector/EventCollectorChannel_SQS.res +2 -2
- package/src/adapter/EventCollector/EventCollectorChannel_SQS.res.mjs +2 -2
- package/src/adapter/EventCollector/EventCollectorChannel_SQS_FIFO.res +2 -2
- package/src/adapter/EventCollector/EventCollectorChannel_SQS_FIFO.res.mjs +2 -2
- package/src/adapter/EventLog/EventLogStorage.res +3 -3
- package/src/adapter/EventLog/EventLogStorage.res.mjs +3 -3
- package/src/adapter/EventLog/EventLogStorage_DynamoDb.res +2 -2
- package/src/adapter/EventLog/EventLogStorage_DynamoDb.res.mjs +2 -2
- package/src/adapter/EventLog/EventLogStorage_DynamoDbStream.res +2 -2
- package/src/adapter/EventLog/EventLogStorage_DynamoDbStream.res.mjs +2 -2
- package/src/adapter/EventLog/EventLogStorage_Postgres.res +1 -1
- package/src/adapter/EventLog/EventLogStorage_Postgres.res.mjs +1 -1
- package/src/adapter/EventLogSubscription/EventLogSubscription_AppSync.res +7 -1
- package/src/adapter/EventLogSubscription/EventLogSubscription_AppSync.res.mjs +2 -2
- package/src/adapter/EventTopic/EventTopicPublisher_DynamoDbStream.res +1 -1
- package/src/adapter/EventTopic/EventTopicPublisher_DynamoDbStream.res.mjs +1 -1
- package/src/adapter/EventTopic/EventTopicPublisher_SNS.res +2 -2
- package/src/adapter/EventTopic/EventTopicPublisher_SNS.res.mjs +2 -2
- package/src/adapter/EventTopic/EventTopicPublisher_SNS_FIFO.res +2 -2
- package/src/adapter/EventTopic/EventTopicPublisher_SNS_FIFO.res.mjs +2 -2
- package/src/adapter/Mcp/MCP_Lambda.res.mjs +1 -1
- package/src/adapter/Postgres/PgChangeFeedRelay_Builder.res +7 -0
- package/src/adapter/Postgres/PgChangeFeedRelay_Builder.res.mjs +4 -2
- package/src/adapter/Postgres/PgMigration_Builder.res +1 -0
- package/src/adapter/Postgres/PgMigration_Builder.res.mjs +1 -1
- package/src/adapter/QueryDb/PgQueryResolver_Builder.res +7 -0
- package/src/adapter/QueryDb/PgQueryResolver_Builder.res.mjs +4 -2
- package/src/adapter/QueryDb/QueryDbStorage.res +6 -6
- package/src/adapter/QueryDb/QueryDbStorage.res.mjs +6 -6
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDb.res +2 -2
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDb.res.mjs +2 -2
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDbStream.res +2 -2
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDbStream.res.mjs +2 -2
- package/src/adapter/QueryDb/QueryDbStorage_Postgres.res +1 -1
- package/src/adapter/QueryDb/QueryDbStorage_Postgres.res.mjs +1 -1
- package/src/adapter/Runtime/AdminEventCollectorEntryPoint.mjs +24 -41
- package/src/adapter/Runtime/AggregateEntryPoint.mjs +52 -45
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res +19 -2
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res.mjs +8 -5
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro_Async.res +19 -2
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro_Async.res.mjs +8 -5
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res +9 -1
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res.mjs +4 -2
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate_Async.res +9 -1
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate_Async.res.mjs +4 -2
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single.res +9 -1
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single.res.mjs +4 -2
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single_Async.res +9 -1
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single_Async.res.mjs +4 -2
- package/src/adapter/Runtime/AutomationSliceEntryPoint.mjs +36 -22
- package/src/adapter/Runtime/AutomationSliceRuntime_Builder_Single.res +1 -0
- package/src/adapter/Runtime/AutomationSliceRuntime_Builder_Single.res.mjs +1 -1
- package/src/adapter/Runtime/DcbCommandTopicEntryPoint.mjs +39 -42
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_PerEventCollector.res +7 -1
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_PerEventCollector.res.mjs +4 -2
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_Single.res +19 -1
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_Single.res.mjs +5 -2
- package/src/adapter/Runtime/EventMapperEntryPoint.mjs +25 -23
- package/src/adapter/Runtime/ExtensionPointEntryPoint.mjs +25 -41
- package/src/adapter/Runtime/ExtensionPointRuntime_Builder_PerExtensionPoint.res +1 -0
- package/src/adapter/Runtime/ExtensionPointRuntime_Builder_PerExtensionPoint.res.mjs +1 -1
- package/src/adapter/Runtime/HandlerFactoryHelpers.mjs +126 -0
- package/src/adapter/Runtime/PluginExtensionPointEntryPoint.mjs +24 -41
- package/src/adapter/Runtime/ReadModelEntryPoint.mjs +33 -24
- package/src/adapter/Runtime/RuntimeEnvironment_Lambda.res +52 -2
- package/src/adapter/Runtime/RuntimeEnvironment_Lambda.res.mjs +25 -7
- package/src/adapter/Runtime/SideEffectEntryPoint.mjs +25 -24
- package/src/adapter/Runtime/SideEffectHandlerRuntime_Builder_Single.res +9 -1
- package/src/adapter/Runtime/SideEffectHandlerRuntime_Builder_Single.res.mjs +4 -2
- package/src/adapter/Runtime/StateChangeSliceRuntime_Builder_Single.res +1 -0
- package/src/adapter/Runtime/StateChangeSliceRuntime_Builder_Single.res.mjs +1 -1
- package/src/adapter/Runtime/StateViewSliceEntryPoint.mjs +26 -21
- package/src/adapter/Runtime/StateViewSliceRuntime_Builder_Single.res +2 -1
- package/src/adapter/Runtime/StateViewSliceRuntime_Builder_Single.res.mjs +2 -2
- package/src/adapter/Runtime/TaskRuntime_Builder_PerBucket.res +1 -0
- package/src/adapter/Runtime/TaskRuntime_Builder_PerBucket.res.mjs +1 -1
- package/src/adapter/ScheduledPublisher/ScheduledPublisher_CloudWatchEvents.res +12 -0
- package/src/adapter/ScheduledPublisher/ScheduledPublisher_CloudWatchEvents.res.mjs +4 -2
- package/src/adapter/StateTopic/StateTopic_AppSync.res +7 -1
- package/src/adapter/StateTopic/StateTopic_AppSync.res.mjs +2 -2
- package/src/adapter/Task/TaskBucket_S3.res +1 -0
- package/src/adapter/Task/TaskBucket_S3.res.mjs +7 -1
- package/src/components/Aggregate_Builder_Micro.res.mjs +2 -0
- package/src/components/Aggregate_Builder_NoResolver.res.mjs +2 -0
- package/src/components/Aggregate_Builder_PerAggregate.res.mjs +2 -0
- package/src/components/Aggregate_Builder_Single.res.mjs +2 -0
- package/src/components/Aggregate_Builder_Single_Async.res.mjs +2 -0
- package/src/components/Api/AppSync_Adapter.res +12 -0
- package/src/components/Api/AppSync_Adapter.res.mjs +6 -2
- package/src/components/Api/AppSync_MergedApi.res +12 -0
- package/src/components/Api/AppSync_MergedApi.res.mjs +5 -2
- package/src/components/AutomationSlice_Builder.res.mjs +2 -0
- package/src/components/ExtensionPoint_Builder.res.mjs +2 -0
- package/src/components/ForeignReadModel_Builder.res.mjs +4 -0
- package/src/components/OutboundTranslationSlice_Builder.res.mjs +2 -0
- package/src/components/Plugin.res.mjs +2 -0
- package/src/components/ReadModel_Builder_NoResolver.res.mjs +2 -0
- package/src/components/ReadModel_Builder_NoResolver_Stream.res.mjs +2 -0
- package/src/components/ReadModel_Builder_PerReadModel.res.mjs +2 -0
- package/src/components/ReadModel_Builder_Single.res.mjs +2 -0
- package/src/components/ReadModel_Builder_Single_Stream.res.mjs +2 -0
- package/src/components/SideEffectHandler_PerSideEffectHandler.res.mjs +6 -0
- package/src/components/SideEffectHandler_Single.res.mjs +4 -0
- package/src/components/StateViewSlice_Builder.res.mjs +2 -0
- package/src/components/StateViewSlice_Builder_Stream.res.mjs +2 -0
- package/src/components/Task_Builder_PerBucket.res.mjs +4 -0
- package/src/components/Vpc.res +10 -1
- package/src/components/Vpc.res.mjs +3 -1
- package/src/plugin/cloner/ClonerRunner_Fargate.res +26 -1
- package/src/plugin/cloner/ClonerRunner_Fargate.res.mjs +9 -6
- package/src/plugin/heartbeat/HeartbeatRunner_CloudWatchEvents.res +6 -0
- package/src/plugin/heartbeat/HeartbeatRunner_CloudWatchEvents.res.mjs +4 -1
- package/src/plugin/runtime/PluginExtensionPointRuntime_Builder.res +1 -0
- package/src/plugin/runtime/PluginExtensionPointRuntime_Builder.res.mjs +1 -1
- package/src/plugin/runtime/PluginRuntime_Builder.res +2 -0
- package/src/plugin/runtime/PluginRuntime_Builder.res.mjs +2 -2
- package/src/plugin/stack/Plugin_ExtensionPoint_Builder.res.mjs +4 -0
- package/src/plugin/stack/Plugin_Stack.res +26 -1
- package/src/plugin/stack/Plugin_Stack.res.mjs +8 -3
- package/src/util/Util_CognitoGroupUser.res +6 -0
- package/src/util/Util_CognitoGroupUser.res.mjs +3 -1
- package/src/util/Util_DeadLetterQueue.res +8 -2
- package/src/util/Util_DeadLetterQueue.res.mjs +3 -4
- package/src/util/Util_LogAttribution.res +31 -0
- package/src/util/Util_LogAttribution.res.mjs +27 -0
- package/tests/AWS_TagsTest.res +236 -0
- package/tests/AWS_TagsTest.res.mjs +153 -0
- package/tests/AppSync_SourceApiAssociation_RetryingTest.res +26 -0
- package/tests/AppSync_SourceApiAssociation_RetryingTest.res.mjs +20 -0
- package/tests/HandlerFactoryDispatchTest.res +190 -0
- package/tests/HandlerFactoryDispatchTest.res.mjs +135 -0
- package/tests/integration/AggregateEntryPoint_IntegrationTest.res +5 -3
- package/tests/integration/AggregateEntryPoint_IntegrationTest.res.mjs +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 3.0.0-alpha.221 (2026-07-22)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **aws:** give deployed resources a complete attribution tag schema ([f931a44](https://github.com/ReventlessDev/reventless-core/commit/f931a44ab311a4aff1cd73939b42e7e5221621c9))
|
|
11
|
+
* **aws:** resolve plugin at deploy time for aggregate/DCB dispatch ([4d81320](https://github.com/ReventlessDev/reventless-core/commit/4d813200d77362791263357490aa31f63eac1879))
|
|
12
|
+
* **aws:** unify the deployed entry-point dispatch boundary; add latency fields ([ad7b3f6](https://github.com/ReventlessDev/reventless-core/commit/ad7b3f60e7b2b2213677732bbf13f486043075ef))
|
|
13
|
+
* **core:** attribute piece resources to the component that owns them ([2ddd91a](https://github.com/ReventlessDev/reventless-core/commit/2ddd91ae1a5394257dec4b9b6e5021d5aa6e7f63))
|
|
14
|
+
* **core:** attribute shared substrate to the plugin that owns it ([a440d4f](https://github.com/ReventlessDev/reventless-core/commit/a440d4f827dfab9e2e9a763ffd9fc40240852e09))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 3.0.0-alpha.220 (2026-07-21)
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **aws:** declare output-only props on the retrying SourceApiAssociation ([5e1cdcc](https://github.com/ReventlessDev/reventless-core/commit/5e1cdcc8612d717649afa520285f854060d1e276))
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
# 3.0.0-alpha.219 (2026-07-21)
|
|
7
25
|
|
|
8
26
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-aws",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.221",
|
|
4
4
|
"description": "AWS adapters for Reventless",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"dependencies": {
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
"@aws-sdk/client-cloudfront": "3.970.0",
|
|
9
9
|
"sury": "11.0.0-alpha.4",
|
|
10
10
|
"uuid": "^13.0.0",
|
|
11
|
+
"@reventlessdev/rescript-effect": "0.1.0-alpha.30",
|
|
11
12
|
"@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.24",
|
|
12
|
-
"@reventlessdev/rescript-effect": "0.1.0-alpha.29",
|
|
13
13
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.9",
|
|
14
|
+
"@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.57",
|
|
14
15
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.17",
|
|
15
|
-
"@reventlessdev/
|
|
16
|
+
"@reventlessdev/reventless-core": "3.0.0-alpha.175",
|
|
17
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.103",
|
|
18
|
+
"@reventlessdev/reventless-postgres": "3.0.0-alpha.39",
|
|
19
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.80",
|
|
16
20
|
"@reventlessdev/rescript-uuid": "1.1.0-alpha.17",
|
|
17
|
-
"@reventlessdev/reventless-
|
|
18
|
-
"@reventlessdev/reventless-infra": "3.0.0-alpha.102",
|
|
19
|
-
"@reventlessdev/reventless-interop": "3.0.0-alpha.28",
|
|
20
|
-
"@reventlessdev/reventless-postgres": "3.0.0-alpha.38",
|
|
21
|
-
"@reventlessdev/reventless-spec": "3.0.0-alpha.79"
|
|
21
|
+
"@reventlessdev/reventless-interop": "3.0.0-alpha.28"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"rescript": "12.3.0",
|
package/src/Platform.res.mjs
CHANGED
|
@@ -542,6 +542,8 @@ function MakeWithConfig(Config) {
|
|
|
542
542
|
groupBySource: RuntimeEnvironment_Lambda$ReventlessAws.groupBySource,
|
|
543
543
|
extractCorrelationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCorrelationId,
|
|
544
544
|
extractCausationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCausationId,
|
|
545
|
+
extractSentTimestamp: RuntimeEnvironment_Lambda$ReventlessAws.extractSentTimestamp,
|
|
546
|
+
extractRetryCount: RuntimeEnvironment_Lambda$ReventlessAws.extractRetryCount,
|
|
545
547
|
asEventHandler: prim => prim,
|
|
546
548
|
asEffectHandler: prim => prim
|
|
547
549
|
})({
|
|
@@ -1515,6 +1517,8 @@ function Make($star) {
|
|
|
1515
1517
|
groupBySource: RuntimeEnvironment_Lambda$ReventlessAws.groupBySource,
|
|
1516
1518
|
extractCorrelationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCorrelationId,
|
|
1517
1519
|
extractCausationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCausationId,
|
|
1520
|
+
extractSentTimestamp: RuntimeEnvironment_Lambda$ReventlessAws.extractSentTimestamp,
|
|
1521
|
+
extractRetryCount: RuntimeEnvironment_Lambda$ReventlessAws.extractRetryCount,
|
|
1518
1522
|
asEventHandler: prim => prim,
|
|
1519
1523
|
asEffectHandler: prim => prim
|
|
1520
1524
|
})({
|
package/src/Platform_Stack.res
CHANGED
|
@@ -90,6 +90,12 @@ let _resolveUncached = (): cognitoUserPool => {
|
|
|
90
90
|
usernameAttributes: Pulumi.Input.make([Pulumi.Input.make("email")]),
|
|
91
91
|
passwordPolicy: Pulumi.Input.make(pwdPolicy),
|
|
92
92
|
mfaConfiguration: Pulumi.Input.make("OFF"),
|
|
93
|
+
tags: AWS.Tags.make(
|
|
94
|
+
~name="HostUiPool",
|
|
95
|
+
~kind=ReventlessCore.ComponentType.Platform,
|
|
96
|
+
~role=Auth,
|
|
97
|
+
~scope=Platform,
|
|
98
|
+
),
|
|
93
99
|
},
|
|
94
100
|
)
|
|
95
101
|
|
|
@@ -4,6 +4,7 @@ import * as Aws from "@pulumi/aws";
|
|
|
4
4
|
import * as Pulumi$Pulumi from "@reventlessdev/rescript-pulumi-pulumi/src/Pulumi.res.mjs";
|
|
5
5
|
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
6
6
|
import * as Pulumi from "@pulumi/pulumi";
|
|
7
|
+
import * as AWS_Tags$ReventlessAws from "./adapter/AWS_Tags.res.mjs";
|
|
7
8
|
import * as Util_LocalConfig$ReventlessAws from "./util/Util_LocalConfig.res.mjs";
|
|
8
9
|
|
|
9
10
|
function _resolveUncached() {
|
|
@@ -60,7 +61,8 @@ function _resolveUncached() {
|
|
|
60
61
|
adminCreateUserConfig: adminConfig,
|
|
61
62
|
usernameAttributes: ["email"],
|
|
62
63
|
passwordPolicy: pwdPolicy,
|
|
63
|
-
mfaConfiguration: "OFF"
|
|
64
|
+
mfaConfiguration: "OFF",
|
|
65
|
+
tags: AWS_Tags$ReventlessAws.make("HostUiPool", "Platform", "Auth", "Platform", undefined, undefined, undefined, undefined)
|
|
64
66
|
});
|
|
65
67
|
let tokenUnits2_accessToken = "minutes";
|
|
66
68
|
let tokenUnits2_idToken = "minutes";
|
package/src/adapter/AWS_Tags.res
CHANGED
|
@@ -1,16 +1,131 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
module Attribution = ReventlessCore.ResourceAttribution
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
Attribution tags for a framework-created AWS resource.
|
|
5
|
+
|
|
6
|
+
Every framework fact is namespaced `reventless:*`, lower-case, and appears
|
|
7
|
+
exactly once. `Name` is the single bare key, and it is earned: the AWS console
|
|
8
|
+
reads that literal spelling to populate the resource-name column, so namespacing
|
|
9
|
+
it would leave the column blank. Everything else — including the environment —
|
|
10
|
+
is a framework fact and carries the namespace. AWS cost allocation groups by any
|
|
11
|
+
activated tag key, so `reventless:environment` is a first-class cost-allocation
|
|
12
|
+
dimension; the bare spelling bought nothing.
|
|
13
|
+
|
|
14
|
+
The three attribution facts are independent and all three are needed to identify
|
|
15
|
+
a resource (see `ResourceAttribution`):
|
|
16
|
+
|
|
17
|
+
- `~kind` — the modelling kind of the owning component (Aggregate, …)
|
|
18
|
+
- `~role` — the deployment piece this resource implements (EventLog, Runtime, …)
|
|
19
|
+
- `~scope` — component / plugin / platform
|
|
20
|
+
|
|
21
|
+
`~plugin` and `~platform` default to the ambient context published by
|
|
22
|
+
`Plugin_Builder` while a plugin is under construction, falling back to the Pulumi
|
|
23
|
+
project name for platform-scope resources built outside any plugin. Note the
|
|
24
|
+
project name is what the framework already calls the *platform* name
|
|
25
|
+
(`Plugin_Builder.Spec.platformName`) — attributing it to `reventless:plugin`, as
|
|
26
|
+
this helper used to, mislabelled every resource.
|
|
27
|
+
|
|
28
|
+
Non-component scopes carry an empty `reventless:component` by definition:
|
|
29
|
+
substrate is attributed to its level, not to a fabricated component.
|
|
30
|
+
*/
|
|
31
|
+
let makeDict = (
|
|
32
|
+
~name: string,
|
|
33
|
+
~kind: ReventlessCore.ComponentType.t,
|
|
34
|
+
~role: Attribution.Role.t,
|
|
35
|
+
~scope: Attribution.Scope.t=Component,
|
|
36
|
+
// The model component stem, when it differs from the resource name
|
|
37
|
+
// ("Products" for a resource named "ProductsQueryDb"). Defaults to `~name`.
|
|
38
|
+
~component: option<string>=?,
|
|
39
|
+
// The model element that owns this resource. Overrides `~kind`, `~component`
|
|
40
|
+
// and `~scope`: the piece adapters pass their own ComponentType as `~kind`,
|
|
41
|
+
// which names the PIECE, so it collapses onto `~role` whenever the owner is
|
|
42
|
+
// unknown. Supplied by the owning builder via `ResourceAttribution.owner` —
|
|
43
|
+
// see docs/plans/done/resource-attribution-owner-kind.md.
|
|
44
|
+
//
|
|
45
|
+
// A plugin is a model element too, so shared substrate (a DcbEventLog, a
|
|
46
|
+
// plugin's DCB command topics, its event collector) is owned by the Plugin
|
|
47
|
+
// rather than by nothing — that is how it gets attributed to the element it
|
|
48
|
+
// actually belongs to. `Plugin`-kinded owners therefore imply plugin scope,
|
|
49
|
+
// where `reventless:plugin` names the owner and `reventless:component` is
|
|
50
|
+
// empty by definition.
|
|
51
|
+
~owner: option<Attribution.owner>=?,
|
|
52
|
+
~plugin: option<string>=?,
|
|
53
|
+
~platform: option<string>=?,
|
|
54
|
+
) => {
|
|
55
|
+
let ambient = Attribution.current.contents
|
|
56
|
+
let projectName = Pulumi.Pulumi.getProjectName()
|
|
57
|
+
|
|
58
|
+
let platform = switch platform {
|
|
59
|
+
| Some(p) => p
|
|
60
|
+
| None => ambient.platform->Option.getOr(projectName)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
let kind = switch owner {
|
|
64
|
+
| Some({kind}) => kind
|
|
65
|
+
| None => kind
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// A Plugin-kinded owner IS the plugin, so the resource is plugin substrate
|
|
69
|
+
// whatever default scope the piece adapter passed.
|
|
70
|
+
let scope = switch owner {
|
|
71
|
+
| Some({kind: Plugin}) => Attribution.Scope.Plugin
|
|
72
|
+
| Some(_) | None => scope
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let plugin = switch scope {
|
|
76
|
+
| Platform => ""
|
|
77
|
+
| Component | Plugin =>
|
|
78
|
+
switch (plugin, owner) {
|
|
79
|
+
| (Some(p), _) => p
|
|
80
|
+
| (None, Some({kind: Plugin, name})) => name
|
|
81
|
+
| (None, _) => ambient.plugin->Option.getOr("")
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
let component = switch scope {
|
|
86
|
+
| Component =>
|
|
87
|
+
switch owner {
|
|
88
|
+
| Some({name}) => name
|
|
89
|
+
| None => component->Option.getOr(name)
|
|
90
|
+
}
|
|
91
|
+
| Plugin | Platform => ""
|
|
92
|
+
}
|
|
93
|
+
|
|
4
94
|
[
|
|
5
95
|
("Name", name),
|
|
6
|
-
("
|
|
7
|
-
("Environment", Pulumi.Pulumi.getStackName()),
|
|
8
|
-
("Plugin", plugin),
|
|
96
|
+
("reventless:platform", platform),
|
|
9
97
|
("reventless:plugin", plugin),
|
|
10
|
-
("reventless:component",
|
|
11
|
-
("reventless:
|
|
12
|
-
("reventless:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
->
|
|
98
|
+
("reventless:component", component),
|
|
99
|
+
("reventless:kind", kind->ReventlessCore.ComponentType.toString),
|
|
100
|
+
("reventless:role", role->Attribution.Role.toString),
|
|
101
|
+
("reventless:scope", scope->Attribution.Scope.toString),
|
|
102
|
+
("reventless:environment", Pulumi.Pulumi.getStackName()),
|
|
103
|
+
]->Dict.fromArray
|
|
16
104
|
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
The same schema as `makeDict`, wrapped as a Pulumi input — what nearly every
|
|
108
|
+
resource's `tags` field expects. Use `makeDict` only for the bindings that take
|
|
109
|
+
raw tags because they post-process them (e.g. `EC2.Vpc`, which supplements a
|
|
110
|
+
`Name` of its own).
|
|
111
|
+
*/
|
|
112
|
+
let make = (
|
|
113
|
+
~name,
|
|
114
|
+
~kind,
|
|
115
|
+
~role,
|
|
116
|
+
~scope=Attribution.Scope.Component,
|
|
117
|
+
~component=?,
|
|
118
|
+
~owner=?,
|
|
119
|
+
~plugin=?,
|
|
120
|
+
~platform=?,
|
|
121
|
+
) =>
|
|
122
|
+
makeDict(
|
|
123
|
+
~name,
|
|
124
|
+
~kind,
|
|
125
|
+
~role,
|
|
126
|
+
~scope,
|
|
127
|
+
~component?,
|
|
128
|
+
~owner?,
|
|
129
|
+
~plugin?,
|
|
130
|
+
~platform?,
|
|
131
|
+
)->Pulumi.Input.make
|
|
@@ -1,48 +1,89 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
+
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
3
4
|
import * as Pulumi from "@pulumi/pulumi";
|
|
4
5
|
import * as ComponentType$ReventlessCore from "@reventlessdev/reventless-core/src/ComponentType.res.mjs";
|
|
6
|
+
import * as ResourceAttribution$ReventlessCore from "@reventlessdev/reventless-core/src/ResourceAttribution.res.mjs";
|
|
5
7
|
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
let
|
|
8
|
+
function makeDict(name, kind, role, scopeOpt, component, owner, plugin, platform) {
|
|
9
|
+
let scope = scopeOpt !== undefined ? scopeOpt : "Component";
|
|
10
|
+
let ambient = ResourceAttribution$ReventlessCore.current.contents;
|
|
11
|
+
let projectName = Pulumi.getProject();
|
|
12
|
+
let platform$1 = platform !== undefined ? platform : Stdlib_Option.getOr(ambient.platform, projectName);
|
|
13
|
+
let kind$1 = owner !== undefined ? owner.kind : kind;
|
|
14
|
+
let scope$1 = owner !== undefined && owner.kind === "Plugin" ? "Plugin" : scope;
|
|
15
|
+
let plugin$1;
|
|
16
|
+
let exit = 0;
|
|
17
|
+
switch (scope$1) {
|
|
18
|
+
case "Component" :
|
|
19
|
+
case "Plugin" :
|
|
20
|
+
exit = 1;
|
|
21
|
+
break;
|
|
22
|
+
case "Platform" :
|
|
23
|
+
plugin$1 = "";
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
if (exit === 1) {
|
|
27
|
+
plugin$1 = plugin !== undefined ? plugin : (
|
|
28
|
+
owner !== undefined && owner.kind === "Plugin" ? owner.name : Stdlib_Option.getOr(ambient.plugin, "")
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
let component$1;
|
|
32
|
+
switch (scope$1) {
|
|
33
|
+
case "Component" :
|
|
34
|
+
component$1 = owner !== undefined ? owner.name : Stdlib_Option.getOr(component, name);
|
|
35
|
+
break;
|
|
36
|
+
case "Plugin" :
|
|
37
|
+
case "Platform" :
|
|
38
|
+
component$1 = "";
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
9
41
|
return Object.fromEntries([
|
|
10
42
|
[
|
|
11
43
|
"Name",
|
|
12
44
|
name
|
|
13
45
|
],
|
|
14
46
|
[
|
|
15
|
-
"
|
|
16
|
-
|
|
47
|
+
"reventless:platform",
|
|
48
|
+
platform$1
|
|
17
49
|
],
|
|
18
50
|
[
|
|
19
|
-
"
|
|
20
|
-
|
|
51
|
+
"reventless:plugin",
|
|
52
|
+
plugin$1
|
|
21
53
|
],
|
|
22
54
|
[
|
|
23
|
-
"
|
|
24
|
-
|
|
55
|
+
"reventless:component",
|
|
56
|
+
component$1
|
|
25
57
|
],
|
|
26
58
|
[
|
|
27
|
-
"reventless:
|
|
28
|
-
|
|
59
|
+
"reventless:kind",
|
|
60
|
+
ComponentType$ReventlessCore.toString(kind$1)
|
|
29
61
|
],
|
|
30
62
|
[
|
|
31
|
-
"reventless:
|
|
32
|
-
|
|
63
|
+
"reventless:role",
|
|
64
|
+
ResourceAttribution$ReventlessCore.Role.toString(role)
|
|
33
65
|
],
|
|
34
66
|
[
|
|
35
|
-
"reventless:
|
|
36
|
-
|
|
67
|
+
"reventless:scope",
|
|
68
|
+
ResourceAttribution$ReventlessCore.Scope.toString(scope$1)
|
|
37
69
|
],
|
|
38
70
|
[
|
|
39
|
-
"reventless:
|
|
40
|
-
|
|
71
|
+
"reventless:environment",
|
|
72
|
+
Pulumi.getStack()
|
|
41
73
|
]
|
|
42
74
|
]);
|
|
43
75
|
}
|
|
44
76
|
|
|
77
|
+
function make(name, kind, role, scopeOpt, component, owner, plugin, platform) {
|
|
78
|
+
let scope = scopeOpt !== undefined ? scopeOpt : "Component";
|
|
79
|
+
return makeDict(name, kind, role, scope, component, owner, plugin, platform);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
let Attribution;
|
|
83
|
+
|
|
45
84
|
export {
|
|
85
|
+
Attribution,
|
|
86
|
+
makeDict,
|
|
46
87
|
make,
|
|
47
88
|
}
|
|
48
89
|
/* @pulumi/pulumi Not a pure module */
|
|
@@ -410,6 +410,31 @@ type constructorProps = {
|
|
|
410
410
|
mergeType: Pulumi.Input.t<string>,
|
|
411
411
|
}
|
|
412
412
|
|
|
413
|
+
/** What is actually handed to `pulumi.dynamic.Resource`. The base constructor
|
|
414
|
+
defines a resource property for every KEY of `props` (it walks
|
|
415
|
+
`Object.keys`), so an output-only field that is not declared here never
|
|
416
|
+
materialises on the resource — `association.associationId` reads a plain
|
|
417
|
+
`undefined` instead of an Output, and `mergeStatusGateWith` then calls
|
|
418
|
+
GetSourceApiAssociation with no id ("No value provided for input HTTP
|
|
419
|
+
label: associationId"). Declaring them `undefined` is Pulumi's documented
|
|
420
|
+
way to register output-only properties; undefined values are dropped from
|
|
421
|
+
the inputs RPC, so `create` still receives only the three real inputs. */
|
|
422
|
+
type resourceProps = {
|
|
423
|
+
mergedApiIdentifier: Pulumi.Input.t<string>,
|
|
424
|
+
sourceApiIdentifier: Pulumi.Input.t<string>,
|
|
425
|
+
mergeType: Pulumi.Input.t<string>,
|
|
426
|
+
arn: Nullable.t<string>,
|
|
427
|
+
associationId: Nullable.t<string>,
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
let resourcePropsOf = (props: constructorProps): resourceProps => {
|
|
431
|
+
mergedApiIdentifier: props.mergedApiIdentifier,
|
|
432
|
+
sourceApiIdentifier: props.sourceApiIdentifier,
|
|
433
|
+
mergeType: props.mergeType,
|
|
434
|
+
arn: Nullable.undefined,
|
|
435
|
+
associationId: Nullable.undefined,
|
|
436
|
+
}
|
|
437
|
+
|
|
413
438
|
// pulumi.dynamic.Resource constructor: (provider, name, props, opts). Explicit
|
|
414
439
|
// /index.js path because @pulumi/pulumi/dynamic is a directory import not
|
|
415
440
|
// resolvable in ESM mode.
|
|
@@ -432,5 +457,5 @@ let make = (
|
|
|
432
457
|
| Some(o) => {...o, aliases: [migrationAlias]}
|
|
433
458
|
| None => {aliases: [migrationAlias]}
|
|
434
459
|
}
|
|
435
|
-
_newResource(provider, name, props, finalOpts)
|
|
460
|
+
_newResource(provider, name, props->resourcePropsOf, finalOpts)
|
|
436
461
|
}
|
|
@@ -295,6 +295,16 @@ let provider = {
|
|
|
295
295
|
read: read_
|
|
296
296
|
};
|
|
297
297
|
|
|
298
|
+
function resourcePropsOf(props) {
|
|
299
|
+
return {
|
|
300
|
+
mergedApiIdentifier: props.mergedApiIdentifier,
|
|
301
|
+
sourceApiIdentifier: props.sourceApiIdentifier,
|
|
302
|
+
mergeType: props.mergeType,
|
|
303
|
+
arn: undefined,
|
|
304
|
+
associationId: undefined
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
|
|
298
308
|
function make(name, props, opts) {
|
|
299
309
|
let migrationAlias = Alias$Pulumi.make(name, "aws:appsync/sourceApiAssociation:SourceApiAssociation", undefined);
|
|
300
310
|
let finalOpts;
|
|
@@ -307,7 +317,7 @@ function make(name, props, opts) {
|
|
|
307
317
|
aliases: [migrationAlias]
|
|
308
318
|
};
|
|
309
319
|
}
|
|
310
|
-
return new IndexJs.Resource(provider, name, props, finalOpts);
|
|
320
|
+
return new IndexJs.Resource(provider, name, resourcePropsOf(props), finalOpts);
|
|
311
321
|
}
|
|
312
322
|
|
|
313
323
|
export {
|
|
@@ -335,6 +345,7 @@ export {
|
|
|
335
345
|
diff_,
|
|
336
346
|
read_,
|
|
337
347
|
provider,
|
|
348
|
+
resourcePropsOf,
|
|
338
349
|
make,
|
|
339
350
|
}
|
|
340
351
|
/* log Not a pure module */
|
|
@@ -114,6 +114,12 @@ let make = (
|
|
|
114
114
|
let lambdaRole = IAM.Role.makeWithDefaultPolicy(
|
|
115
115
|
~name=name ++ "Lambda",
|
|
116
116
|
~servicePrincipal=AWS.Lambda.principal->Pulumi.Output.make,
|
|
117
|
+
~tags=AWS.Tags.make(
|
|
118
|
+
~name=name ++ "Lambda",
|
|
119
|
+
~kind=ReventlessCore.ComponentType.Platform,
|
|
120
|
+
~role=Identity,
|
|
121
|
+
~scope=Platform,
|
|
122
|
+
),
|
|
117
123
|
~opts,
|
|
118
124
|
)
|
|
119
125
|
|
|
@@ -184,7 +190,7 @@ let make = (
|
|
|
184
190
|
memorySize: 512->Pulumi.Input.make,
|
|
185
191
|
timeout: 30->Pulumi.Input.make,
|
|
186
192
|
layers,
|
|
187
|
-
tags: AWS.Tags.make(~name=name ++ "Lambda", ReventlessCore.
|
|
193
|
+
tags: AWS.Tags.make(~name=name ++ "Lambda", ~kind=ReventlessCore.ComponentType.Platform, ~role=Runtime, ~scope=Platform),
|
|
188
194
|
environment: (
|
|
189
195
|
{
|
|
190
196
|
Lambda.Function.variables: Dict.fromArray([
|
|
@@ -202,6 +208,12 @@ let make = (
|
|
|
202
208
|
let dataSourceRole = IAM.Role.makeWithDefaultPolicy(
|
|
203
209
|
~name=name ++ "DataSource",
|
|
204
210
|
~servicePrincipal=AWS.AppSync.principal->Pulumi.Output.make,
|
|
211
|
+
~tags=AWS.Tags.make(
|
|
212
|
+
~name=name ++ "DataSource",
|
|
213
|
+
~kind=ReventlessCore.ComponentType.Platform,
|
|
214
|
+
~role=Identity,
|
|
215
|
+
~scope=Platform,
|
|
216
|
+
),
|
|
205
217
|
~opts,
|
|
206
218
|
)
|
|
207
219
|
|
|
@@ -9,7 +9,6 @@ import * as Lambda$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/Lambda
|
|
|
9
9
|
import * as AWS$ReventlessAws from "../AWS.res.mjs";
|
|
10
10
|
import * as AWS_Tags$ReventlessAws from "../AWS_Tags.res.mjs";
|
|
11
11
|
import * as PolicyDocument$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/IAM/PolicyDocument.res.mjs";
|
|
12
|
-
import * as ReadModel$ReventlessCore from "@reventlessdev/reventless-core/src/components/ReadModel/ReadModel.res.mjs";
|
|
13
12
|
import * as Util_Bundle$ReventlessAws from "../../util/Util_Bundle.res.mjs";
|
|
14
13
|
import * as Util_Pulumi$ReventlessCore from "@reventlessdev/reventless-core/src/util/Util_Pulumi.res.mjs";
|
|
15
14
|
import * as AppSync_Resolver_Native$ReventlessAws from "./AppSync_Resolver_Native.res.mjs";
|
|
@@ -105,7 +104,7 @@ export function response(ctx) {
|
|
|
105
104
|
function make(api, pluginReadModelTableName, opts) {
|
|
106
105
|
let opts$1 = Util_Pulumi$ReventlessCore.ComponentResourceOptions.toCustomResourceOptions(opts);
|
|
107
106
|
let name = "PlatformUIDefinitions";
|
|
108
|
-
let lambdaRole = IAM$PulumiAws.Role.makeWithDefaultPolicy(name + "Lambda", Pulumi.output(AWS$ReventlessAws.Lambda.principal), opts$1);
|
|
107
|
+
let lambdaRole = IAM$PulumiAws.Role.makeWithDefaultPolicy(name + "Lambda", Pulumi.output(AWS$ReventlessAws.Lambda.principal), AWS_Tags$ReventlessAws.make(name + "Lambda", "Platform", "Identity", "Platform", undefined, undefined, undefined, undefined), opts$1);
|
|
109
108
|
pluginReadModelTableName.apply(tableName => {
|
|
110
109
|
new (Aws.iam.RolePolicy)(name + "LambdaPolicy", {
|
|
111
110
|
policy: PolicyDocument$PulumiAws.toJsonString(PolicyDocument$PulumiAws.make(undefined, name + "LambdaPolicy", [
|
|
@@ -141,7 +140,7 @@ function make(api, pluginReadModelTableName, opts) {
|
|
|
141
140
|
memorySize: 512,
|
|
142
141
|
timeout: 30,
|
|
143
142
|
layers: layers,
|
|
144
|
-
tags: AWS_Tags$ReventlessAws.make(name + "Lambda",
|
|
143
|
+
tags: AWS_Tags$ReventlessAws.make(name + "Lambda", "Platform", "Runtime", "Platform", undefined, undefined, undefined, undefined),
|
|
145
144
|
environment: {
|
|
146
145
|
variables: Object.fromEntries([
|
|
147
146
|
[
|
|
@@ -164,7 +163,7 @@ function make(api, pluginReadModelTableName, opts) {
|
|
|
164
163
|
},
|
|
165
164
|
sourceCodeHash: sourceCodeHash
|
|
166
165
|
}, opts$1);
|
|
167
|
-
let dataSourceRole = IAM$PulumiAws.Role.makeWithDefaultPolicy(name + "DataSource", Pulumi.output(AWS$ReventlessAws.AppSync.principal), opts$1);
|
|
166
|
+
let dataSourceRole = IAM$PulumiAws.Role.makeWithDefaultPolicy(name + "DataSource", Pulumi.output(AWS$ReventlessAws.AppSync.principal), AWS_Tags$ReventlessAws.make(name + "DataSource", "Platform", "Identity", "Platform", undefined, undefined, undefined, undefined), opts$1);
|
|
168
167
|
Pulumi.all([
|
|
169
168
|
lambda.arn,
|
|
170
169
|
dataSourceRole.id
|
|
@@ -103,6 +103,12 @@ let make = (
|
|
|
103
103
|
let lambdaRole = IAM.Role.makeWithDefaultPolicy(
|
|
104
104
|
~name=name ++ "Lambda",
|
|
105
105
|
~servicePrincipal=AWS.Lambda.principal->Pulumi.Output.make,
|
|
106
|
+
~tags=AWS.Tags.make(
|
|
107
|
+
~name=name ++ "Lambda",
|
|
108
|
+
~kind=ReventlessCore.ComponentType.Platform,
|
|
109
|
+
~role=Identity,
|
|
110
|
+
~scope=Platform,
|
|
111
|
+
),
|
|
106
112
|
~opts,
|
|
107
113
|
)
|
|
108
114
|
|
|
@@ -167,7 +173,7 @@ let make = (
|
|
|
167
173
|
memorySize: 512->Pulumi.Input.make,
|
|
168
174
|
timeout: 30->Pulumi.Input.make,
|
|
169
175
|
layers,
|
|
170
|
-
tags: AWS.Tags.make(~name=name ++ "Lambda", ReventlessCore.
|
|
176
|
+
tags: AWS.Tags.make(~name=name ++ "Lambda", ~kind=ReventlessCore.ComponentType.Platform, ~role=Runtime, ~scope=Platform),
|
|
171
177
|
environment: (
|
|
172
178
|
{
|
|
173
179
|
Lambda.Function.variables: Dict.fromArray([
|
|
@@ -185,6 +191,12 @@ let make = (
|
|
|
185
191
|
let dataSourceRole = IAM.Role.makeWithDefaultPolicy(
|
|
186
192
|
~name=name ++ "DataSource",
|
|
187
193
|
~servicePrincipal=AWS.AppSync.principal->Pulumi.Output.make,
|
|
194
|
+
~tags=AWS.Tags.make(
|
|
195
|
+
~name=name ++ "DataSource",
|
|
196
|
+
~kind=ReventlessCore.ComponentType.Platform,
|
|
197
|
+
~role=Identity,
|
|
198
|
+
~scope=Platform,
|
|
199
|
+
),
|
|
188
200
|
~opts,
|
|
189
201
|
)
|
|
190
202
|
|
|
@@ -9,7 +9,6 @@ import * as Lambda$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/Lambda
|
|
|
9
9
|
import * as AWS$ReventlessAws from "../AWS.res.mjs";
|
|
10
10
|
import * as AWS_Tags$ReventlessAws from "../AWS_Tags.res.mjs";
|
|
11
11
|
import * as PolicyDocument$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/IAM/PolicyDocument.res.mjs";
|
|
12
|
-
import * as ReadModel$ReventlessCore from "@reventlessdev/reventless-core/src/components/ReadModel/ReadModel.res.mjs";
|
|
13
12
|
import * as Util_Bundle$ReventlessAws from "../../util/Util_Bundle.res.mjs";
|
|
14
13
|
import * as Util_Pulumi$ReventlessCore from "@reventlessdev/reventless-core/src/util/Util_Pulumi.res.mjs";
|
|
15
14
|
import * as AppSync_Resolver_Native$ReventlessAws from "./AppSync_Resolver_Native.res.mjs";
|
|
@@ -97,7 +96,7 @@ export function response(ctx) {
|
|
|
97
96
|
function make(api, uiFragmentRegistryTableName, schemaReady, opts) {
|
|
98
97
|
let opts$1 = Util_Pulumi$ReventlessCore.ComponentResourceOptions.toCustomResourceOptions(opts);
|
|
99
98
|
let name = "PlatformUIFragments";
|
|
100
|
-
let lambdaRole = IAM$PulumiAws.Role.makeWithDefaultPolicy(name + "Lambda", Pulumi.output(AWS$ReventlessAws.Lambda.principal), opts$1);
|
|
99
|
+
let lambdaRole = IAM$PulumiAws.Role.makeWithDefaultPolicy(name + "Lambda", Pulumi.output(AWS$ReventlessAws.Lambda.principal), AWS_Tags$ReventlessAws.make(name + "Lambda", "Platform", "Identity", "Platform", undefined, undefined, undefined, undefined), opts$1);
|
|
101
100
|
uiFragmentRegistryTableName.apply(tableName => {
|
|
102
101
|
new (Aws.iam.RolePolicy)(name + "LambdaPolicy", {
|
|
103
102
|
policy: PolicyDocument$PulumiAws.toJsonString(PolicyDocument$PulumiAws.make(undefined, name + "LambdaPolicy", [
|
|
@@ -197,7 +196,7 @@ export async function handler() {
|
|
|
197
196
|
memorySize: 512,
|
|
198
197
|
timeout: 30,
|
|
199
198
|
layers: layers,
|
|
200
|
-
tags: AWS_Tags$ReventlessAws.make(name + "Lambda",
|
|
199
|
+
tags: AWS_Tags$ReventlessAws.make(name + "Lambda", "Platform", "Runtime", "Platform", undefined, undefined, undefined, undefined),
|
|
201
200
|
environment: {
|
|
202
201
|
variables: Object.fromEntries([
|
|
203
202
|
[
|
|
@@ -220,7 +219,7 @@ export async function handler() {
|
|
|
220
219
|
},
|
|
221
220
|
sourceCodeHash: sourceCodeHash
|
|
222
221
|
}, opts$1);
|
|
223
|
-
let dataSourceRole = IAM$PulumiAws.Role.makeWithDefaultPolicy(name + "DataSource", Pulumi.output(AWS$ReventlessAws.AppSync.principal), opts$1);
|
|
222
|
+
let dataSourceRole = IAM$PulumiAws.Role.makeWithDefaultPolicy(name + "DataSource", Pulumi.output(AWS$ReventlessAws.AppSync.principal), AWS_Tags$ReventlessAws.make(name + "DataSource", "Platform", "Identity", "Platform", undefined, undefined, undefined, undefined), opts$1);
|
|
224
223
|
Pulumi.all([
|
|
225
224
|
lambda.arn,
|
|
226
225
|
dataSourceRole.id
|
|
@@ -21,6 +21,12 @@ let make: ReventlessCore.CommandGenerator_Adapter.resolversMaker<api, Util.Lambd
|
|
|
21
21
|
let dataSourceRole = PulumiAws.IAM.Role.makeWithDefaultPolicy(
|
|
22
22
|
~name=name ++ "DataSource",
|
|
23
23
|
~servicePrincipal=AWS.AppSync.principal->Pulumi.Output.make,
|
|
24
|
+
~tags=AWS.Tags.make(
|
|
25
|
+
~name=name ++ "DataSource",
|
|
26
|
+
~kind=ReventlessCore.CommandGenerator.componentType,
|
|
27
|
+
~role=Identity,
|
|
28
|
+
~component=name,
|
|
29
|
+
),
|
|
24
30
|
~opts,
|
|
25
31
|
)
|
|
26
32
|
|
|
@@ -198,6 +204,12 @@ let makeDcb = (
|
|
|
198
204
|
let dataSourceRole = PulumiAws.IAM.Role.makeWithDefaultPolicy(
|
|
199
205
|
~name="DcbMutationDS",
|
|
200
206
|
~servicePrincipal=AWS.AppSync.principal->Pulumi.Output.make,
|
|
207
|
+
~tags=AWS.Tags.make(
|
|
208
|
+
~name="DcbMutationDS",
|
|
209
|
+
~kind=ReventlessCore.ComponentType.Plugin,
|
|
210
|
+
~role=Identity,
|
|
211
|
+
~scope=Plugin,
|
|
212
|
+
),
|
|
201
213
|
~opts,
|
|
202
214
|
)
|
|
203
215
|
|
|
@@ -9,12 +9,14 @@ import * as Stdlib_String from "@rescript/runtime/lib/es6/Stdlib_String.js";
|
|
|
9
9
|
import * as Pulumi from "@pulumi/pulumi";
|
|
10
10
|
import * as Lambda$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/Lambda/Lambda.res.mjs";
|
|
11
11
|
import * as AWS$ReventlessAws from "../AWS.res.mjs";
|
|
12
|
+
import * as AWS_Tags$ReventlessAws from "../AWS_Tags.res.mjs";
|
|
12
13
|
import * as Adapter$ReventlessCore from "@reventlessdev/reventless-core/src/adapter/Adapter.res.mjs";
|
|
13
14
|
import * as PolicyDocument$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/IAM/PolicyDocument.res.mjs";
|
|
14
15
|
import * as Api_Naming$ReventlessCore from "@reventlessdev/reventless-core/src/components/Api/Api_Naming.res.mjs";
|
|
15
16
|
import * as Util_AppSync$ReventlessAws from "../../util/Util_AppSync.res.mjs";
|
|
16
17
|
import * as Util_Pulumi$ReventlessCore from "@reventlessdev/reventless-core/src/util/Util_Pulumi.res.mjs";
|
|
17
18
|
import * as Util_Adapter$ReventlessCore from "@reventlessdev/reventless-core/src/util/Util_Adapter.res.mjs";
|
|
19
|
+
import * as CommandGenerator$ReventlessCore from "@reventlessdev/reventless-core/src/components/CommandGenerator/CommandGenerator.res.mjs";
|
|
18
20
|
import * as AppSync_Resolver_Functions$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/AppSync/AppSync_Resolver_Functions.res.mjs";
|
|
19
21
|
import * as AppSync_Resolver_Retrying$ReventlessAws from "../Api/AppSync_Resolver_Retrying.res.mjs";
|
|
20
22
|
import * as CommandSubscriptionResolvers_AppSync$ReventlessAws from "../Api/CommandSubscriptionResolvers_AppSync.res.mjs";
|
|
@@ -27,7 +29,7 @@ function make(name, api, fields, param, runtime, resources, opts) {
|
|
|
27
29
|
let opts$1 = Util_Pulumi$ReventlessCore.ComponentResourceOptions.toCustomResourceOptions(opts);
|
|
28
30
|
let lambda = runtime.parts.lambda;
|
|
29
31
|
let lambdaRole = runtime.parts.lambdaRole;
|
|
30
|
-
let dataSourceRole = IAM$PulumiAws.Role.makeWithDefaultPolicy(name + "DataSource", Pulumi.output(AWS$ReventlessAws.AppSync.principal), opts$1);
|
|
32
|
+
let dataSourceRole = IAM$PulumiAws.Role.makeWithDefaultPolicy(name + "DataSource", Pulumi.output(AWS$ReventlessAws.AppSync.principal), AWS_Tags$ReventlessAws.make(name + "DataSource", CommandGenerator$ReventlessCore.componentType, "Identity", undefined, name, undefined, undefined, undefined), opts$1);
|
|
31
33
|
Pulumi.all([
|
|
32
34
|
Output$Pulumi.flatMap(lambda, lambda => lambda.arn),
|
|
33
35
|
Output$Pulumi.flatMap(lambda, lambda => lambda.name),
|
|
@@ -91,7 +93,7 @@ function makeDcb(api, runtime, fieldNames, tags, onAdminApiOpt, opts) {
|
|
|
91
93
|
let onAdminApi = onAdminApiOpt !== undefined ? onAdminApiOpt : false;
|
|
92
94
|
let opts$1 = Util_Pulumi$ReventlessCore.ComponentResourceOptions.toCustomResourceOptions(opts);
|
|
93
95
|
let lambda = runtime.parts.lambda;
|
|
94
|
-
let dataSourceRole = IAM$PulumiAws.Role.makeWithDefaultPolicy("DcbMutationDS", Pulumi.output(AWS$ReventlessAws.AppSync.principal), opts$1);
|
|
96
|
+
let dataSourceRole = IAM$PulumiAws.Role.makeWithDefaultPolicy("DcbMutationDS", Pulumi.output(AWS$ReventlessAws.AppSync.principal), AWS_Tags$ReventlessAws.make("DcbMutationDS", "Plugin", "Identity", "Plugin", undefined, undefined, undefined, undefined), opts$1);
|
|
95
97
|
Pulumi.all([
|
|
96
98
|
Output$Pulumi.flatMap(lambda, lambda => lambda.arn),
|
|
97
99
|
dataSourceRole.id
|
|
@@ -21,6 +21,12 @@ let make = (
|
|
|
21
21
|
let dataSourceRole = PulumiAws.IAM.Role.makeWithDefaultPolicy(
|
|
22
22
|
~name="InboundTranslationDS",
|
|
23
23
|
~servicePrincipal=AWS.AppSync.principal->Pulumi.Output.make,
|
|
24
|
+
~tags=AWS.Tags.make(
|
|
25
|
+
~name="InboundTranslationDS",
|
|
26
|
+
~kind=ReventlessCore.ComponentType.Plugin,
|
|
27
|
+
~role=Identity,
|
|
28
|
+
~scope=Plugin,
|
|
29
|
+
),
|
|
24
30
|
~opts,
|
|
25
31
|
)
|
|
26
32
|
|