From 6dae67f4318cdd8c34c0a6660c26de5eb4c436bf Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Mon, 12 Feb 2024 00:45:21 +0900 Subject: [PATCH 1/5] fix(appsync): source api association does not depend on schema --- ...efaultTestDeployAssert018781F2.assets.json | 2 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 6 +- .../stack.assets.json | 6 +- .../stack.template.json | 10 +- .../tree.json | 132 +++++++------- ...efaultTestDeployAssert018781F2.assets.json | 2 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 6 +- .../stack.assets.json | 6 +- .../stack.template.json | 10 +- .../tree.json | 132 +++++++------- .../Stack.assets.json | 6 +- .../Stack.template.json | 10 +- ...efaultTestDeployAssert018781F2.assets.json | 2 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 6 +- .../tree.json | 172 +++++++++--------- .../aws-cdk-lib/aws-appsync/lib/graphqlapi.ts | 4 + .../aws-appsync/lib/source-api-association.ts | 5 + .../test/appsync-merged-api.test.ts | 35 ++++ .../appsync-source-api-association.test.ts | 45 ++++- 25 files changed, 360 insertions(+), 249 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json index 017cff874641f..8202fda5ae125 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/cdk.out index 2313ab5436501..1f0068d32659a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"34.0.0"} \ No newline at end of file +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/integ.json index 087c643f2d4b9..1c3707aa5a091 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "testCases": { "api/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/manifest.json index 98c8121fe9fdb..aeaf93ce94226 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "artifacts": { "stack.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "stack.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/56930136ed109a6e2bbab108d97daf7201ee4fd652cff93f20eb31cd855e4e47.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a5c906d1dab7827f859e706709c2050af344cd28a2bbf8c18e2aac215be6f351.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -145,6 +146,7 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "apiDefaultTestDeployAssert018781F2.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/stack.assets.json index 229acf488872a..262b4575d15b1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/stack.assets.json @@ -1,7 +1,7 @@ { - "version": "34.0.0", + "version": "36.0.0", "files": { - "56930136ed109a6e2bbab108d97daf7201ee4fd652cff93f20eb31cd855e4e47": { + "a5c906d1dab7827f859e706709c2050af344cd28a2bbf8c18e2aac215be6f351": { "source": { "path": "stack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "56930136ed109a6e2bbab108d97daf7201ee4fd652cff93f20eb31cd855e4e47.json", + "objectKey": "a5c906d1dab7827f859e706709c2050af344cd28a2bbf8c18e2aac215be6f351.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/stack.template.json index 68e5010a4ad4e..82503ddca6a0b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/stack.template.json @@ -213,7 +213,10 @@ "Arn" ] } - } + }, + "DependsOn": [ + "FirstSourceAPISchemaF2FDB692" + ] }, "MergedAPISecondSourceAPIAssociationBD1A08F4": { "Type": "AWS::AppSync::SourceApiAssociation", @@ -233,7 +236,10 @@ "Arn" ] } - } + }, + "DependsOn": [ + "SecondSourceAPISchema65B7401E" + ] }, "MergedAPIDefaultApiKeyAF5EA13C": { "Type": "AWS::AppSync::ApiKey", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/tree.json index 811941f6365b2..4517919c53be3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api-arn-flag-enabled.js.snapshot/tree.json @@ -23,8 +23,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Schema": { @@ -43,8 +43,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLSchema", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultApiKey": { @@ -62,16 +62,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LogGroup": { "id": "LogGroup", "path": "stack/FirstSourceAPI/LogGroup", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "FirstSourceDS": { @@ -95,20 +95,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.NoneDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecondSourceAPI": { @@ -126,8 +126,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Schema": { @@ -146,8 +146,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLSchema", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultApiKey": { @@ -165,16 +165,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LogGroup": { "id": "LogGroup", "path": "stack/SecondSourceAPI/LogGroup", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecondSourceDS": { @@ -198,20 +198,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.NoneDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "MergedAPI": { @@ -226,8 +226,8 @@ "id": "ImportMergedApiExecutionRole", "path": "stack/MergedAPI/MergedApiExecutionRole/ImportMergedApiExecutionRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -251,8 +251,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultPolicy": { @@ -335,20 +335,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -369,8 +369,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "FirstSourceAPIAssociation": { @@ -397,8 +397,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnSourceApiAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecondSourceAPIAssociation": { @@ -425,8 +425,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnSourceApiAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultApiKey": { @@ -444,44 +444,44 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LogGroup": { "id": "LogGroup", "path": "stack/MergedAPI/LogGroup", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "stack/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "stack/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "api": { @@ -497,7 +497,7 @@ "path": "api/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.3.0" } }, "DeployAssert": { @@ -508,22 +508,22 @@ "id": "BootstrapVersion", "path": "api/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "api/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, @@ -543,13 +543,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json index 017cff874641f..8202fda5ae125 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/cdk.out index 2313ab5436501..1f0068d32659a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"34.0.0"} \ No newline at end of file +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/integ.json index 087c643f2d4b9..1c3707aa5a091 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "testCases": { "api/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/manifest.json index dde625a443dda..07aa89e3c8672 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "artifacts": { "stack.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "stack.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c7f75afe322325fc4ced34825c95ad7229c5bd2157dba5f20c58aac8b6cd9c89.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/aa93e678c8263f84fb132afd59530767cdcf0d4582fe905309560a245e17ada6.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -145,6 +146,7 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "apiDefaultTestDeployAssert018781F2.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/stack.assets.json index 9e8f1988fb0c1..855dd05d11f6f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/stack.assets.json @@ -1,7 +1,7 @@ { - "version": "34.0.0", + "version": "36.0.0", "files": { - "c7f75afe322325fc4ced34825c95ad7229c5bd2157dba5f20c58aac8b6cd9c89": { + "aa93e678c8263f84fb132afd59530767cdcf0d4582fe905309560a245e17ada6": { "source": { "path": "stack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c7f75afe322325fc4ced34825c95ad7229c5bd2157dba5f20c58aac8b6cd9c89.json", + "objectKey": "aa93e678c8263f84fb132afd59530767cdcf0d4582fe905309560a245e17ada6.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/stack.template.json index 960ddd398e029..3142cfb6beb81 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/stack.template.json @@ -213,7 +213,10 @@ "ApiId" ] } - } + }, + "DependsOn": [ + "FirstSourceAPISchemaF2FDB692" + ] }, "MergedAPISecondSourceAPIAssociationBD1A08F4": { "Type": "AWS::AppSync::SourceApiAssociation", @@ -233,7 +236,10 @@ "ApiId" ] } - } + }, + "DependsOn": [ + "SecondSourceAPISchema65B7401E" + ] }, "MergedAPIDefaultApiKeyAF5EA13C": { "Type": "AWS::AppSync::ApiKey", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/tree.json index bd39d059830ee..d50ef5f4a67c0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-merged-api.js.snapshot/tree.json @@ -23,8 +23,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Schema": { @@ -43,8 +43,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLSchema", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultApiKey": { @@ -62,16 +62,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LogGroup": { "id": "LogGroup", "path": "stack/FirstSourceAPI/LogGroup", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "FirstSourceDS": { @@ -95,20 +95,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.NoneDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecondSourceAPI": { @@ -126,8 +126,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Schema": { @@ -146,8 +146,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLSchema", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultApiKey": { @@ -165,16 +165,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LogGroup": { "id": "LogGroup", "path": "stack/SecondSourceAPI/LogGroup", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecondSourceDS": { @@ -198,20 +198,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.NoneDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "MergedAPI": { @@ -226,8 +226,8 @@ "id": "ImportMergedApiExecutionRole", "path": "stack/MergedAPI/MergedApiExecutionRole/ImportMergedApiExecutionRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -251,8 +251,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultPolicy": { @@ -335,20 +335,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -369,8 +369,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "FirstSourceAPIAssociation": { @@ -397,8 +397,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnSourceApiAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecondSourceAPIAssociation": { @@ -425,8 +425,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnSourceApiAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultApiKey": { @@ -444,44 +444,44 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LogGroup": { "id": "LogGroup", "path": "stack/MergedAPI/LogGroup", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "stack/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "stack/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "api": { @@ -497,7 +497,7 @@ "path": "api/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.3.0" } }, "DeployAssert": { @@ -508,22 +508,22 @@ "id": "BootstrapVersion", "path": "api/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "api/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, @@ -543,13 +543,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/Stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/Stack.assets.json index 75acbfba5b1e9..b1766201634d8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/Stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/Stack.assets.json @@ -1,7 +1,7 @@ { - "version": "34.0.0", + "version": "36.0.0", "files": { - "0d28049698de9f166ab2500a6a65a1e012fb46df87be49853f2b631a3573c599": { + "c803e6939ee5a85869969676de20feee31eb3838f836004ca166baa26d3db7c1": { "source": { "path": "Stack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0d28049698de9f166ab2500a6a65a1e012fb46df87be49853f2b631a3573c599.json", + "objectKey": "c803e6939ee5a85869969676de20feee31eb3838f836004ca166baa26d3db7c1.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/Stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/Stack.template.json index 7668f2ab79710..56ba7461a5394 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/Stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/Stack.template.json @@ -277,7 +277,10 @@ "Arn" ] } - } + }, + "DependsOn": [ + "FirstSourceAPISchemaF2FDB692" + ] }, "SourceApiAssociation254340D38": { "Type": "AWS::AppSync::SourceApiAssociation", @@ -297,7 +300,10 @@ "Arn" ] } - } + }, + "DependsOn": [ + "SecondSourceAPISchema65B7401E" + ] }, "SourceApiAssociation3F6A7C1BA": { "Type": "AWS::AppSync::SourceApiAssociation", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json index 017cff874641f..8202fda5ae125 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/cdk.out index 2313ab5436501..1f0068d32659a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"34.0.0"} \ No newline at end of file +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/integ.json index 5cae67ec7d1ba..6a9dd9a6bb6e0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "testCases": { "api/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/manifest.json index 1412261dd7df0..55c8e79662d15 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "artifacts": { "Stack.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "Stack.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0d28049698de9f166ab2500a6a65a1e012fb46df87be49853f2b631a3573c599.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c803e6939ee5a85869969676de20feee31eb3838f836004ca166baa26d3db7c1.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -169,6 +170,7 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "apiDefaultTestDeployAssert018781F2.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/tree.json index 3efea755f9277..27e38269fc625 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-source-api-association.js.snapshot/tree.json @@ -23,8 +23,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Schema": { @@ -43,8 +43,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLSchema", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultApiKey": { @@ -62,16 +62,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LogGroup": { "id": "LogGroup", "path": "Stack/FirstSourceAPI/LogGroup", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "FirstSourceDS": { @@ -95,20 +95,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.NoneDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecondSourceAPI": { @@ -126,8 +126,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Schema": { @@ -146,8 +146,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLSchema", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultApiKey": { @@ -165,16 +165,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LogGroup": { "id": "LogGroup", "path": "Stack/SecondSourceAPI/LogGroup", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecondSourceDS": { @@ -198,20 +198,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.NoneDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "ThirdSourceAPI": { @@ -229,8 +229,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Schema": { @@ -249,8 +249,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLSchema", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultApiKey": { @@ -268,22 +268,22 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LogGroup": { "id": "LogGroup", "path": "Stack/ThirdSourceAPI/LogGroup", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "MergedApiExecutionRole": { @@ -294,8 +294,8 @@ "id": "ImportMergedApiExecutionRole", "path": "Stack/MergedApiExecutionRole/ImportMergedApiExecutionRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -319,8 +319,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultPolicy": { @@ -423,20 +423,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "MergedAPI": { @@ -461,8 +461,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultApiKey": { @@ -480,22 +480,22 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LogGroup": { "id": "LogGroup", "path": "Stack/MergedAPI/LogGroup", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SourceApiAssociation1": { @@ -526,14 +526,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnSourceApiAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.SourceApiAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SourceApiAssociation2": { @@ -564,22 +564,22 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnSourceApiAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.SourceApiAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "ImportedThirdApi": { "id": "ImportedThirdApi", "path": "Stack/ImportedThirdApi", "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.GraphqlApiBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SourceApiAssociation3": { @@ -610,36 +610,36 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.CfnSourceApiAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_appsync.SourceApiAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "Stack/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "Stack/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "api": { @@ -655,7 +655,7 @@ "path": "api/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.3.0" } }, "DeployAssert": { @@ -666,22 +666,22 @@ "id": "BootstrapVersion", "path": "api/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "api/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, @@ -701,13 +701,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } } \ No newline at end of file diff --git a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts index 73ea5ff48756b..adccdbd2a8aa5 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts @@ -742,6 +742,10 @@ export class GraphqlApi extends GraphqlApiBase { description: sourceApiConfig.description, }); + if (sourceApiConfig.sourceApi instanceof GraphqlApi) { + sourceApiConfig.sourceApi.addSchemaDependency(association); + } + // Add permissions to merged api execution role const executionRole = this.mergedApiExecutionRole as IRole; addSourceGraphQLPermission(association, executionRole); diff --git a/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts b/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts index 4d9ac599800e0..3886478668d55 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts @@ -3,6 +3,7 @@ import { CfnSourceApiAssociation } from './appsync.generated'; import { IGraphqlApi } from './graphqlapi-base'; import { Effect, IRole, PolicyStatement } from '../../aws-iam'; import { Fn, IResource, Lazy, Resource } from '../../core'; +import { GraphqlApi } from './graphqlapi'; /** * Merge type used to associate the source API @@ -178,6 +179,10 @@ export class SourceApiAssociation extends Resource implements ISourceApiAssociat description: props.description, }); + if (this.sourceApi instanceof GraphqlApi) { + this.sourceApi.addSchemaDependency(this.association); + } + this.associationId = this.association.attrAssociationId; this.associationArn = this.association.attrAssociationArn; diff --git a/packages/aws-cdk-lib/aws-appsync/test/appsync-merged-api.test.ts b/packages/aws-cdk-lib/aws-appsync/test/appsync-merged-api.test.ts index 57f3f7a2c8dc4..db39bb6811a18 100644 --- a/packages/aws-cdk-lib/aws-appsync/test/appsync-merged-api.test.ts +++ b/packages/aws-cdk-lib/aws-appsync/test/appsync-merged-api.test.ts @@ -176,6 +176,41 @@ test('Merged API throws when accessing schema property', () => { }).toThrowError('Schema does not exist for AppSync merged APIs.'); }); +test('source api association depends on source schema', () => { + // WHEN + new appsync.GraphqlApi(stack, 'merged-api', { + name: 'api', + definition: appsync.Definition.fromSourceApis({ + sourceApis: [ + { + sourceApi: api1, + }, + ], + }), + }); + + // THEN + Template.fromStack(stack).hasResource('AWS::AppSync::SourceApiAssociation', { + DependsOn: [ + 'api1SchemaFFA53DB6', + ], + Properties: { + MergedApiIdentifier: { + 'Fn::GetAtt': [ + 'mergedapiCE4CAF34', + 'ApiId', + ], + }, + SourceApiIdentifier: { + 'Fn::GetAtt': [ + 'api1A91238E2', + 'ApiId', + ], + }, + }, + }); +}); + function validateSourceApiAssociations(stackToValidate: cdk.Stack, expectedMergedApiExecutionRole: string, expectedPolicyName: string, diff --git a/packages/aws-cdk-lib/aws-appsync/test/appsync-source-api-association.test.ts b/packages/aws-cdk-lib/aws-appsync/test/appsync-source-api-association.test.ts index 9636a26d2b5f7..47b6780bc8fe3 100644 --- a/packages/aws-cdk-lib/aws-appsync/test/appsync-source-api-association.test.ts +++ b/packages/aws-cdk-lib/aws-appsync/test/appsync-source-api-association.test.ts @@ -40,7 +40,7 @@ beforeEach(() => { }); test('Associate with source apis', () => { - const sourceApiAssociation1 = new appsync.SourceApiAssociation(stack, 'SourceApi1', { + new appsync.SourceApiAssociation(stack, 'SourceApi1', { sourceApi: api1, mergedApi: mergedApi, mergeType: appsync.MergeType.MANUAL_MERGE, @@ -57,8 +57,51 @@ test('Associate with source apis', () => { // THEN verifySourceAssociations(stack, 'Arn'); verifyMergedApiExecutionRole(stack); + verifyDependencyToSchema(stack); }); +function verifyDependencyToSchema(stackToValidate: cdk.Stack) { + // THEN + Template.fromStack(stackToValidate).hasResource('AWS::AppSync::SourceApiAssociation', { + DependsOn: [ + 'api2SchemaD5C26031', + ], + Properties: { + MergedApiIdentifier: { + 'Fn::GetAtt': [ + 'mergedapiCE4CAF34', + 'Arn', + ], + }, + SourceApiIdentifier: { + 'Fn::GetAtt': [ + 'api2C4850CEA', + 'Arn', + ], + }, + }, + }); + Template.fromStack(stackToValidate).hasResource('AWS::AppSync::SourceApiAssociation', { + DependsOn: [ + 'api1SchemaFFA53DB6', + ], + Properties: { + MergedApiIdentifier: { + 'Fn::GetAtt': [ + 'mergedapiCE4CAF34', + 'Arn', + ], + }, + SourceApiIdentifier: { + 'Fn::GetAtt': [ + 'api1A91238E2', + 'Arn', + ], + }, + }, + }); +} + function verifySourceAssociations(stackToValidate: cdk.Stack, expectedIdentifier: string) { // THEN Template.fromStack(stackToValidate).hasResourceProperties('AWS::AppSync::GraphQLApi', { From 0cdad0bb98a27082e9bd6f2d64383501603600fd Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Mon, 12 Feb 2024 00:57:14 +0900 Subject: [PATCH 2/5] change import order --- packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts b/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts index 3886478668d55..f479213b79c91 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts @@ -1,9 +1,9 @@ import { Construct } from 'constructs'; import { CfnSourceApiAssociation } from './appsync.generated'; +import { GraphqlApi } from './graphqlapi'; import { IGraphqlApi } from './graphqlapi-base'; import { Effect, IRole, PolicyStatement } from '../../aws-iam'; import { Fn, IResource, Lazy, Resource } from '../../core'; -import { GraphqlApi } from './graphqlapi'; /** * Merge type used to associate the source API From f487512c28a36d41d6ca84ffdeb28a01fb7b7876 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Mon, 12 Feb 2024 01:13:56 +0900 Subject: [PATCH 3/5] remove if statements --- packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts | 4 +--- .../aws-cdk-lib/aws-appsync/lib/source-api-association.ts | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts index adccdbd2a8aa5..714589008bc96 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts @@ -742,9 +742,7 @@ export class GraphqlApi extends GraphqlApiBase { description: sourceApiConfig.description, }); - if (sourceApiConfig.sourceApi instanceof GraphqlApi) { - sourceApiConfig.sourceApi.addSchemaDependency(association); - } + sourceApiConfig.sourceApi.addSchemaDependency(association); // Add permissions to merged api execution role const executionRole = this.mergedApiExecutionRole as IRole; diff --git a/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts b/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts index f479213b79c91..5f01f54b06d12 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts @@ -179,9 +179,7 @@ export class SourceApiAssociation extends Resource implements ISourceApiAssociat description: props.description, }); - if (this.sourceApi instanceof GraphqlApi) { - this.sourceApi.addSchemaDependency(this.association); - } + this.sourceApi.addSchemaDependency(this.association); this.associationId = this.association.attrAssociationId; this.associationArn = this.association.attrAssociationArn; From 9adee6dd5b16f7485ffa53de4411ec9468eb8947 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Mon, 12 Feb 2024 01:25:10 +0900 Subject: [PATCH 4/5] remove unused import --- packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts b/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts index 5f01f54b06d12..cb8c9d971249b 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts @@ -1,6 +1,5 @@ import { Construct } from 'constructs'; import { CfnSourceApiAssociation } from './appsync.generated'; -import { GraphqlApi } from './graphqlapi'; import { IGraphqlApi } from './graphqlapi-base'; import { Effect, IRole, PolicyStatement } from '../../aws-iam'; import { Fn, IResource, Lazy, Resource } from '../../core'; From 7c8a66031e68f8da277da2bf5598ba08bbe64828 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Thu, 21 Mar 2024 20:34:46 +0900 Subject: [PATCH 5/5] add comments --- packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts | 1 + packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts index 9715f8896c20c..6047973e9fcdc 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts @@ -706,6 +706,7 @@ export class GraphqlApi extends GraphqlApiBase { description: sourceApiConfig.description, }); + // Add dependency because the schema must be created first to create the source api association. sourceApiConfig.sourceApi.addSchemaDependency(association); // Add permissions to merged api execution role diff --git a/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts b/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts index cb8c9d971249b..1241c6e736e44 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts @@ -178,6 +178,7 @@ export class SourceApiAssociation extends Resource implements ISourceApiAssociat description: props.description, }); + // Add dependency because the schema must be created first to create the source api association. this.sourceApi.addSchemaDependency(this.association); this.associationId = this.association.attrAssociationId;