Skip to content

Commit

Permalink
fix: lacework-global-534 (#100)
Browse files Browse the repository at this point in the history
* fix: lacework-global-534

Signed-off-by: Darren Murray <[email protected]>

* fix: lacework-global-534

Signed-off-by: Darren Murray <[email protected]>

* fix: lacework-global-534

Signed-off-by: Darren Murray <[email protected]>

* docs: run make terraform-docs

Signed-off-by: Darren Murray <[email protected]>

* fix: lacework-global-534

Signed-off-by: Darren Murray <[email protected]>

---------

Signed-off-by: Darren Murray <[email protected]>
  • Loading branch information
dmurray-lacework authored Feb 12, 2024
1 parent 65b948a commit ef88784
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ It configures a Diagnostic Setting that puts logs in an storage account, from wh
|------|------|
| [azurerm_eventgrid_event_subscription.lacework](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/eventgrid_event_subscription) | resource |
| [azurerm_monitor_diagnostic_setting.lacework](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_diagnostic_setting) | resource |
| [azurerm_private_endpoint.lacework](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint) | resource |
| [azurerm_resource_group.lacework](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group) | resource |
| [azurerm_role_assignment.lacework](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
| [azurerm_role_definition.lacework](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_definition) | resource |
| [azurerm_storage_account.lacework](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account) | resource |
| [azurerm_storage_account_network_rules.lacework](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account_network_rules) | resource |
| [azurerm_storage_queue.lacework](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_queue) | resource |
| [azurerm_subnet.lacework](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet) | resource |
| [azurerm_virtual_network.lacework](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network) | resource |
| [lacework_integration_azure_al.lacework](https://registry.terraform.io/providers/lacework/lacework/latest/docs/resources/integration_azure_al) | resource |
| [random_id.uniq](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) | resource |
| [time_sleep.wait_time](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |
Expand Down
2 changes: 1 addition & 1 deletion examples/default-activity-log/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ provider "lacework" {}

module "az_activity_log" {
source = "../../"
}
}
35 changes: 35 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ resource "azurerm_storage_account_network_rules" "lacework" {
ip_rules = concat(var.storage_account_network_rule_ip_rules,
var.storage_account_network_rule_lacework_ip_rules)

virtual_network_subnet_ids = [azurerm_subnet.lacework.id]

depends_on = [azurerm_storage_queue.lacework]
}

Expand Down Expand Up @@ -225,3 +227,36 @@ data "lacework_metric_module" "lwmetrics" {
name = local.module_name
version = local.module_version
}

# virtual network and subnet
resource "azurerm_virtual_network" "lacework" {
name = "lacework-vnet"
address_space = ["10.0.0.0/16"]
location = azurerm_resource_group.lacework[0].location
resource_group_name = azurerm_resource_group.lacework[0].name
}

resource "azurerm_subnet" "lacework" {
name = "lacework-subnet"
resource_group_name = azurerm_resource_group.lacework[0].name
virtual_network_name = azurerm_virtual_network.lacework.name
address_prefixes = ["10.0.1.0/24"]
service_endpoints = ["Microsoft.Storage"]

enforce_private_link_endpoint_network_policies = true
}

resource "azurerm_private_endpoint" "lacework" {
name = "lacework-private-endpoint"
location = azurerm_resource_group.lacework[0].location
resource_group_name = azurerm_resource_group.lacework[0].name
subnet_id = azurerm_subnet.lacework.id

private_service_connection {
name = "lacework-privateserviceconnection"
is_manual_connection = false
private_connection_resource_id = local.storage_account_id
subresource_names = ["queue"]
}
}

0 comments on commit ef88784

Please sign in to comment.