-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(arm): arm custom policy support (#6769)
* arm custom policy support
- Loading branch information
1 parent
3800929
commit 7713e73
Showing
16 changed files
with
446 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from __future__ import annotations | ||
|
||
from pathlib import Path | ||
from typing import List, Tuple, Dict, Any | ||
|
||
|
||
def build_definitions_context(definitions: Dict[Path, Any], definitions_raw: Dict[Path, List[Tuple[int, str]]] | ||
) -> Dict[str, Dict[str, Any]]: | ||
# TODO | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from __future__ import annotations | ||
|
||
from pathlib import Path | ||
from typing import Any | ||
|
||
from checkov.arm.graph_builder.graph_components.blocks import ArmBlock | ||
|
||
|
||
def convert_graph_vertices_to_definitions( | ||
vertices: list[ArmBlock], root_folder: str | Path | None | ||
) -> tuple[dict[Path, Any], dict[str, dict[str, Any]]]: | ||
# TODO | ||
return ({}, {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Network/publicIPAddresses", | ||
"apiVersion": "2020-06-01", | ||
"name": "PublicIP1", | ||
"location": "westus", | ||
"properties": { | ||
"publicIPAllocationMethod": "Dynamic" | ||
} | ||
}, | ||
{ | ||
"type": "Microsoft.Network/networkInterfaces", | ||
"apiVersion": "2020-06-01", | ||
"name": "NIC1", | ||
"location": "westus", | ||
"dependsOn": [ | ||
"Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1", | ||
"Microsoft.Network/publicIPAddresses/PublicIP1" | ||
], | ||
"properties": { | ||
"ipConfigurations": [ | ||
{ | ||
"name": "ipconfig1", | ||
"properties": { | ||
"subnet": { | ||
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', 'VNet1', 'Subnet1')]" | ||
}, | ||
"privateIPAllocationMethod": "Dynamic", | ||
"publicIPAddress": { | ||
"id": "[resourceId('Microsoft.Network/publicIPAddresses', 'PublicIP1')]" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Network/storageAccounts", | ||
"apiVersion": "2019-06-01", | ||
"name": "storaccount1", | ||
"location": "westus", | ||
"sku": { | ||
"name": "Standard_LRS" | ||
}, | ||
"kind": "StorageV2", | ||
"properties": {} | ||
}, | ||
{ | ||
"type": "Microsoft.Compute/virtualMachines", | ||
"apiVersion": "2019-12-01", | ||
"name": "VM1", | ||
"location": "westus", | ||
"dependsOn": [ | ||
"Microsoft.Network/virtualNetworks/VNet1/subnets/Subnet1", | ||
"Microsoft.Network/storageAccounts/storaccount1" | ||
], | ||
"properties": { | ||
"hardwareProfile": { | ||
"vmSize": "Standard_D2s_v3" | ||
}, | ||
"storageProfile": { | ||
"imageReference": { | ||
"publisher": "MicrosoftWindowsServer", | ||
"offer": "WindowsServer", | ||
"sku": "2019-Datacenter", | ||
"version": "latest" | ||
}, | ||
"osDisk": { | ||
"createOption": "FromImage" | ||
}, | ||
"dataDisks": [] | ||
}, | ||
"osProfile": { | ||
"computerName": "vm1", | ||
"adminUsername": "adminuser", | ||
"adminPassword": "Password123!" | ||
}, | ||
"networkProfile": { | ||
"networkInterfaces": [ | ||
{ | ||
"id": "[resourceId('Microsoft.Network/networkInterfaces', 'nic1')]" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Network/virtualNetworks", | ||
"apiVersion": "2020-06-01", | ||
"name": "VNet1", | ||
"location": "westus", | ||
"properties": { | ||
"addressSpace": { | ||
"addressPrefixes": ["10.0.0.0/16"] | ||
}, | ||
"subnets": [ | ||
{ | ||
"name": "Subnet1", | ||
"properties": { | ||
"addressPrefix": "10.0.1.0/24" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "Microsoft.Network/virtualNetworks/subnets", | ||
"apiVersion": "2020-06-01", | ||
"name": "Subnet1", | ||
"dependsOn": [ | ||
"Microsoft.Network/virtualNetworks/VNet1" | ||
], | ||
"properties": { | ||
"addressPrefix": "10.0.1.0/24" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.