I’m attempting to create a network container using the awscdk-resources-mongodbatlas package and the CfnNetworkContainer construct, as shown in the following code snippet:
const networkContainer = new CfnNetworkContainer(
this,
`${prefix}-network-container`,
{
projectId: projectId,
regionName: "US_EAST_1",
atlasCidrBlock: "192.168.248.0/21",
profile: "development",
}
);
However, the deployment fails with the following error:
“Resource handler returned message: “Unable to complete request: error creating network container” (RequestToken: 3fdd47c4-b123-4e89-577c-eb70da2652d3, HandlerErrorCode: GeneralServiceException)”
To troubleshoot, I attempted to create the same network container via the MongoDB Atlas API directly, and it worked without any issues.
Please help investigate why the CDK construct fails to create the network container while the API request succeeds. Let me know if any additional configuration or permissions might be required.
1 Like