Skip to content

Commit

Permalink
Azure blueprint module for security center
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentLesle committed May 1, 2019
1 parent cedd153 commit 703e706
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/.terraform
**/*.tfstate
.DS_Store
**/terraform.tfstate.d
**/terraform.tfstate.backup
**/.terraform.tfstate.lock.info
19 changes: 19 additions & 0 deletions securitycenter.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
resource "azurerm_security_center_contact" "contact" {
email = "${var.contact_email}"
phone = "${var.contact_phone}"

alert_notifications = true
alerts_to_admins = true
}

resource "azurerm_security_center_subscription_pricing" "sc" {
tier = "Standard"
}

resource "azurerm_security_center_workspace" "sc" {
scope = "${var.scope_id}"
workspace_id = "${var.workspace_id}"

depends_on = ["azurerm_security_center_subscription_pricing.sc"]
}

15 changes: 15 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
variable "contact_email" {
description = "(Required) Email address of the distribution list"
}

variable "contact_phone" {
description = "(Required) Phone number of the security team"
}

variable "scope_id" {
description = "(Required) The scope at which the Role Assignment applies too, such as /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333, /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup, or /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM."
}

variable "workspace_id" {
description = "(Required) Azure Monitor workspace ID"
}

0 comments on commit 703e706

Please sign in to comment.