@reventlessdev/rescript-pulumi-aws 2.4.0-alpha.50 → 2.4.0-alpha.51

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 CHANGED
@@ -3,6 +3,13 @@
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
+ # 2.4.0-alpha.51 (2026-07-14)
7
+
8
+ ### Features
9
+
10
+ * **pulumi-aws:** AppSync Merged API bindings (apiType, mergedApiExecutionRoleArn, SourceApiAssociation) ([f020e87](https://github.com/ReventlessDev/reventless-core/commit/f020e871fdd1f5ae3a0395eb73bc24589139e40e))
11
+
12
+
6
13
  # 2.4.0-alpha.50 (2026-07-11)
7
14
 
8
15
  **Note:** Version bump only for package @reventlessdev/rescript-pulumi-aws
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/rescript-pulumi-aws",
3
- "version": "2.4.0-alpha.50",
3
+ "version": "2.4.0-alpha.51",
4
4
  "description": "ReScript bindings for @pulumi/aws",
5
5
  "license": "Apache-2.0",
6
6
  "jest": {
@@ -22,8 +22,8 @@
22
22
  "@pulumi/aws": "~7.19.0",
23
23
  "@pulumi/aws-native": "^1.62.0",
24
24
  "sury": "11.0.0-alpha.4",
25
- "@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.21",
26
- "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.15"
25
+ "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.15",
26
+ "@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.21"
27
27
  },
28
28
  "devDependencies": {
29
29
  "esbuild": "^0.25.12",
@@ -5,3 +5,4 @@ module GraphQLApi = AppSync_GraphQLApi
5
5
  module DataSource = AppSync_DataSource
6
6
  module Function = AppSync_Function
7
7
  module Resolver = AppSync_Resolver
8
+ module SourceApiAssociation = AppSync_SourceApiAssociation
@@ -9,10 +9,13 @@ let $$Function;
9
9
 
10
10
  let Resolver;
11
11
 
12
+ let SourceApiAssociation;
13
+
12
14
  export {
13
15
  GraphQLApi,
14
16
  DataSource,
15
17
  $$Function,
16
18
  Resolver,
19
+ SourceApiAssociation,
17
20
  }
18
21
  /* No side effect */
@@ -25,6 +25,15 @@ type authenticationType =
25
25
  | AMAZON_COGNITO_USER_POOLS
26
26
  | OPENID_CONNECT
27
27
 
28
+ /** `MERGED` turns the API into an AppSync Merged API: it carries no schema of
29
+ its own — source APIs contribute theirs via `AppSync.SourceApiAssociation`
30
+ and AWS composes the merged endpoint. Requires `mergedApiExecutionRoleArn`
31
+ (`appsync:SourceGraphQL` on the associated source APIs; also
32
+ `appsync:StartSchemaMerge` when associations use `MANUAL_MERGE`). */
33
+ type apiType =
34
+ | GRAPHQL
35
+ | MERGED
36
+
28
37
  /** Entry of the `additionalAuthenticationProviders` array — minimal shape
29
38
  covering the IAM and Cognito cases used by the Reventless platform.
30
39
  Extend with `openidConnectConfig` / `lambdaAuthorizerConfig` if needed. */
@@ -41,6 +50,8 @@ type args = {
41
50
  additionalAuthenticationProviders?: Pulumi.Input.t<
42
51
  array<Pulumi.Input.t<additionalAuthenticationProvider>>,
43
52
  >,
53
+ apiType?: Pulumi.Input.t<apiType>,
54
+ mergedApiExecutionRoleArn?: Pulumi.Input.t<string>,
44
55
  }
45
56
 
46
57
  @module("@pulumi/aws") @scope("appsync") @new
@@ -0,0 +1,42 @@
1
+ /** @pulumi/aws/appsync/SourceApiAssociation
2
+ see: https://www.pulumi.com/registry/packages/aws/api-docs/appsync/sourceapiassociation
3
+
4
+ Links a source `GraphQLApi` to a Merged API (`apiType: MERGED`). Creation
5
+ triggers the initial schema merge; under `AUTO_MERGE` AWS re-merges on every
6
+ source-API schema change (no further calls). AWS serializes association
7
+ writes per merged API — concurrent creates against one merged API fail with
8
+ 409 `ConcurrentModificationException`, so first-time associations from
9
+ parallel stacks need retry-with-backoff (steady-state schema updates are
10
+ unaffected).
11
+ */
12
+ type t = {
13
+ id: Pulumi.Output.t<string>,
14
+ arn: Pulumi.Output.t<string>,
15
+ associationId: Pulumi.Output.t<string>,
16
+ }
17
+ type sourceApiAssociation = t
18
+
19
+ type mergeType =
20
+ | AUTO_MERGE
21
+ | MANUAL_MERGE
22
+
23
+ type sourceApiAssociationConfig = {mergeType: Pulumi.Input.t<mergeType>}
24
+
25
+ /** Identify each side by id or ARN (exactly one per side). */
26
+ type args = {
27
+ mergedApiId?: Pulumi.Input.t<string>,
28
+ mergedApiArn?: Pulumi.Input.t<string>,
29
+ sourceApiId?: Pulumi.Input.t<string>,
30
+ sourceApiArn?: Pulumi.Input.t<string>,
31
+ sourceApiAssociationConfigs?: Pulumi.Input.t<
32
+ array<Pulumi.Input.t<sourceApiAssociationConfig>>,
33
+ >,
34
+ description?: Pulumi.Input.t<string>,
35
+ }
36
+
37
+ @module("@pulumi/aws") @scope("appsync") @new
38
+ external make: (
39
+ ~name: string,
40
+ ~args: args=?,
41
+ ~opts: option<Pulumi.CustomResourceOptions.t>=?,
42
+ ) => sourceApiAssociation = "SourceApiAssociation"
@@ -0,0 +1,2 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+ /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
@@ -0,0 +1,62 @@
1
+ // Compile-only smoke for the Merged-API bindings: a MERGED GraphQLApi, a
2
+ // GRAPHQL source API with a declarative inline schema, and the
3
+ // SourceApiAssociation linking them under AUTO_MERGE. Not executed at deploy
4
+ // time — it keeps the three binding surfaces type-checked together.
5
+ // Validated on real AWS by the Phase-0 spike of
6
+ // docs/plans/merged-api-push-free-composition.md.
7
+
8
+ let mergedExecRole = IAM.Role.make(
9
+ ~name="example-merged-exec-role",
10
+ ~args={
11
+ assumeRolePolicy: Pulumi.Input.make(
12
+ `{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"appsync.amazonaws.com"},"Action":"sts:AssumeRole"}]}`,
13
+ ),
14
+ },
15
+ )
16
+
17
+ let iamSecondaryAuth: AppSync.GraphQLApi.additionalAuthenticationProvider = {
18
+ authenticationType: Pulumi.Input.make(AppSync.GraphQLApi.AWS_IAM),
19
+ }
20
+
21
+ let mergedApi = AppSync.GraphQLApi.make(
22
+ ~name="example-domain-merged",
23
+ ~args={
24
+ authenticationType: Pulumi.Input.make(AppSync.GraphQLApi.AMAZON_COGNITO_USER_POOLS),
25
+ userPoolConfig: Pulumi.Input.make({
26
+ AppSync.GraphQLApi.userPoolId: "eu-west-1_example",
27
+ defaultAction: AppSync.GraphQLApi.ALLOW,
28
+ }),
29
+ additionalAuthenticationProviders: Pulumi.Input.make([Pulumi.Input.make(iamSecondaryAuth)]),
30
+ apiType: Pulumi.Input.make(AppSync.GraphQLApi.MERGED),
31
+ mergedApiExecutionRoleArn: mergedExecRole.arn->Pulumi.Output.asInput,
32
+ },
33
+ )
34
+
35
+ let sourceApi = AppSync.GraphQLApi.make(
36
+ ~name="example-plugin-source",
37
+ ~args={
38
+ authenticationType: Pulumi.Input.make(AppSync.GraphQLApi.AMAZON_COGNITO_USER_POOLS),
39
+ userPoolConfig: Pulumi.Input.make({
40
+ AppSync.GraphQLApi.userPoolId: "eu-west-1_example",
41
+ defaultAction: AppSync.GraphQLApi.ALLOW,
42
+ }),
43
+ schema: Pulumi.Input.make(`schema { query: Query }\ntype Query { ping: String }`),
44
+ },
45
+ )
46
+
47
+ let association = AppSync.SourceApiAssociation.make(
48
+ ~name="example-source-association",
49
+ ~args={
50
+ mergedApiId: mergedApi.id->Pulumi.Output.asInput,
51
+ sourceApiId: sourceApi.id->Pulumi.Output.asInput,
52
+ sourceApiAssociationConfigs: Pulumi.Input.make([
53
+ Pulumi.Input.make({
54
+ AppSync.SourceApiAssociation.mergeType: Pulumi.Input.make(
55
+ AppSync.SourceApiAssociation.AUTO_MERGE,
56
+ ),
57
+ }),
58
+ ]),
59
+ },
60
+ )
61
+
62
+ let associationId = association.associationId
@@ -0,0 +1,51 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Aws from "@pulumi/aws";
4
+
5
+ let mergedExecRole = new (Aws.iam.Role)("example-merged-exec-role", {
6
+ assumeRolePolicy: `{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"appsync.amazonaws.com"},"Action":"sts:AssumeRole"}]}`
7
+ });
8
+
9
+ let iamSecondaryAuth = {
10
+ authenticationType: "AWS_IAM"
11
+ };
12
+
13
+ let mergedApi = new (Aws.appsync.GraphQLApi)("example-domain-merged", {
14
+ authenticationType: "AMAZON_COGNITO_USER_POOLS",
15
+ userPoolConfig: {
16
+ userPoolId: "eu-west-1_example",
17
+ defaultAction: "ALLOW"
18
+ },
19
+ additionalAuthenticationProviders: [iamSecondaryAuth],
20
+ apiType: "MERGED",
21
+ mergedApiExecutionRoleArn: mergedExecRole.arn
22
+ });
23
+
24
+ let sourceApi = new (Aws.appsync.GraphQLApi)("example-plugin-source", {
25
+ authenticationType: "AMAZON_COGNITO_USER_POOLS",
26
+ schema: `schema { query: Query }\ntype Query { ping: String }`,
27
+ userPoolConfig: {
28
+ userPoolId: "eu-west-1_example",
29
+ defaultAction: "ALLOW"
30
+ }
31
+ });
32
+
33
+ let association = new (Aws.appsync.SourceApiAssociation)("example-source-association", {
34
+ mergedApiId: mergedApi.id,
35
+ sourceApiId: sourceApi.id,
36
+ sourceApiAssociationConfigs: [{
37
+ mergeType: "AUTO_MERGE"
38
+ }]
39
+ });
40
+
41
+ let associationId = association.associationId;
42
+
43
+ export {
44
+ mergedExecRole,
45
+ iamSecondaryAuth,
46
+ mergedApi,
47
+ sourceApi,
48
+ association,
49
+ associationId,
50
+ }
51
+ /* mergedExecRole Not a pure module */