The following components use this resource and are potentially impacted by any changes. They should also be validated to ensure the changes do not cause a regression.
- Serverless PrivateEndpoint L1 CDK constructor
- Atlas Basic Serverless PrivateEndpoint L3 CDK constructor
These LDAP resources must be manually created.
- AWS VPC and Subnet
- Obtain the VPC id and subnet to create the private endpoint: example:
# Use AWS CLI to list VPCs and get the first VPC ID
vpc_id=$(aws ec2 describe-vpcs --query 'Vpcs[0].VpcId' --output text)
# Use AWS CLI to list subnets in the selected VPC and get the first Subnet ID
subnet_id=$(aws ec2 describe-subnets --filters "Name=vpc-id,Values=$vpc_id" --query 'Subnets[0].SubnetId' --output text)
- Follow general prerequisites for testing CFN resources.
- In the Atlas Project you plan to use for testing, create a Serverless instance, if not already present.
- Update serverless-private-endpoint-with-aws-private-endpoint.json under cfn-resources/examples/serverless-private-endpoint if required.
- Follow general steps to test CFN resources.
- Once the template with required parameters is used to create, update and delete a stack successfully, validate that success criteria is met.
- the serverless private endpoint must be created
- the aws private endpoint must be created
- General CFN resource success criteria should be satisfied.
The local tests are integrated with the AWS sam local
and cfn invoke
tooling features:
sam local start-lambda --skip-pull-image
then in another shell:
repo_root=$(git rev-parse --show-toplevel)
source <(${repo_root}/quickstart-mongodb-atlas/scripts/export-mongocli-config.py)
cd ${repo_root}/cfn-resources/project
./test/serverless-private-endpoint.create-sample-cfn-request.sh YourProjectName YourInstanceName VpcId SubnetId > test.request.json
echo "Sample request:"
cat test.request.json
cfn invoke CREATE test.request.json
cfn invoke DELETE test.request.json
Both CREATE and DELETE tests must pass.