Skip to content

Commit e264c60

Browse files
authored
Revert "chore: add vpc endpoint for each construct (#614)" (#620)
This reverts commit 486c810.
1 parent 459c160 commit e264c60

File tree

21 files changed

+129
-393
lines changed

21 files changed

+129
-393
lines changed

apidocs/classes/QaAppsyncOpensearch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ represents the scope for all the resources.
2828

2929
**id**: `string`
3030

31-
this is a scope-unique id.
31+
this is a a scope-unique id.
3232

3333
**props**: [`QaAppsyncOpensearchProps`](../interfaces/QaAppsyncOpensearchProps.md)
3434

apidocs/interfaces/QaAppsyncOpensearchProps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Existing Amazon OpenSearch Service domain.
108108

109109
> `readonly` `optional` **existingOpensearchServerlessCollection**: `CfnCollection`
110110
111-
Existing Amazon OpenSearch Serverless collection.
111+
Existing Amazon Amazon OpenSearch Serverless collection.
112112

113113
#### Default
114114

lambda/opensearch-serverless-custom-resources/custom_resources/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
from .cr_types import CustomResourceRequest, CustomResourceResponse
2121
from .opensearch_index import on_event as on_event_opensearch_index
22-
from .opensearch_vpc_endpoint import on_event as on_event_opensearch_vpc_endpoint
2322

2423
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO")
2524

@@ -33,8 +32,6 @@ def on_event(event: CustomResourceRequest, context):
3332

3433
if resource_type == "Custom::OpenSearchIndex":
3534
return on_event_opensearch_index(event, context)
36-
if resource_type == "Custom::VpcEndpoint":
37-
return on_event_opensearch_vpc_endpoint(event, context)
3835
if resource_type == "Custom::NoOp":
3936
logger.info("NoOp resource type")
4037
# Return a response with a physical resource ID that is not empty.

lambda/opensearch-serverless-custom-resources/custom_resources/opensearch_vpc_endpoint.py

Lines changed: 0 additions & 169 deletions
This file was deleted.

src/cdk-lib/amazonaurora/aurora-default-vector-store.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ export class AmazonAuroraDefaultVectorStore extends cdk.Resource {
108108

109109
const vpc = buildVpc(this, {
110110
defaultVpcProps: DefaultVpcProps(),
111-
vpcName: 'auroraDefaultVectorStoreVpc',
112111
});
113112
vpc.addFlowLog('VpcFlowLog', {
114113
destination: ec2.FlowLogDestination.toCloudWatchLogs(),
@@ -134,7 +133,7 @@ export class AmazonAuroraDefaultVectorStore extends cdk.Resource {
134133
clusterIdentifier: this.clusterIdentifier,
135134
defaultDatabaseName: this.databaseName,
136135
vpc: vpc,
137-
vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE_ISOLATED },
136+
vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC },
138137
securityGroups: [auroraSecurityGroup],
139138
iamAuthentication: true,
140139
storageEncrypted: true,

src/common/helpers/custom-resource-provider-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export function buildCustomResourceProvider(props: CRProviderProps): ICRProvider
122122
timeout: cdk.Duration.minutes(15),
123123
memorySize: 128,
124124
vpc,
125-
vpcSubnets: vpc ? { subnetType: ec2.SubnetType.PRIVATE_ISOLATED } : undefined,
125+
vpcSubnets: vpc ? { subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS } : undefined,
126126
securityGroups: vpc && securityGroup ? [securityGroup] : undefined,
127127
logRetention: logs.RetentionDays.ONE_WEEK,
128128
description: 'Custom Resource Provider',

src/common/helpers/opensearch-helper.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ export function CheckOpenSearchProps(propsObject: OpenSearchProps | any) {
4242
errorFound = true;
4343
}
4444

45-
if (propsObject.existingOpenSearchDomain && !propsObject.existingVpc) {
46-
errorMessages += 'Error - When using an existing OpenSearch domain, you must also provide an existing VPC.\n';
47-
errorFound = true;
48-
}
49-
5045
if (errorFound) {
5146
throw new Error(errorMessages);
5247
}

0 commit comments

Comments
 (0)