@reventlessdev/rescript-pulumi-aws 2.4.0-alpha.49 → 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 +15 -0
- package/README.md +28 -12
- package/package.json +3 -3
- package/src/AppSync/AppSync.res +1 -0
- package/src/AppSync/AppSync.res.mjs +3 -0
- package/src/AppSync/AppSync_GraphQLApi.res +11 -0
- package/src/AppSync/AppSync_SourceApiAssociation.res +42 -0
- package/src/AppSync/AppSync_SourceApiAssociation.res.mjs +2 -0
- package/src/example/MergedApiExample.res +62 -0
- package/src/example/MergedApiExample.res.mjs +51 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
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
|
+
|
|
13
|
+
# 2.4.0-alpha.50 (2026-07-11)
|
|
14
|
+
|
|
15
|
+
**Note:** Version bump only for package @reventlessdev/rescript-pulumi-aws
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
# 2.4.0-alpha.49 (2026-07-11)
|
|
7
22
|
|
|
8
23
|
### Features
|
package/README.md
CHANGED
|
@@ -1,19 +1,35 @@
|
|
|
1
|
-
[](https://www.npmjs.com/package/@reventlessdev/rescript-pulumi-aws)
|
|
2
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
3
|
+
[](https://docs.reventless.dev)
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# @reventlessdev/rescript-pulumi-aws
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
> ⚠️ **Alpha.** APIs can change without notice between releases.
|
|
8
|
+
> Pin exact versions and expect breaking changes.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- Add `rescript-pulumi-aws` to your dependencies in `rescript.json`.
|
|
13
|
-
- For general information see this monorepo's [readme](../../README.md)
|
|
10
|
+
ReScript bindings for [@pulumi/aws](https://github.com/pulumi/pulumi-aws/tree/master/sdk/nodejs).
|
|
11
|
+
Also see [official documentation](https://www.pulumi.com/registry/packages/aws/api-docs/).
|
|
14
12
|
|
|
15
|
-
##
|
|
13
|
+
## Install
|
|
16
14
|
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add @reventlessdev/rescript-pulumi-aws
|
|
17
17
|
```
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
Add it to your `rescript.json` dependencies:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"dependencies": ["@reventlessdev/rescript-pulumi-aws"]
|
|
24
|
+
}
|
|
19
25
|
```
|
|
26
|
+
|
|
27
|
+
## Links
|
|
28
|
+
|
|
29
|
+
- 📚 Documentation — [docs.reventless.dev](https://docs.reventless.dev)
|
|
30
|
+
- 📦 Repository — [ReventlessDev/reventless-core](https://github.com/ReventlessDev/reventless-core)
|
|
31
|
+
- 📋 [Changelog](./CHANGELOG.md)
|
|
32
|
+
|
|
33
|
+
## License
|
|
34
|
+
|
|
35
|
+
[Apache-2.0](https://opensource.org/licenses/Apache-2.0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/rescript-pulumi-aws",
|
|
3
|
-
"version": "2.4.0-alpha.
|
|
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-
|
|
26
|
-
"@reventlessdev/rescript-
|
|
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",
|
package/src/AppSync/AppSync.res
CHANGED
|
@@ -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,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 */
|