https://github.com/data-platform-hq/terraform-azurerm-network-security-group
Terraform module for creation of Azure Network Security Group
https://github.com/data-platform-hq/terraform-azurerm-network-security-group
azurerm network-security-groups terraform-module
Last synced: 4 months ago
JSON representation
Terraform module for creation of Azure Network Security Group
- Host: GitHub
- URL: https://github.com/data-platform-hq/terraform-azurerm-network-security-group
- Owner: data-platform-hq
- License: other
- Created: 2023-04-20T13:53:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-13T09:03:26.000Z (9 months ago)
- Last Synced: 2024-09-13T22:28:34.533Z (9 months ago)
- Topics: azurerm, network-security-groups, terraform-module
- Language: HCL
- Homepage: https://registry.terraform.io/modules/data-platform-hq/network-security-group/azurerm/latest
- Size: 29.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure Network Security Group Terraform module
Terraform module for creation Azure Network security group## Usage
This module provides an ability to deploy Azure Network security group, Below is an example on how to create nsg```hcl
locals {
security_rules = [{
name = "workspaces_UseOnly_databricks-worker-to-worker-inbound"
description = "Required for worker nodes communication within a cluster."
priority = 100
direction = "Inbound"
access = "Allow"
protocol = "*"
source_port_range = "*"
destination_port_range = "*"
source_address_prefix = "VirtualNetwork"
destination_address_prefix = "VirtualNetwork"
}]
}module "network_security_group" {
source = "data-platform-hq/terraform-azurerm-network-security-groupnsg_name = "example-name"
location = "eastus"
resource_group = "example-rg"
security_rules = local.security_rules
tags = {
environment = "example"
}
}
```## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0.0 |
| [azurerm](#requirement\_azurerm) | >= 4.0.1 |## Providers
| Name | Version |
|------|---------|
| [azurerm](#provider\_azurerm) | >= 4.0.1 |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [azurerm_network_security_group.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_group) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [location](#input\_location) | Specifies the supported Azure location where the resource exists | `string` | n/a | yes |
| [nsg\_name](#input\_nsg\_name) | Network Security Group name | `string` | n/a | yes |
| [resource\_group](#input\_resource\_group) | The name of the resource group in which resources is created | `string` | n/a | yes |
| [security\_rules](#input\_security\_rules) | List of objects representing security rules |list(object({| `[]` | no |
name = string
priority = number
direction = string
access = string
protocol = string
description = optional(string, null)
source_port_range = optional(string, null)
source_port_ranges = optional(list(string), [])
destination_port_range = optional(string, null)
destination_port_ranges = optional(list(string), [])
source_address_prefix = optional(string, null)
source_address_prefixes = optional(list(string), [])
destination_address_prefix = optional(string, null)
destination_address_prefixes = optional(list(string), [])
}))
| [tags](#input\_tags) | A mapping of tags to assign to the resource | `map(string)` | `{}` | no |## Outputs
| Name | Description |
|------|-------------|
| [id](#output\_id) | The ID of the Network Security Group |## License
Apache 2 Licensed. For more information please see [LICENSE](https://github.com/data-platform-hq/terraform-azurerm-network-security-group/blob/main/LICENSE)