Skip to content

Commit 4e0cff5

Browse files
authored
Merge pull request #264704 from ktoliver/202888
[AQ] edit pass: Four Defender for Cloud articles (work item 202888)
2 parents f88143f + 7e24386 commit 4e0cff5

30 files changed

+411
-337
lines changed

articles/defender-for-cloud/continuous-export.md

Lines changed: 134 additions & 108 deletions
Large diffs are not rendered by default.

articles/defender-for-cloud/custom-dashboards-azure-workbooks.md

Lines changed: 141 additions & 125 deletions
Large diffs are not rendered by default.
Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,73 @@
11
---
2-
title: Map IaC templates from code to cloud
3-
description: Learn how to map your Infrastructure as Code templates to your cloud resources.
2+
title: Map Infrastructure as Code templates from code to cloud
3+
description: Learn how to map your Infrastructure as Code (IaC) templates to your cloud resources.
44
ms.date: 11/03/2023
55
ms.topic: how-to
66
ms.custom: ignite-2023
77
---
88

99
# Map Infrastructure as Code templates to cloud resources
1010

11-
Mapping Infrastructure as Code (IaC) templates to cloud resources ensures consistent, secure, and auditable infrastructure provisioning. It enables rapid response to security threats and a security-by-design approach. If there are misconfigurations in runtime resources, this mapping allows remediation at the template level, ensuring no drift and facilitating deployment via CI/CD methodology.
11+
Mapping Infrastructure as Code (IaC) templates to cloud resources helps you ensure consistent, secure, and auditable infrastructure provisioning. It supports rapid response to security threats and a security-by-design approach. You can use mapping to discover misconfigurations in runtime resources. Then, remediate at the template level to help ensure no drift and to facilitate deployment via CI/CD methodology.
1212

1313
## Prerequisites
1414

15-
To allow Microsoft Defender for Cloud to map Infrastructure as Code template to cloud resources, you need:
15+
To set Microsoft Defender for Cloud to map IaC templates to cloud resources, you need:
1616

17-
- 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).
18-
- [Azure DevOps](quickstart-onboard-devops.md) environment onboarded into Microsoft Defender for Cloud.
17+
- An Azure account with Defender for Cloud configured. If you don't already have an Azure account, [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
18+
- An [Azure DevOps](quickstart-onboard-devops.md) environment set up in Defender for Cloud.
1919
- [Defender Cloud Security Posture Management (CSPM)](tutorial-enable-cspm-plan.md) enabled.
20-
- Configure your Azure Pipelines to run [Microsoft Security DevOps Azure DevOps extension](azure-devops-extension.md).
21-
- 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)
22-
- Supported cloud platforms: AWS, Azure, GCP.
23-
- Supported source code management systems: Azure DevOps.
24-
- Supported template languages: Azure Resource Manager, Bicep, CloudFormation, Terraform.
20+
- Azure Pipelines set up to run the [Microsoft Security DevOps Azure DevOps extension](azure-devops-extension.md).
21+
- IaC templates and cloud resources set up with tag support. You can use open-source tools like [Yor_trace](https://github.com/bridgecrewio/yor) to automatically tag IaC templates.
22+
- Supported cloud platforms: Microsoft Azure, Amazon Web Services, Google Cloud Platform
23+
- Supported source code management systems: Azure DevOps
24+
- Supported template languages: Azure Resource Manager, Bicep, CloudFormation, Terraform
2525

2626
> [!NOTE]
27-
> Microsoft Defender for Cloud will only use the following tags from Infrastructure as Code templates for mapping:
28-
29-
> - yor_trace
30-
> - mapping_tag
27+
> Microsoft Defender for Cloud uses only the following tags from IaC templates for mapping:
28+
>
29+
> - `yor_trace`
30+
> - `mapping_tag`
3131
3232
## See the mapping between your IaC template and your cloud resources
3333

34-
To see the mapping between your IaC template and your cloud resources in the [Cloud Security Explorer](how-to-manage-cloud-security-explorer.md):
34+
To see the mapping between your IaC template and your cloud resources in [Cloud Security Explorer](how-to-manage-cloud-security-explorer.md):
3535

3636
1. Sign in to the [Azure portal](https://portal.azure.com/).
37+
3738
1. Go to **Microsoft Defender for Cloud** > **Cloud Security Explorer**.
38-
1. Search for and select all your cloud resources from the drop-down menu.
39-
1. Select + to add other filters to your query.
40-
1. Add the subfilter **Provisioned by** from the category **Identity & Access**.
41-
1. Select **Code repositories** from the category **DevOps**.
42-
1. After building your query, select **Search** to run the query.
4339

44-
Alternatively, you can use the built-in template named “Cloud resources provisioned by IaC templates with high severity misconfigurations”.
40+
1. In the dropdown menu, search for and select all your cloud resources.
41+
42+
1. To add more filters to your query, select **+**.
43+
44+
1. In the **Identity & Access** category, add the subfilter **Provisioned by**.
45+
46+
1. In the **DevOps** category, select **Code repositories**.
47+
48+
1. After you build your query, select **Search** to run the query.
4549

46-
![Screenshot of IaC Mapping Cloud Security Explorer template.](media/iac-template-mapping/iac-mapping.png)
50+
Alternatively, select the built-in template **Cloud resources provisioned by IaC templates with high severity misconfigurations**.
51+
52+
:::image type="content" source="media/iac-template-mapping/iac-mapping.png" alt-text="Screenshot that shows the IaC mapping Cloud Security Explorer template.":::
4753

4854
> [!NOTE]
49-
> 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.
55+
> Mapping between your IaC templates and your cloud resources might take up to 12 hours to appear in Cloud Security Explorer.
5056
5157
## (Optional) Create sample IaC mapping tags
5258

53-
To create sample IaC mapping tags within your code repositories, follow these steps:
59+
To create sample IaC mapping tags in your code repositories:
60+
61+
1. In your repository, add an IaC template that includes tags.
62+
63+
You can start with a [sample template](https://github.com/microsoft/security-devops-azdevops/tree/main/samples/IaCMapping).
64+
65+
1. To commit directly to the main branch or create a new branch for this commit, select **Save**.
66+
67+
1. Confirm that you included the **Microsoft Security DevOps** task in your Azure pipeline.
5468

55-
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).
56-
1. Select **save** to commit directly to the main branch or create a new branch for this commit.
57-
1. Include the **Microsoft Security DevOps** task in your Azure pipeline.
58-
1. 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.
69+
1. Verify that pipeline logs show a finding that says **An IaC tag(s) was found on this resource**. The finding indicates that Defender for Cloud successfully discovered tags.
5970

60-
## Next steps
71+
## Related content
6172

6273
- Learn more about [DevOps security in Defender for Cloud](defender-for-devops-introduction.md).

0 commit comments

Comments
 (0)