Spring Cloud service should be deployed in a virtual network
High
Azure
General
spring-spring-cloud-service-deployed
Applies to
Microsoft.AppPlatform/Spring
What CGPulse checks
A resource passes this rule when networkProfile must be set true. Anything else is reported as a finding with the evaluated property value attached as evidence.
How to fix it
Integrate with a Virtual Network to route traffic privately. In Azure Portal: Spring Apps > Networking > configure VNet integration. See: https://learn.microsoft.com/en-us/azure/spring-apps/how-to-deploy-in-azure-virtual-network
CLI
az spring create -n "{name}" -g "{rg}" --vnet "<vnet-id>" --app-subnet "<app-subnet-id>" --service-runtime-subnet "<runtime-subnet-id>"Bicep
resource springCloud 'Microsoft.AppPlatform/Spring@2024-01-01-preview' = {
name: '{name}'
location: location
properties: {
networkProfile: {
appSubnetId: '<app-subnet-id>'
serviceRuntimeSubnetId: '<service-runtime-subnet-id>'
}
}
}Terraform
resource "azurerm_spring_cloud_service" "{name}" {
name = "{name}"
resource_group_name = "{rg}"
location = var.location
network {
app_subnet_id = "<app-subnet-id>"
service_runtime_subnet_id = "<service-runtime-subnet-id>"
cidr_ranges = ["10.1.0.0/16", "10.2.0.0/16", "10.3.0.1/16"]
}
}
Compliance frameworks
Is your environment compliant with this rule?
CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.
Related Azure rules
- Action Group should be enabled
- Activity Log Alert should be enabled
- AKS cluster logs should be sent to Log Analytics
- AKS cluster must enable RBAC
- AKS cluster must enable RBAC
- AKS cluster should be a private cluster
- AKS cluster should disable local accounts
- AKS cluster should enable Azure RBAC for Kubernetes