Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(appsync): Standalone L2 construct for SourceApiAssociation #27121

Merged
merged 21 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
73edebc
feat(appsync): Standalone L2 construct for SourceApiAssociation as pa…
ndejaco2 Sep 13, 2023
6bd2f05
Update README for SourceApiAssociation construct
ndejaco2 Sep 13, 2023
2ad634c
Change naming in README
ndejaco2 Sep 13, 2023
7fe1aca
Undo renaming of input types
ndejaco2 Sep 13, 2023
be34bd7
Remove unused param
ndejaco2 Sep 13, 2023
e1e445d
Simplify interface and support imported source apis using IGraphqlApi
ndejaco2 Sep 14, 2023
83a806f
Add additional snapshot test for flag enabled
ndejaco2 Sep 14, 2023
681ddae
README update
ndejaco2 Sep 14, 2023
4abd223
Remove use of SourceApiAssociation construct in existing construct to…
ndejaco2 Sep 15, 2023
17842e5
Updated breaking change to allow
ndejaco2 Sep 15, 2023
8219b13
Use feature flag in GraphqlApi construct as changing this property do…
ndejaco2 Sep 15, 2023
c010e9c
Attempt to fix build by setting flag to always be false in integ test
ndejaco2 Sep 15, 2023
0a02889
Use postCliContext so flag takes precedence
ndejaco2 Sep 15, 2023
ef4d105
Add ISourceApiAssociation for import and update README
ndejaco2 Sep 15, 2023
05129ed
Add note about resource replacement
ndejaco2 Sep 15, 2023
4b1f35d
Add separate example in README and add permissions whether role was p…
ndejaco2 Sep 18, 2023
17a8ce2
Fix unit test
ndejaco2 Sep 18, 2023
6d17bfd
Remove trailing whitespace
ndejaco2 Sep 18, 2023
47e08e8
Update README
ndejaco2 Sep 18, 2023
2144db3
PR feeback
ndejaco2 Sep 20, 2023
4152ad9
Merge branch 'main' into main
MrArnoldPalmer Sep 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,6 @@ removed:aws-cdk-lib.aws_cloudwatch.CfnAlarm.attrId
removed:aws-cdk-lib.aws_ec2.CfnNetworkInterface.enablePrimaryIpv6
removed:aws-cdk-lib.aws_ec2.CfnNetworkInterfaceAttachment.attrId
removed:aws-cdk-lib.aws_ec2.CfnNetworkInterfaceProps.enablePrimaryIpv6

# Changed type from GraphqlApi to IGraphqlApi to support import from a different stack, should not matter.
weakened:aws-cdk-lib.aws_appsync.SourceApi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type thirdTest {
version: String!
}
type Query {
getThirdTests: [thirdTest]!
}
type Mutation {
addThirdTest(version: String!): thirdTest
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "34.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
"path": "apiDefaultTestDeployAssert018781F2.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"34.0.0"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "34.0.0",
"testCases": {
"api/DefaultTest": {
"stacks": [
"stack"
],
"assertionStack": "api/DefaultTest/DeployAssert",
"assertionStackName": "apiDefaultTestDeployAssert018781F2"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
{
"version": "34.0.0",
"artifacts": {
"stack.assets": {
"type": "cdk:asset-manifest",
"properties": {
"file": "stack.assets.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
}
},
"stack": {
"type": "aws:cloudformation:stack",
"environment": "aws://unknown-account/unknown-region",
"properties": {
"templateFile": "stack.template.json",
"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",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
"stack.assets"
],
"lookupRole": {
"arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
"requiresBootstrapStackVersion": 8,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
}
},
"dependencies": [
"stack.assets"
],
"metadata": {
"/stack/FirstSourceAPI/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "FirstSourceAPIB0DE8D5A"
}
],
"/stack/FirstSourceAPI/Schema": [
{
"type": "aws:cdk:logicalId",
"data": "FirstSourceAPISchemaF2FDB692"
}
],
"/stack/FirstSourceAPI/DefaultApiKey": [
{
"type": "aws:cdk:logicalId",
"data": "FirstSourceAPIDefaultApiKey9D9AE06D"
}
],
"/stack/FirstSourceAPI/FirstSourceDS/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "FirstSourceAPIFirstSourceDS6AD299B7"
}
],
"/stack/SecondSourceAPI/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "SecondSourceAPIE903371D"
}
],
"/stack/SecondSourceAPI/Schema": [
{
"type": "aws:cdk:logicalId",
"data": "SecondSourceAPISchema65B7401E"
}
],
"/stack/SecondSourceAPI/DefaultApiKey": [
{
"type": "aws:cdk:logicalId",
"data": "SecondSourceAPIDefaultApiKeyCE5A0A64"
}
],
"/stack/SecondSourceAPI/SecondSourceDS/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "SecondSourceAPISecondSourceDSEA46EBA7"
}
],
"/stack/MergedAPI/MergedApiExecutionRole/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "MergedAPIMergedApiExecutionRole5F2BCCAD"
}
],
"/stack/MergedAPI/MergedApiExecutionRole/DefaultPolicy/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "MergedAPIMergedApiExecutionRoleDefaultPolicy31A96DBC"
}
],
"/stack/MergedAPI/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "MergedAPI08D3EAD1"
}
],
"/stack/MergedAPI/FirstSourceAPIAssociation": [
{
"type": "aws:cdk:logicalId",
"data": "MergedAPIFirstSourceAPIAssociationEC781BA9"
}
],
"/stack/MergedAPI/SecondSourceAPIAssociation": [
{
"type": "aws:cdk:logicalId",
"data": "MergedAPISecondSourceAPIAssociationBD1A08F4"
}
],
"/stack/MergedAPI/DefaultApiKey": [
{
"type": "aws:cdk:logicalId",
"data": "MergedAPIDefaultApiKeyAF5EA13C"
}
],
"/stack/BootstrapVersion": [
{
"type": "aws:cdk:logicalId",
"data": "BootstrapVersion"
}
],
"/stack/CheckBootstrapVersion": [
{
"type": "aws:cdk:logicalId",
"data": "CheckBootstrapVersion"
}
]
},
"displayName": "stack"
},
"apiDefaultTestDeployAssert018781F2.assets": {
"type": "cdk:asset-manifest",
"properties": {
"file": "apiDefaultTestDeployAssert018781F2.assets.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
}
},
"apiDefaultTestDeployAssert018781F2": {
"type": "aws:cloudformation:stack",
"environment": "aws://unknown-account/unknown-region",
"properties": {
"templateFile": "apiDefaultTestDeployAssert018781F2.template.json",
"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}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
"apiDefaultTestDeployAssert018781F2.assets"
],
"lookupRole": {
"arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
"requiresBootstrapStackVersion": 8,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
}
},
"dependencies": [
"apiDefaultTestDeployAssert018781F2.assets"
],
"metadata": {
"/api/DefaultTest/DeployAssert/BootstrapVersion": [
{
"type": "aws:cdk:logicalId",
"data": "BootstrapVersion"
}
],
"/api/DefaultTest/DeployAssert/CheckBootstrapVersion": [
{
"type": "aws:cdk:logicalId",
"data": "CheckBootstrapVersion"
}
]
},
"displayName": "api/DefaultTest/DeployAssert"
},
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "34.0.0",
"files": {
"56930136ed109a6e2bbab108d97daf7201ee4fd652cff93f20eb31cd855e4e47": {
"source": {
"path": "stack.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "56930136ed109a6e2bbab108d97daf7201ee4fd652cff93f20eb31cd855e4e47.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Loading
Loading