File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // infra/modules/aks.bicep
2+ param clusterName string
3+ param location string
4+ param subnetId string
5+
6+ resource aks 'Microsoft.ContainerService/managedClusters@2024-02-01' = {
7+ name : clusterName
8+ location : location
9+ identity : {
10+ type : 'SystemAssigned'
11+ }
12+ properties : {
13+ dnsPrefix : clusterName
14+ // Hardening: Disabling local accounts to force Entra ID login
15+ disableLocalAccounts : true
16+ agentPoolProfiles : [
17+ {
18+ name : 'agentpool'
19+ count : 2
20+ vmSize : 'Standard_DS2_v2'
21+ osType : 'Linux'
22+ mode : 'System'
23+ vnetSubnetID : subnetId // Plugs into your secure VNet
24+ }
25+ ]
26+ networkProfile : {
27+ networkPlugin : 'azure'
28+ networkDataplane : 'cilium' // SME Choice: Best for security visibility
29+ serviceCidr : '10.0.0.0/16'
30+ dnsServiceIP : '10.0.0.10'
31+ }
32+ }
33+ }
34+
35+ output clusterName string = aks .name
Original file line number Diff line number Diff line change 1+ // infra/modules/foundry.bicep
2+ param hubName string
3+ param projectName string
4+ param location string
5+ param vnetId string
6+ param subnetId string
7+
8+ // 1. The AI Foundry Hub (The "Management" layer)
9+ resource aiHub 'Microsoft.MachineLearningServices/workspaces@2024-04-01' = {
10+ name : hubName
11+ location : location
12+ kind : 'Hub' // Specifies this is an AI Foundry Hub
13+ identity : {
14+ type : 'SystemAssigned'
15+ }
16+ properties : {
17+ friendlyName : 'SME Security Research Hub'
18+ vnetAllowRPCAndPublicNetworkAccess : false // TD-REC alignment: No public access
19+ managedNetwork : {
20+ isolationMode : 'AllowOnlyApprovedOutbound' // Prevents data exfiltration by agents
21+ }
22+ }
23+ }
24+
25+ // 2. The AI Foundry Project (The "Execution" layer)
26+ resource aiProject 'Microsoft.MachineLearningServices/workspaces@2024-04-01' = {
27+ name : projectName
28+ location : location
29+ kind : 'Project'
30+ identity : {
31+ type : 'SystemAssigned'
32+ }
33+ properties : {
34+ hubResourceId : aiHub .id // Links Project to the Hub
35+ friendlyName : 'CRISP-MCP Agent Testing'
36+ }
37+ }
38+
39+ output hubId string = aiHub .id
40+ // Inside the Hub resource properties:
41+ managedNetwork : {
42+ isolationMode : 'AllowOnlyApprovedOutbound' // This is the "Mani-level" security fix
43+ }
44+ publicNetworkAccess : 'Disabled' // This is the "Toni-level" TD compliance fix
Original file line number Diff line number Diff line change 1+ targetScope = 'resourceGroup'
2+
3+ @description ('Deployment location' )
4+ param location string = resourceGroup ().location
5+
6+ @description ('AKS cluster name' )
7+ param clusterName string = 'sme-hardened-aks'
8+
9+ @description ('Resource group where the secure VNet lives' )
10+ param vnetResourceGroup string
11+
12+ @description ('Secure VNet name' )
13+ param vnetName string
14+
15+ @description ('Isolated subnet name in the secure VNet' )
16+ param subnetName string
17+
18+ // Reference the secure VNet and subnet
19+ resource vnet 'Microsoft.Network/virtualNetworks@2023-11-01' existing = {
20+ name : vnetName
21+ scope : resourceGroup (vnetResourceGroup )
22+ }
23+
24+ resource subnet 'Microsoft.Network/virtualNetworks/subnets@2023-11-01' existing = {
25+ name : subnetName
26+ parent : vnet
27+ }
28+
29+ // Reference the AKS module and pass the subnet from our secure VNet
30+ module aksCluster './modules/aks.bicep' = {
31+ name : 'aksDeployment'
32+ params : {
33+ clusterName : clusterName
34+ location : location
35+ subnetId : subnet .id // Direct link to our isolated subnet
36+ }
37+ }
You can’t perform that action at this time.
0 commit comments