Skip to content

Commit

Permalink
Merge branch 'master' into docs-s3-bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Feb 21, 2021
2 parents 926f774 + c5e8b6d commit ea3a5fd
Show file tree
Hide file tree
Showing 64 changed files with 535 additions and 581 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.90.1](https://github.com/aws/aws-cdk/compare/v1.90.0...v1.90.1) (2021-02-19)

### Bug Fixes

* **core:** ENOTDIR invalid cwd on "cdk deploy" ([#13145](https://github.com/aws/aws-cdk/issues/13145)) ([a735b52](https://github.com/aws/aws-cdk/commit/a735b52e4a33803b9ce1911bc0e2cc7b78ef581a)), closes [#12258](https://github.com/aws/aws-cdk/issues/12258) [#13076](https://github.com/aws/aws-cdk/issues/13076) [#13131](https://github.com/aws/aws-cdk/issues/13131)

## [1.90.0](https://github.com/aws/aws-cdk/compare/v1.89.0...v1.90.0) (2021-02-17)


Expand Down
7 changes: 7 additions & 0 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,10 @@ incompatible-argument:@aws-cdk/aws-ecs.TaskDefinition.addVolume
# We made properties optional and it's really fine but our differ doesn't think so.
weakened:@aws-cdk/cloud-assembly-schema.DockerImageSource
weakened:@aws-cdk/cloud-assembly-schema.FileSource

# https://github.com/aws/aws-cdk/pull/13145
removed:@aws-cdk/core.AssetStaging.isArchive
removed:@aws-cdk/core.AssetStaging.packaging
removed:@aws-cdk/core.BundlingOutput
removed:@aws-cdk/core.BundlingOptions.outputType

4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-appsync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ demoDS.createResolver({
fieldName: 'addDemo',
requestMappingTemplate: appsync.MappingTemplate.dynamoDbPutItem(
appsync.PrimaryKey.partition('id').auto(),
appsync.Values.projecting('demo')
appsync.Values.projecting('input')
),
responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultItem(),
});
Expand All @@ -116,7 +116,7 @@ const cluster = new rds.DatabaseCluster(stack, 'AuroraCluster', {
});

// Build a data source for AppSync to access the database.
const rdsDS = api.addRdsDataSource('rds', 'The rds data source', cluster, secret);
const rdsDS = api.addRdsDataSource('rds', cluster, secret, 'demos');

// Set up a resolver for an RDS query.
rdsDS.createResolver({
Expand Down
7 changes: 7 additions & 0 deletions packages/@aws-cdk/aws-appsync/lib/data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ export interface RdsDataSourceProps extends BackedDataSourceProps {
* The secret containing the credentials for the database
*/
readonly secretStore: ISecret;
/**
* The name of the database to use within the cluster
*
* @default - None
*/
readonly databaseName?: string;
}

/**
Expand All @@ -327,6 +333,7 @@ export class RdsDataSource extends BackedDataSource {
},
}),
awsSecretStoreArn: props.secretStore.secretArn,
databaseName: props.databaseName,
},
relationalDatabaseSourceType: 'RDS_HTTP_ENDPOINT',
},
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,14 @@ export interface IGraphqlApi extends IResource {
* @param id The data source's id
* @param databaseCluster The database cluster to interact with this data source
* @param secretStore The secret store that contains the username and password for the database cluster
* @param databaseName The optional name of the database to use within the cluster
* @param options The optional configuration for this data source
*/
addRdsDataSource(
id: string,
databaseCluster: IDatabaseCluster,
secretStore: ISecret,
databaseName?: string,
options?: DataSourceOptions
): RdsDataSource;

Expand Down Expand Up @@ -206,12 +208,14 @@ export abstract class GraphqlApiBase extends Resource implements IGraphqlApi {
* @param id The data source's id
* @param databaseCluster The database cluster to interact with this data source
* @param secretStore The secret store that contains the username and password for the database cluster
* @param databaseName The optional name of the database to use within the cluster
* @param options The optional configuration for this data source
*/
public addRdsDataSource(
id: string,
databaseCluster: IDatabaseCluster,
secretStore: ISecret,
databaseName?: string,
options?: DataSourceOptions,
): RdsDataSource {
return new RdsDataSource(this, id, {
Expand All @@ -220,6 +224,7 @@ export abstract class GraphqlApiBase extends Resource implements IGraphqlApi {
description: options?.description,
databaseCluster,
secretStore,
databaseName,
});
}

Expand Down
32 changes: 30 additions & 2 deletions packages/@aws-cdk/aws-appsync/test/appsync-rds.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,34 @@ describe('Rds Data Source configuration', () => {
});
});

test('databaseName saved to RdsHttpEndpointConfig', () => {
// WHEN
const testDatabaseName = 'testDatabaseName';
api.addRdsDataSource('ds', cluster, secret, testDatabaseName);

// THEN
expect(stack).toHaveResourceLike('AWS::AppSync::DataSource', {
Type: 'RELATIONAL_DATABASE',
RelationalDatabaseConfig: {
RdsHttpEndpointConfig: {
AwsRegion: { Ref: 'AWS::Region' },
AwsSecretStoreArn: { Ref: 'AuroraSecret41E6E877' },
DbClusterIdentifier: {
'Fn::Join': ['', ['arn:',
{ Ref: 'AWS::Partition' },
':rds:',
{ Ref: 'AWS::Region' },
':',
{ Ref: 'AWS::AccountId' },
':cluster:',
{ Ref: 'AuroraCluster23D869C0' }]],
},
DatabaseName: testDatabaseName,
},
},
});
});

test('default configuration produces name identical to the id', () => {
// WHEN
api.addRdsDataSource('ds', cluster, secret);
Expand All @@ -136,7 +164,7 @@ describe('Rds Data Source configuration', () => {

test('appsync configures name correctly', () => {
// WHEN
api.addRdsDataSource('ds', cluster, secret, {
api.addRdsDataSource('ds', cluster, secret, undefined, {
name: 'custom',
});

Expand All @@ -149,7 +177,7 @@ describe('Rds Data Source configuration', () => {

test('appsync configures name and description correctly', () => {
// WHEN
api.addRdsDataSource('ds', cluster, secret, {
api.addRdsDataSource('ds', cluster, secret, undefined, {
name: 'custom',
description: 'custom description',
});
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudfront-origins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"@aws-cdk/aws-ec2": "0.0.0",
"aws-sdk": "^2.847.0",
"aws-sdk": "^2.848.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"pkglint": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudfront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"aws-sdk": "^2.847.0",
"aws-sdk": "^2.848.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"cfn2ts": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudtrail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"aws-sdk": "^2.847.0",
"aws-sdk": "^2.848.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"cfn2ts": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codebuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"@aws-cdk/aws-sns": "0.0.0",
"@aws-cdk/aws-sqs": "0.0.0",
"@types/nodeunit": "^0.0.31",
"aws-sdk": "^2.847.0",
"aws-sdk": "^2.848.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"cfn2ts": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codecommit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"@aws-cdk/assert": "0.0.0",
"@aws-cdk/aws-sns": "0.0.0",
"@types/nodeunit": "^0.0.31",
"aws-sdk": "^2.847.0",
"aws-sdk": "^2.848.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"cfn2ts": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codepipeline-actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@types/nodeunit": "^0.0.31",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"lodash": "^4.17.20",
"lodash": "^4.17.21",
"nodeunit": "^0.11.3",
"pkglint": "0.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-dynamodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"@types/jest": "^26.0.20",
"aws-sdk": "^2.847.0",
"aws-sdk": "^2.848.0",
"aws-sdk-mock": "^5.1.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-eks/lib/kubectl-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export class KubectlProvider extends NestedStack {
onEventHandler: handler,
vpc: cluster.kubectlPrivateSubnets ? cluster.vpc : undefined,
vpcSubnets: cluster.kubectlPrivateSubnets ? { subnets: cluster.kubectlPrivateSubnets } : undefined,
securityGroups: cluster.kubectlSecurityGroup ? [cluster.kubectlSecurityGroup] : undefined,
});

this.serviceToken = provider.serviceToken;
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-eks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@aws-cdk/assert": "0.0.0",
"@types/nodeunit": "^0.0.31",
"@types/yaml": "1.9.6",
"aws-sdk": "^2.847.0",
"aws-sdk": "^2.848.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"cfn2ts": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@
},
"/",
{
"Ref": "AssetParameters3a065cef8968eb7f7e62ccb379c68400a56c31aceb97265d4e8f5f4620452db9S3Bucket7930790A"
"Ref": "AssetParameters93bb4c1c6bbced2c1adce602d7643d5475c6e463f4f57f4cd863e064d82a3d82S3Bucket8670C328"
},
"/",
{
Expand All @@ -1204,7 +1204,7 @@
"Fn::Split": [
"||",
{
"Ref": "AssetParameters3a065cef8968eb7f7e62ccb379c68400a56c31aceb97265d4e8f5f4620452db9S3VersionKey648E56F4"
"Ref": "AssetParameters93bb4c1c6bbced2c1adce602d7643d5475c6e463f4f57f4cd863e064d82a3d82S3VersionKeyCEFB3AF5"
}
]
}
Expand All @@ -1217,7 +1217,7 @@
"Fn::Split": [
"||",
{
"Ref": "AssetParameters3a065cef8968eb7f7e62ccb379c68400a56c31aceb97265d4e8f5f4620452db9S3VersionKey648E56F4"
"Ref": "AssetParameters93bb4c1c6bbced2c1adce602d7643d5475c6e463f4f57f4cd863e064d82a3d82S3VersionKeyCEFB3AF5"
}
]
}
Expand Down Expand Up @@ -1272,9 +1272,6 @@
"referencetoawscdkekshandlersinvpctestAssetParameters844c1a4b13479b359ea0e607dccb4a04b73e22cf88cf9b64feed2c5f0de213c0S3VersionKeyCE91E7FDRef": {
"Ref": "AssetParameters844c1a4b13479b359ea0e607dccb4a04b73e22cf88cf9b64feed2c5f0de213c0S3VersionKeyF55A2EA9"
},
"referencetoawscdkekshandlersinvpctestEksAllHandlersInVpcStackDefaultVpcE40EA7ACRef": {
"Ref": "EksAllHandlersInVpcStackDefaultVpcBE11D4AE"
},
"referencetoawscdkekshandlersinvpctestAssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3Bucket9D7E9998Ref": {
"Ref": "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3BucketDC4B98B1"
},
Expand Down Expand Up @@ -1400,17 +1397,17 @@
"Type": "String",
"Description": "Artifact hash for asset \"70396475d85a52e5c6ccad77894979d07433a207ea3c2668b929f3e70ffde081\""
},
"AssetParameters3a065cef8968eb7f7e62ccb379c68400a56c31aceb97265d4e8f5f4620452db9S3Bucket7930790A": {
"AssetParameters93bb4c1c6bbced2c1adce602d7643d5475c6e463f4f57f4cd863e064d82a3d82S3Bucket8670C328": {
"Type": "String",
"Description": "S3 bucket for asset \"3a065cef8968eb7f7e62ccb379c68400a56c31aceb97265d4e8f5f4620452db9\""
"Description": "S3 bucket for asset \"93bb4c1c6bbced2c1adce602d7643d5475c6e463f4f57f4cd863e064d82a3d82\""
},
"AssetParameters3a065cef8968eb7f7e62ccb379c68400a56c31aceb97265d4e8f5f4620452db9S3VersionKey648E56F4": {
"AssetParameters93bb4c1c6bbced2c1adce602d7643d5475c6e463f4f57f4cd863e064d82a3d82S3VersionKeyCEFB3AF5": {
"Type": "String",
"Description": "S3 key for asset version \"3a065cef8968eb7f7e62ccb379c68400a56c31aceb97265d4e8f5f4620452db9\""
"Description": "S3 key for asset version \"93bb4c1c6bbced2c1adce602d7643d5475c6e463f4f57f4cd863e064d82a3d82\""
},
"AssetParameters3a065cef8968eb7f7e62ccb379c68400a56c31aceb97265d4e8f5f4620452db9ArtifactHash66195F00": {
"AssetParameters93bb4c1c6bbced2c1adce602d7643d5475c6e463f4f57f4cd863e064d82a3d82ArtifactHashBEC324DA": {
"Type": "String",
"Description": "Artifact hash for asset \"3a065cef8968eb7f7e62ccb379c68400a56c31aceb97265d4e8f5f4620452db9\""
"Description": "Artifact hash for asset \"93bb4c1c6bbced2c1adce602d7643d5475c6e463f4f57f4cd863e064d82a3d82\""
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@
},
"/",
{
"Ref": "AssetParameterseb49ce353c5ff251ebe2c3225fe00fb3e9a68fcd8b10207e63a36bfc6e981519S3Bucket686DCA97"
"Ref": "AssetParameters8d4ffe9194a1ca97e2e9377049ddbeb3adbdaa984c8a90c08a5d8d6b328bdf7cS3BucketFEA5F85E"
},
"/",
{
Expand All @@ -1125,7 +1125,7 @@
"Fn::Split": [
"||",
{
"Ref": "AssetParameterseb49ce353c5ff251ebe2c3225fe00fb3e9a68fcd8b10207e63a36bfc6e981519S3VersionKey7EDC0140"
"Ref": "AssetParameters8d4ffe9194a1ca97e2e9377049ddbeb3adbdaa984c8a90c08a5d8d6b328bdf7cS3VersionKey226CF52C"
}
]
}
Expand All @@ -1138,7 +1138,7 @@
"Fn::Split": [
"||",
{
"Ref": "AssetParameterseb49ce353c5ff251ebe2c3225fe00fb3e9a68fcd8b10207e63a36bfc6e981519S3VersionKey7EDC0140"
"Ref": "AssetParameters8d4ffe9194a1ca97e2e9377049ddbeb3adbdaa984c8a90c08a5d8d6b328bdf7cS3VersionKey226CF52C"
}
]
}
Expand Down Expand Up @@ -1193,9 +1193,6 @@
"referencetoawscdkeksclusterprivateendpointtestAssetParameters844c1a4b13479b359ea0e607dccb4a04b73e22cf88cf9b64feed2c5f0de213c0S3VersionKey548D79B4Ref": {
"Ref": "AssetParameters844c1a4b13479b359ea0e607dccb4a04b73e22cf88cf9b64feed2c5f0de213c0S3VersionKeyF55A2EA9"
},
"referencetoawscdkeksclusterprivateendpointtestVpcFCD064BFRef": {
"Ref": "Vpc8378EB38"
},
"referencetoawscdkeksclusterprivateendpointtestAssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3Bucket7DDAFC04Ref": {
"Ref": "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3BucketDC4B98B1"
},
Expand Down Expand Up @@ -1321,17 +1318,17 @@
"Type": "String",
"Description": "Artifact hash for asset \"75667ab2bbef2c8efc57fb73bf352f345af1d471fb09cb11f5b7bc27d009b609\""
},
"AssetParameterseb49ce353c5ff251ebe2c3225fe00fb3e9a68fcd8b10207e63a36bfc6e981519S3Bucket686DCA97": {
"AssetParameters8d4ffe9194a1ca97e2e9377049ddbeb3adbdaa984c8a90c08a5d8d6b328bdf7cS3BucketFEA5F85E": {
"Type": "String",
"Description": "S3 bucket for asset \"eb49ce353c5ff251ebe2c3225fe00fb3e9a68fcd8b10207e63a36bfc6e981519\""
"Description": "S3 bucket for asset \"8d4ffe9194a1ca97e2e9377049ddbeb3adbdaa984c8a90c08a5d8d6b328bdf7c\""
},
"AssetParameterseb49ce353c5ff251ebe2c3225fe00fb3e9a68fcd8b10207e63a36bfc6e981519S3VersionKey7EDC0140": {
"AssetParameters8d4ffe9194a1ca97e2e9377049ddbeb3adbdaa984c8a90c08a5d8d6b328bdf7cS3VersionKey226CF52C": {
"Type": "String",
"Description": "S3 key for asset version \"eb49ce353c5ff251ebe2c3225fe00fb3e9a68fcd8b10207e63a36bfc6e981519\""
"Description": "S3 key for asset version \"8d4ffe9194a1ca97e2e9377049ddbeb3adbdaa984c8a90c08a5d8d6b328bdf7c\""
},
"AssetParameterseb49ce353c5ff251ebe2c3225fe00fb3e9a68fcd8b10207e63a36bfc6e981519ArtifactHashE5817DEB": {
"AssetParameters8d4ffe9194a1ca97e2e9377049ddbeb3adbdaa984c8a90c08a5d8d6b328bdf7cArtifactHashA6BF0EB3": {
"Type": "String",
"Description": "Artifact hash for asset \"eb49ce353c5ff251ebe2c3225fe00fb3e9a68fcd8b10207e63a36bfc6e981519\""
"Description": "Artifact hash for asset \"8d4ffe9194a1ca97e2e9377049ddbeb3adbdaa984c8a90c08a5d8d6b328bdf7c\""
}
}
}
Loading

0 comments on commit ea3a5fd

Please sign in to comment.