Skip to content

Commit

Permalink
feat(aws-ec2): KINESIS_FIREHOSE vpc endpoint (#10682)
Browse files Browse the repository at this point in the history
KINESIS_FIREHOSE is missing from InterfaceVpcEndpointAwsService. KINESIS_STREAM is provided, but Firehose is not.

closes: #10611


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
daon authored Oct 6, 2020
1 parent e57f5c3 commit 08ae745
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
24 changes: 18 additions & 6 deletions packages/@aws-cdk/aws-cloudfront-origins/test/s3-origin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ describe('With bucket', () => {
const origin = new S3Origin(bucket);
const originBindConfig = origin.bind(stack, { originId: 'StackOrigin029E19582' });

expect(originBindConfig.originProperty).toEqual({
expect(stack.resolve(originBindConfig.originProperty)).toEqual({
id: 'StackOrigin029E19582',
domainName: bucket.bucketRegionalDomainName,
domainName: { 'Fn::GetAtt': ['Bucket83908E77', 'RegionalDomainName'] },
s3OriginConfig: {
originAccessIdentity: 'origin-access-identity/cloudfront/${Token[TOKEN.69]}',
originAccessIdentity: {
'Fn::Join': ['',
[
'origin-access-identity/cloudfront/',
{ Ref: 'S3Origin83A0717C' },
]],
},
},
});
});
Expand All @@ -34,12 +40,18 @@ describe('With bucket', () => {
const origin = new S3Origin(bucket, { originPath: '/assets' });
const originBindConfig = origin.bind(stack, { originId: 'StackOrigin029E19582' });

expect(originBindConfig.originProperty).toEqual({
expect(stack.resolve(originBindConfig.originProperty)).toEqual({
id: 'StackOrigin029E19582',
domainName: bucket.bucketRegionalDomainName,
domainName: { 'Fn::GetAtt': ['Bucket83908E77', 'RegionalDomainName'] },
originPath: '/assets',
s3OriginConfig: {
originAccessIdentity: 'origin-access-identity/cloudfront/${Token[TOKEN.89]}',
originAccessIdentity: {
'Fn::Join': ['',
[
'origin-access-identity/cloudfront/',
{ Ref: 'S3Origin83A0717C' },
]],
},
},
});
});
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ
public static readonly CODECOMMIT_GIT = new InterfaceVpcEndpointAwsService('git-codecommit');
public static readonly CODECOMMIT_GIT_FIPS = new InterfaceVpcEndpointAwsService('git-codecommit-fips');
public static readonly KINESIS_STREAMS = new InterfaceVpcEndpointAwsService('kinesis-streams');
public static readonly KINESIS_FIREHOSE = new InterfaceVpcEndpointAwsService('kinesis-firehose');
public static readonly KMS = new InterfaceVpcEndpointAwsService('kms');
public static readonly CLOUDWATCH_LOGS = new InterfaceVpcEndpointAwsService('logs');
public static readonly CLOUDWATCH = new InterfaceVpcEndpointAwsService('monitoring');
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-ec2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@
"docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.ELASTIC_INFERENCE_RUNTIME",
"docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.ELASTIC_LOAD_BALANCING",
"docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.KINESIS_STREAMS",
"docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.KINESIS_FIREHOSE",
"docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.KMS",
"docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.SAGEMAKER_API",
"docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.SAGEMAKER_NOTEBOOK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
]
}
},
"Instance255F35265813bd3c1f652ed5b": {
"Instance255F352658b696f54f846988d": {
"Type": "AWS::EC2::Instance",
"Properties": {
"AvailabilityZone": "us-east-1a",
Expand Down Expand Up @@ -169,15 +169,15 @@
{
"Ref": "AWS::StackName"
},
" --resource Instance255F35265813bd3c1f652ed5b -c default\n /opt/aws/bin/cfn-signal -e $? --region ",
" --resource Instance255F352658b696f54f846988d -c default\n /opt/aws/bin/cfn-signal -e $? --region ",
{
"Ref": "AWS::Region"
},
" --stack ",
{
"Ref": "AWS::StackName"
},
" --resource Instance255F35265813bd3c1f652ed5b\n cat /var/log/cfn-init.log >&2\n)"
" --resource Instance255F352658b696f54f846988d\n cat /var/log/cfn-init.log >&2\n)"
]
]
}
Expand Down

0 comments on commit 08ae745

Please sign in to comment.