Skip to content

Commit

Permalink
chore: rebased on the latest main
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafał Pawłaszek committed Nov 29, 2023
1 parent a4524d7 commit 654d559
Show file tree
Hide file tree
Showing 9 changed files with 1,332 additions and 275 deletions.
1,445 changes: 1,301 additions & 144 deletions API.md

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/amazonrdsforpostgresql/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
import { SecretValue } from 'aws-cdk-lib';
import { CfnConnectorProfile } from 'aws-cdk-lib/aws-appflow';
import { Construct } from 'constructs';
import { AmazonRdsForPostgreSqlConnectorType } from './type';
Expand All @@ -17,7 +18,7 @@ export interface AmazonRdsForPostgreSqlConnectorProfileProps extends ConnectorPr

export interface AmazonRdsForPostgreSqlBasicAuthSettings {
readonly username: string;
readonly password: string;
readonly password: SecretValue;
}

export class AmazonRdsForPostgreSqlConnectorProfile extends ConnectorProfileBase {
Expand Down Expand Up @@ -52,7 +53,7 @@ export class AmazonRdsForPostgreSqlConnectorProfile extends ConnectorProfileBase
custom: {
credentialsMap: {
username: properties.basicAuth.username,
password: properties.basicAuth.password,
password: properties.basicAuth.password.unsafeUnwrap(),
driver: 'postgresql',
hostname: properties.hostname,
port: properties.port ? `${properties.port}` : AmazonRdsForPostgreSqlConnectorProfile.defaultPort.toString(),
Expand Down
5 changes: 3 additions & 2 deletions src/jdbcsmalldatascale/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
import { SecretValue } from 'aws-cdk-lib';
import { CfnConnectorProfile } from 'aws-cdk-lib/aws-appflow';
import { Construct } from 'constructs';
import { JdbcSmallDataScaleConnectorType } from './type';
Expand All @@ -23,7 +24,7 @@ export interface JdbcSmallDataScaleConnectorProfileProps extends ConnectorProfil

export interface JdbcSmallDataScaleBasicAuthSettings {
readonly username: string;
readonly password: string;
readonly password: SecretValue;
}

export class JdbcSmallDataScaleConnectorProfile extends ConnectorProfileBase {
Expand Down Expand Up @@ -56,7 +57,7 @@ export class JdbcSmallDataScaleConnectorProfile extends ConnectorProfileBase {
custom: {
credentialsMap: {
username: properties.basicAuth.username,
password: properties.basicAuth.password,
password: properties.basicAuth.password.unsafeUnwrap(),
driver: properties.driver,
hostname: properties.hostname,
port: `${properties.port}`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "32.0.0",
"version": "35.0.0",
"files": {
"959d4a6849d6b85dbb3fae21353ffbc90d922b24f8f462950849a7aad164d99a": {
"6861d545ce03a23ba70eed7607eb9d7591a85a706ff66d03d5aad22687d28078": {
"source": {
"path": "TestStack.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "959d4a6849d6b85dbb3fae21353ffbc90d922b24f8f462950849a7aad164d99a.json",
"objectKey": "6861d545ce03a23ba70eed7607eb9d7591a85a706ff66d03d5aad22687d28078.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"Type": "AWS::AppFlow::ConnectorProfile",
"Properties": {
"ConnectionMode": "Public",
"ConnectorProfileName": "JdbcSmallTestConnectorProfile",
"ConnectorType": "CustomConnector",
"ConnectorLabel": "JDBCsmall",
"ConnectorProfileConfig": {
"ConnectorProfileCredentials": {
Expand Down Expand Up @@ -143,15 +141,15 @@
"ProfileProperties": {}
}
}
}
},
"ConnectorProfileName": "JdbcSmallTestConnectorProfile",
"ConnectorType": "CustomConnector"
}
},
"AmazonRdsTestConnectorProfileDA7BF797": {
"Type": "AWS::AppFlow::ConnectorProfile",
"Properties": {
"ConnectionMode": "Public",
"ConnectorProfileName": "AmazonRdsTestConnectorProfile",
"ConnectorType": "CustomConnector",
"ConnectorLabel": "AmazonRDSPostgreSQL",
"ConnectorProfileConfig": {
"ConnectorProfileCredentials": {
Expand Down Expand Up @@ -270,7 +268,9 @@
"ProfileProperties": {}
}
}
}
},
"ConnectorProfileName": "AmazonRdsTestConnectorProfile",
"ConnectorType": "CustomConnector"
}
},
"OnDemandFlow4ECA54C5": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const secret = Secret.fromSecretNameV2(stack, 'TestSecret', 'appflow/rdspostgres
const profile = new JdbcSmallDataScaleConnectorProfile(stack, 'JdbcSmallTestConnectorProfile', {
basicAuth: {
username: secret.secretValueFromJson('username').toString(),
password: secret.secretValueFromJson('password').toString(),
password: secret.secretValueFromJson('password'),
},
hostname: secret.secretValueFromJson('hostname').toString(),
port: Token.asNumber(secret.secretValueFromJson('port').toString()),
Expand All @@ -44,7 +44,7 @@ const source = new JdbcSmallDataScaleSource({
const destProfile = new AmazonRdsForPostgreSqlConnectorProfile(stack, 'AmazonRdsTestConnectorProfile', {
basicAuth: {
username: secret.secretValueFromJson('username').toString(),
password: secret.secretValueFromJson('password').toString(),
password: secret.secretValueFromJson('password'),
},
hostname: secret.secretValueFromJson('hostname').toString(),
port: Token.asNumber(secret.secretValueFromJson('port').toString()),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"version": "32.0.0",
"version": "35.0.0",
"files": {
"350185a1069fa20a23a583e20c77f6844218bd73097902362dc94f1a108f5d89": {
"b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": {
"source": {
"path": "asset.350185a1069fa20a23a583e20c77f6844218bd73097902362dc94f1a108f5d89",
"path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "350185a1069fa20a23a583e20c77f6844218bd73097902362dc94f1a108f5d89.zip",
"objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"2f314fdabfa78387850dca5138ffcb48177b4440b6061305653f2a01a961f988": {
"85e6c489b6ba6b249b35b568479083f37b5159ea1c2713c1812dfda7f164f585": {
"source": {
"path": "TestStack.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "2f314fdabfa78387850dca5138ffcb48177b4440b6061305653f2a01a961f988.json",
"objectKey": "85e6c489b6ba6b249b35b568479083f37b5159ea1c2713c1812dfda7f164f585.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"Type": "AWS::AppFlow::ConnectorProfile",
"Properties": {
"ConnectionMode": "Public",
"ConnectorProfileName": "TestConnectorProfile",
"ConnectorType": "CustomConnector",
"ConnectorLabel": "JDBCsmall",
"ConnectorProfileConfig": {
"ConnectorProfileCredentials": {
Expand Down Expand Up @@ -143,7 +141,9 @@
"ProfileProperties": {}
}
}
}
},
"ConnectorProfileName": "TestConnectorProfile",
"ConnectorType": "CustomConnector"
}
},
"TestBucket560B80BC": {
Expand All @@ -169,6 +169,7 @@
"Statement": [
{
"Action": [
"s3:PutBucketPolicy",
"s3:GetBucket*",
"s3:List*",
"s3:DeleteObject*"
Expand Down Expand Up @@ -301,18 +302,18 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "350185a1069fa20a23a583e20c77f6844218bd73097902362dc94f1a108f5d89.zip"
"S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip"
},
"Timeout": 900,
"MemorySize": 128,
"Handler": "__entrypoint__.handler",
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
"Arn"
]
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Description": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -414,109 +415,6 @@
]
}
},
"Mappings": {
"DefaultCrNodeVersionMap": {
"af-south-1": {
"value": "nodejs16.x"
},
"ap-east-1": {
"value": "nodejs16.x"
},
"ap-northeast-1": {
"value": "nodejs16.x"
},
"ap-northeast-2": {
"value": "nodejs16.x"
},
"ap-northeast-3": {
"value": "nodejs16.x"
},
"ap-south-1": {
"value": "nodejs16.x"
},
"ap-south-2": {
"value": "nodejs16.x"
},
"ap-southeast-1": {
"value": "nodejs16.x"
},
"ap-southeast-2": {
"value": "nodejs16.x"
},
"ap-southeast-3": {
"value": "nodejs16.x"
},
"ca-central-1": {
"value": "nodejs16.x"
},
"cn-north-1": {
"value": "nodejs16.x"
},
"cn-northwest-1": {
"value": "nodejs16.x"
},
"eu-central-1": {
"value": "nodejs16.x"
},
"eu-central-2": {
"value": "nodejs16.x"
},
"eu-north-1": {
"value": "nodejs16.x"
},
"eu-south-1": {
"value": "nodejs16.x"
},
"eu-south-2": {
"value": "nodejs16.x"
},
"eu-west-1": {
"value": "nodejs16.x"
},
"eu-west-2": {
"value": "nodejs16.x"
},
"eu-west-3": {
"value": "nodejs16.x"
},
"me-central-1": {
"value": "nodejs16.x"
},
"me-south-1": {
"value": "nodejs16.x"
},
"sa-east-1": {
"value": "nodejs16.x"
},
"us-east-1": {
"value": "nodejs16.x"
},
"us-east-2": {
"value": "nodejs16.x"
},
"us-gov-east-1": {
"value": "nodejs16.x"
},
"us-gov-west-1": {
"value": "nodejs16.x"
},
"us-iso-east-1": {
"value": "nodejs14.x"
},
"us-iso-west-1": {
"value": "nodejs14.x"
},
"us-isob-east-1": {
"value": "nodejs14.x"
},
"us-west-1": {
"value": "nodejs16.x"
},
"us-west-2": {
"value": "nodejs16.x"
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
Expand Down
2 changes: 1 addition & 1 deletion test/integ/ondemand-jdbcsmalldatascale-to-s3.integ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const secret = Secret.fromSecretNameV2(stack, 'TestSecret', 'appflow/rdspostgres
const profile = new JdbcSmallDataScaleConnectorProfile(stack, 'TestConnectorProfile', {
basicAuth: {
username: secret.secretValueFromJson('username').toString(),
password: secret.secretValueFromJson('password').toString(),
password: secret.secretValueFromJson('password'),
},
hostname: secret.secretValueFromJson('hostname').toString(),
port: Token.asNumber(secret.secretValueFromJson('port').toString()),
Expand Down

0 comments on commit 654d559

Please sign in to comment.