Skip to content

lonegunmanb/terraform-azurerm-avm-ptn-mdc-defender-plans-azure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-azurerm-avm-ptn-mdc-defender-plans-azure

-> NOTE: When running the module, your subscription should not already be onboarded to MDC. If you have already completed the onboarding process, please refer to the Onboarded Azure Subscription section.

~> NOTE: Deletion of the resource will reset the pricing tier to Free

Onboarding to Microsoft Defender for Cloud (MDC) plans in Azure

This Terraform module activate Microsoft Defender for Cloud (MDC) plans.

The module supports the following onboarding types:

  1. Single Subscription: Onboard MDC plans for a single subscription.
  2. Chosen Subscriptions: Onboard MDC plans for a selected list of subscriptions.
  3. All Subscriptions: Onboard MDC plans for all subscriptions where your account holds owner permissions.
  4. Management Group: Onboard MDC plans for all subscriptions within a designated management group.

Terraform and terraform-provider-azurerm version restrictions

Terraform core's version is v1.x and terraform-provider-azurerm's version is v3.x.

Usage

Enable plans

To enable plans using this module, follow these steps based on the subscription type:

Single Subscription

  1. Navigate to examples\default folder.
  2. Execute the terraform apply command.
  3. Your onboarding will be applied exclusively to the subscription you are currently connected to.

Chosen Subscriptions / All Subscriptions / Management Group

  1. Enter the relevant folder under examples based on your scenario.
  2. Execute the terraform apply command.
  3. After the execution, a new directory named output will be generated within the example folder.
  4. Access the newly created output folder.
  5. Modify the main.tf file within this folder to align with your specific requirements.
  6. Execute the terraform apply command again to apply your modifications.

Disable plans

  • To disable all plans execute terraform destroy command.
  • To disable a specific plan, remove the plan name from mdc_plans_list var and execute terraform apply command.

Onboarded Azure Subscription

We recommend managing the entire onboarding process with our module. If you've already onboarded your Azure Subscription to Microsoft Defender for Cloud plans, you have several options:

Azure Defender Plans UI Portal

  • Manual Cleanup: Manually toggle off the status of all MDC plans.

Terraform CLI

  • Start Fresh: You can choose to destroy your current Terraform environment and begin anew.
  • Import Existing Resources: Utilize Terraform import to seamlessly integrate existing resources into Terraform management.
  • Manage Multiple Terraform States: Maintain your current state and create a new one for this module, allowing for efficient resource management.

Requirements

The following requirements are needed by this module:

Resources

The following resources are used by this module:

Required Inputs

The following input variables are required:

Description: The location/region where the policy should exist.

Type: string

Optional Inputs

The following input variables are optional (have default values):

Description: (Optional) Resource type pricing default subplan. Contact your MSFT representative for possible values

Type: string

Default: null

Description: (Optional) The pricing tier to use. Possible values are Free and Standard

Type: string

Default: "Standard"

Description: This variable controls whether or not telemetry is enabled for the module.
For more information see https://aka.ms/avm/telemetryinfo.
If it is set to false, then no telemetry will be collected.

Type: bool

Default: true

Description: (Optional) Set of all MDC databases plans

Type: set(string)

Default:

[
  "OpenSourceRelationalDatabases",
  "SqlServers",
  "SqlServerVirtualMachines",
  "CosmosDbs"
]

Description: (Optional) Set of all MDC plans

Type: set(string)

Default:

[
  "AppServices",
  "Arm",
  "CloudPosture",
  "Containers",
  "KeyVaults",
  "OpenSourceRelationalDatabases",
  "SqlServers",
  "SqlServerVirtualMachines",
  "CosmosDbs",
  "StorageAccounts",
  "VirtualMachines",
  "Api"
]

Description: (Optional) Sets the maximum GB limit for malware scanning on uploaded files per storage account per month

Type: string

Default: "5000"

Description: (Optional) A map of resource type pricing subplan, the key is resource type. This variable takes precedence over var.default_subplan. Contact your MSFT representative for possible values

Type: map(string)

Default: {}

Description: Whether enable tracing tags that generated by BridgeCrew Yor.

Type: bool

Default: false

Description: Default prefix for generated tracing tags

Type: string

Default: "avm_"

Outputs

The following outputs are exported:

Description: All plans details

Description: The subscription pricing ID

Modules

No modules.

Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published