You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/defender-for-cloud/iac-template-mapping.md
+28-18Lines changed: 28 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,35 +16,45 @@ To allow Microsoft Defender for Cloud to map Infrastructure as Code template to
16
16
- An Azure account with Defender for Cloud onboarded. If you don't already have an Azure account, [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
17
17
-[Azure DevOps](quickstart-onboard-devops.md) environment onboarded into Microsoft Defender for Cloud.
- Tag your Infrastructure as Code templates and your cloud resources. (Open-source tools like [Yor_trace](https://github.com/bridgecrewio/yor) can be used to automatically tag Infrastructure as Code templates)
20
-
21
-
> [!NOTE]
22
-
> Microsoft Defender for Cloud will only use the following tags from Infrastructure as Code templates for mapping:
23
-
> - yor_trace
24
-
> - mapping_tag
25
-
- Configure your Azure pipelines to run [Microsoft Security DevOps Azure DevOps extension](azure-devops-extension.md).
19
+
- Configure your Azure Pipelines to run [Microsoft Security DevOps Azure DevOps extension](azure-devops-extension.md).
20
+
- Tag your supported Infrastructure as Code templates and your cloud resources. (Open-source tools like [Yor_trace](https://github.com/bridgecrewio/yor) can be used to automatically tag Infrastructure as Code templates)
> Microsoft Defender for Cloud will only use the following tags from Infrastructure as Code templates for mapping:
27
+
> - yor_trace
28
+
> - mapping_tag
26
29
27
30
## See the mapping between your IaC template and your cloud resources
28
31
29
-
To see ee the mapping between your IaC template and your cloud resources by using the [Cloud Security Explorer](how-to-manage-cloud-security-explorer.md):
32
+
To see the mapping between your IaC template and your cloud resources in the [Cloud Security Explorer](how-to-manage-cloud-security-explorer.md):
30
33
31
34
1. Sign in to the [Azure portal](https://portal.azure.com/).
35
+
2. Go to **Microsoft Defender for Cloud** > **Cloud Security Explorer**.
36
+
3. Search for and select all your cloud resources from the drop-down menu.
37
+
4. Select + to add other filters to your query.
38
+
5. Add the subfilter **Provisioned by** from the category **Identity & Access**.
39
+
6. Select **Code repositories** from the category **DevOps**.
40
+
7. After building your query, select **Search** to run the query.
32
41
33
-
1. Go to **Microsoft Defender for Cloud** > **Cloud Security Explorer**.
42
+
Alternatively, you can use the built-in template named “Cloud resources provisioned by IaC templates with high severity misconfigurations”.
34
43
35
-
1. Search for and select all your cloud resources from the drop-down menu
44
+

36
45
37
-
1. Select + to add other filters to your query.
38
-
39
-
1. Add the subfilter **Provisioned by** from the category **Identity & Access**.
46
+
> [!NOTE]
47
+
> Please note that mapping between your Infrastructure as Code templates to your cloud resources can take up to 12 hours to appear in the Cloud Security Explorer.
40
48
41
-
1. Select **Code repositories** from the category **DevOps**.
49
+
## (Optional) Create sample IaC mapping tags
42
50
43
-
1. After building your query, select **Search** to run the query.
51
+
To create sample IaC mapping tags within your code repositories, follow these steps:
44
52
45
-
> [!NOTE]
46
-
> Please note that mapping between your Infrastructure as Code templates to your cloud resources can take up to 12 hours to appear in the Cloud Security Explorer.
53
+
1. Add an **IaC template with tags** to your repository. To use an example template, see [here](https://github.com/microsoft/security-devops-azdevops/tree/main/samples/IaCMapping).
54
+
2. Select **save** to commit directly to the main branch or create a new branch for this commit.
55
+
3. Include the **Microsoft Security DevOps** task in your Azure pipeline.
56
+
4. Verify that the **pipeline logs** show a finding saying **“An IaC tag(s) was found on this resource”**. This means that Defender for Cloud successfully discovered tags.
47
57
48
58
## Next steps
49
59
50
-
- Learn more about [DevOps security in Defender for Cloud](defender-for-devops-introduction.md).
60
+
- Learn more about [DevOps security in Defender for Cloud](defender-for-devops-introduction.md).
0 commit comments