Checks whether an ApsaraDB for MongoDB instance uses a virtual private cloud (VPC) as its network type, or is deployed in a specified VPC.
Scenario
Deploy ApsaraDB for MongoDB instances in a VPC rather than the classic network. A VPC is an isolated network that ensures network security in the cloud.
Risk level
Default risk level: medium.
You can change the risk level when you apply this rule.
Compliance evaluation logic
The instance is compliant if either of the following conditions is met: the
vpcIdsparameter is not specified and the instance is deployed in any VPC; or thevpcIdsparameter is specified and the instance is deployed in one of the specified VPCs.The instance is non-compliant if either of the following conditions is met: the
vpcIdsparameter is not specified and the instance uses the classic network; or thevpcIdsparameter is specified but the instance is not deployed in any of the specified VPCs. To remediate a non-compliant instance, see Non-compliance remediation.
Rule details
| Item | Description |
| Rule name | mongodb-instance-in-vpc |
| Rule ID | mongodb-instance-in-vpc |
| Tag | MongoDB and VPC |
| Automatic remediation | Not supported |
| Trigger type | Configuration change |
| Supported resource type | ApsaraDB for MongoDB instance |
| Input parameter | vpcIds
Note Separate multiple parameter values with commas (,). |
Non-compliance remediation
Change the network type of the ApsaraDB for MongoDB instance to VPC. For more information, see Switch the network type of an instance from classic network to VPC.