diff --git a/CHANGELOG.md b/CHANGELOG.md index d750817..82e7729 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ **Merged pull requests:** +- support space inside source\_port\_range [\#108](https://github.com/Azure/terraform-azurerm-network-security-group/pull/108) ([lonegunmanb](https://github.com/lonegunmanb)) - Bump github.com/Azure/terraform-module-test-helper from 0.12.0 to 0.13.0 in /test [\#105](https://github.com/Azure/terraform-azurerm-network-security-group/pull/105) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump github.com/Azure/terraform-module-test-helper from 0.10.0 to 0.12.0 in /test [\#103](https://github.com/Azure/terraform-azurerm-network-security-group/pull/103) ([dependabot[bot]](https://github.com/apps/dependabot)) diff --git a/examples/ActiveDirectory/TestRecord.md b/examples/ActiveDirectory/TestRecord.md index 59dc88e..f4fe99c 100644 --- a/examples/ActiveDirectory/TestRecord.md +++ b/examples/ActiveDirectory/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:59 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:44 UTC Success: true diff --git a/examples/Cassandra-JMX/TestRecord.md b/examples/Cassandra-JMX/TestRecord.md index 44d65ec..2aad9a0 100644 --- a/examples/Cassandra-JMX/TestRecord.md +++ b/examples/Cassandra-JMX/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:54 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:40 UTC Success: true diff --git a/examples/Cassandra-Thrift/TestRecord.md b/examples/Cassandra-Thrift/TestRecord.md index 3df59aa..9cfdf8a 100644 --- a/examples/Cassandra-Thrift/TestRecord.md +++ b/examples/Cassandra-Thrift/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:51 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:38 UTC Success: true diff --git a/examples/Cassandra/TestRecord.md b/examples/Cassandra/TestRecord.md index 0aa0727..6d08344 100644 --- a/examples/Cassandra/TestRecord.md +++ b/examples/Cassandra/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:56 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:42 UTC Success: true diff --git a/examples/CouchDB-HTTPS/TestRecord.md b/examples/CouchDB-HTTPS/TestRecord.md index ba2cfd2..088100f 100644 --- a/examples/CouchDB-HTTPS/TestRecord.md +++ b/examples/CouchDB-HTTPS/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:48 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:34 UTC Success: true diff --git a/examples/CouchDB/TestRecord.md b/examples/CouchDB/TestRecord.md index 6df2b76..c53ceeb 100644 --- a/examples/CouchDB/TestRecord.md +++ b/examples/CouchDB/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:49 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:36 UTC Success: true diff --git a/examples/Custom-Rules/TestRecord.md b/examples/Custom-Rules/TestRecord.md index 5386019..4816b1b 100644 --- a/examples/Custom-Rules/TestRecord.md +++ b/examples/Custom-Rules/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:45 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:32 UTC Success: true diff --git a/examples/DNS-TCP/TestRecord.md b/examples/DNS-TCP/TestRecord.md index 8328867..733fc19 100644 --- a/examples/DNS-TCP/TestRecord.md +++ b/examples/DNS-TCP/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:44 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:30 UTC Success: true diff --git a/examples/DNS-UDP/TestRecord.md b/examples/DNS-UDP/TestRecord.md index ac481bd..58594fc 100644 --- a/examples/DNS-UDP/TestRecord.md +++ b/examples/DNS-UDP/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:40 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:29 UTC Success: true diff --git a/examples/DNS-UDP/variables.tf b/examples/DNS-UDP/variables.tf index 49e32cc..529367f 100644 --- a/examples/DNS-UDP/variables.tf +++ b/examples/DNS-UDP/variables.tf @@ -1,26 +1,12 @@ variable "custom_rules" { - description = "Custom set of security rules using this format" type = list(any) default = [] - - # Example: - # custom_rules = [{ - # name = "myssh" - # priority = "101" - # direction = "Inbound" - # access = "Allow" - # protocol = "tcp" - # source_port_range = "1234" - # destination_port_range = "22" - # description = "description-myssh" - #}] + description = "Custom set of security rules using this format" } variable "destination_address_prefix" { type = list(any) default = ["*"] - - # Example: ["10.0.3.0/32","10.0.3.128/32"] } variable "location" { @@ -34,26 +20,24 @@ variable "resource_group_name" { } variable "security_group_name" { - description = "Name of the network security group" default = "nsg" + description = "Name of the network security group" } variable "source_address_prefix" { type = list(any) default = ["*"] - - # Example: ["10.0.3.0/24"] } variable "tags" { - description = "The tags to associate with your network security group." type = map(string) default = {} + description = "The tags to associate with your network security group." } variable "use_for_each" { - description = "Choose wheter to use 'for_each' as iteration technic to generate the rules, defaults to false so we will use 'count' for compatibilty with previous module versions, but prefered method is 'for_each'" type = bool default = false + description = "Choose wheter to use 'for_each' as iteration technic to generate the rules, defaults to false so we will use 'count' for compatibilty with previous module versions, but prefered method is 'for_each'" nullable = false -} \ No newline at end of file +} diff --git a/examples/DynamicPorts/TestRecord.md b/examples/DynamicPorts/TestRecord.md index 4c7d4a8..a3e5cf9 100644 --- a/examples/DynamicPorts/TestRecord.md +++ b/examples/DynamicPorts/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:35 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:26 UTC Success: true diff --git a/examples/ElasticSearch/TestRecord.md b/examples/ElasticSearch/TestRecord.md index cb32aee..3515292 100644 --- a/examples/ElasticSearch/TestRecord.md +++ b/examples/ElasticSearch/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:41 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:26 UTC Success: true diff --git a/examples/FTP/TestRecord.md b/examples/FTP/TestRecord.md index 36c15f2..815c058 100644 --- a/examples/FTP/TestRecord.md +++ b/examples/FTP/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:30 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:23 UTC Success: true diff --git a/examples/HTTP/TestRecord.md b/examples/HTTP/TestRecord.md index 2ffa711..5927133 100644 --- a/examples/HTTP/TestRecord.md +++ b/examples/HTTP/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:28 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:21 UTC Success: true diff --git a/examples/HTTPS/TestRecord.md b/examples/HTTPS/TestRecord.md index 3d44087..c4a987e 100644 --- a/examples/HTTPS/TestRecord.md +++ b/examples/HTTPS/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:26 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:19 UTC Success: true diff --git a/examples/IMAP/TestRecord.md b/examples/IMAP/TestRecord.md index 58ddab7..b279da5 100644 --- a/examples/IMAP/TestRecord.md +++ b/examples/IMAP/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:25 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:17 UTC Success: true diff --git a/examples/IMAPS/TestRecord.md b/examples/IMAPS/TestRecord.md index b4c0927..b698ab1 100644 --- a/examples/IMAPS/TestRecord.md +++ b/examples/IMAPS/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:23 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:15 UTC Success: true diff --git a/examples/Kestrel/TestRecord.md b/examples/Kestrel/TestRecord.md index def8525..b405551 100644 --- a/examples/Kestrel/TestRecord.md +++ b/examples/Kestrel/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:21 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:12 UTC Success: true diff --git a/examples/LDAP/TestRecord.md b/examples/LDAP/TestRecord.md index 3b4974c..87ae32d 100644 --- a/examples/LDAP/TestRecord.md +++ b/examples/LDAP/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 07:21 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:11 UTC Success: true diff --git a/examples/MSSQL/TestRecord.md b/examples/MSSQL/TestRecord.md index db0982f..12716ba 100644 --- a/examples/MSSQL/TestRecord.md +++ b/examples/MSSQL/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:32 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 01:17 UTC Success: true diff --git a/examples/Memcached/TestRecord.md b/examples/Memcached/TestRecord.md index 38fe125..f76dd76 100644 --- a/examples/Memcached/TestRecord.md +++ b/examples/Memcached/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:31 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 01:15 UTC Success: true diff --git a/examples/MongoDB/TestRecord.md b/examples/MongoDB/TestRecord.md index 51cd674..3ad3b5f 100644 --- a/examples/MongoDB/TestRecord.md +++ b/examples/MongoDB/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:29 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 01:13 UTC Success: true diff --git a/examples/MySQL/TestRecord.md b/examples/MySQL/TestRecord.md index 7a4babb..415c137 100644 --- a/examples/MySQL/TestRecord.md +++ b/examples/MySQL/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:28 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 01:13 UTC Success: true diff --git a/examples/Neo4J/TestRecord.md b/examples/Neo4J/TestRecord.md index cf08b5e..0766599 100644 --- a/examples/Neo4J/TestRecord.md +++ b/examples/Neo4J/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:25 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 01:10 UTC Success: true diff --git a/examples/POP3/TestRecord.md b/examples/POP3/TestRecord.md index f231e5b..6295213 100644 --- a/examples/POP3/TestRecord.md +++ b/examples/POP3/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:24 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 01:08 UTC Success: true diff --git a/examples/POP3S/TestRecord.md b/examples/POP3S/TestRecord.md index a52f25f..7a3cc37 100644 --- a/examples/POP3S/TestRecord.md +++ b/examples/POP3S/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:22 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 01:05 UTC Success: true diff --git a/examples/PostgreSQL/TestRecord.md b/examples/PostgreSQL/TestRecord.md index 70e5f7e..56c45a6 100644 --- a/examples/PostgreSQL/TestRecord.md +++ b/examples/PostgreSQL/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:20 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 01:03 UTC Success: true diff --git a/examples/RDP/TestRecord.md b/examples/RDP/TestRecord.md index 896a6cd..7a64a72 100644 --- a/examples/RDP/TestRecord.md +++ b/examples/RDP/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:18 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 01:01 UTC Success: true diff --git a/examples/RabbitMQ/TestRecord.md b/examples/RabbitMQ/TestRecord.md index 3e7ab08..a3891e0 100644 --- a/examples/RabbitMQ/TestRecord.md +++ b/examples/RabbitMQ/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:15 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:59 UTC Success: true diff --git a/examples/Redis/TestRecord.md b/examples/Redis/TestRecord.md index 970a0d2..051731b 100644 --- a/examples/Redis/TestRecord.md +++ b/examples/Redis/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:14 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:58 UTC Success: true diff --git a/examples/Riak-JMX/TestRecord.md b/examples/Riak-JMX/TestRecord.md index e8e8fd9..1689bb3 100644 --- a/examples/Riak-JMX/TestRecord.md +++ b/examples/Riak-JMX/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:09 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:53 UTC Success: true diff --git a/examples/Riak/TestRecord.md b/examples/Riak/TestRecord.md index 12473a4..35232d4 100644 --- a/examples/Riak/TestRecord.md +++ b/examples/Riak/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:11 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:55 UTC Success: true diff --git a/examples/SMTP/TestRecord.md b/examples/SMTP/TestRecord.md index 208fc54..5aab58b 100644 --- a/examples/SMTP/TestRecord.md +++ b/examples/SMTP/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:07 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:52 UTC Success: true diff --git a/examples/SMTPS/TestRecord.md b/examples/SMTPS/TestRecord.md index 7e4591c..f031b9b 100644 --- a/examples/SMTPS/TestRecord.md +++ b/examples/SMTPS/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:05 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:49 UTC Success: true diff --git a/examples/SSH/TestRecord.md b/examples/SSH/TestRecord.md index 91a7511..bafea2f 100644 --- a/examples/SSH/TestRecord.md +++ b/examples/SSH/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:04 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:48 UTC Success: true diff --git a/examples/WinRM/TestRecord.md b/examples/WinRM/TestRecord.md index 365ccee..f7b4b0f 100644 --- a/examples/WinRM/TestRecord.md +++ b/examples/WinRM/TestRecord.md @@ -1,3 +1,20 @@ +## 06 May 23 08:01 UTC + +Success: true + +### Versions + +Terraform v1.4.5 +on linux_amd64 ++ provider registry.terraform.io/hashicorp/azurerm v3.55.0 ++ provider registry.terraform.io/hashicorp/random v3.5.1 + +### Error + + + +--- + ## 07 May 23 00:45 UTC Success: true diff --git a/outputs.tf b/outputs.tf index 8e4308b..454b33b 100644 --- a/outputs.tf +++ b/outputs.tf @@ -6,4 +6,4 @@ output "network_security_group_id" { output "network_security_group_name" { description = "The name of newly created network security group" value = azurerm_network_security_group.nsg.name -} \ No newline at end of file +} diff --git a/variables.tf b/variables.tf index 833bbe1..d2b17a3 100644 --- a/variables.tf +++ b/variables.tf @@ -1,47 +1,45 @@ # Network Security Group definition variable "resource_group_name" { - description = "Name of the resource group" type = string + description = "Name of the resource group" } # Custom security rules # [name, priority, direction, access, protocol, source_port_range, destination_port_range, description]" # All the fields are required. variable "custom_rules" { - description = "Security rules for the network security group using this format name = [name, priority, direction, access, protocol, source_port_range, destination_port_range, source_address_prefix, destination_address_prefix, description]" type = any default = [] + description = "Security rules for the network security group using this format name = [name, priority, direction, access, protocol, source_port_range, destination_port_range, source_address_prefix, destination_address_prefix, description]" } variable "destination_address_prefix" { - description = "Destination address prefix to be applied to all predefined rules. list(string) only allowed one element (CIDR, `*`, source IP range or Tags). Example [\"10.0.3.0/24\"] or [\"VirtualNetwork\"]" type = list(string) default = ["*"] + description = "Destination address prefix to be applied to all predefined rules. list(string) only allowed one element (CIDR, `*`, source IP range or Tags). Example [\"10.0.3.0/24\"] or [\"VirtualNetwork\"]" } variable "destination_address_prefixes" { - description = "Destination address prefix to be applied to all predefined rules. Example [\"10.0.3.0/32\",\"10.0.3.128/32\"]" type = list(string) default = null + description = "Destination address prefix to be applied to all predefined rules. Example [\"10.0.3.0/32\",\"10.0.3.128/32\"]" } variable "location" { - description = "Location (Azure Region) for the network security group." # No default - if it's not specified, use the resource group location (see main.tf) - type = string - default = "" + type = string + default = "" + description = "Location (Azure Region) for the network security group." } variable "predefined_rules" { - description = "Predefined rules" type = any default = [] + description = "Predefined rules" } variable "rules" { - description = "Standard set of predefined rules" - type = map(any) - + type = map(any) # [direction, access, protocol, source_port_range, destination_port_range, description]" # The following info are in the submodules: source_address_prefix, destination_address_prefix default = { @@ -162,35 +160,36 @@ variable "rules" { #WinRM WinRM = ["Inbound", "Allow", "Tcp", "*", "5986", "WinRM"] } + description = "Standard set of predefined rules" } variable "security_group_name" { - description = "Network security group name" type = string default = "nsg" + description = "Network security group name" } variable "source_address_prefix" { - description = "Source address prefix to be applied to all predefined rules. list(string) only allowed one element (CIDR, `*`, source IP range or Tags). Example [\"10.0.3.0/24\"] or [\"VirtualNetwork\"]" type = list(string) default = ["*"] + description = "Source address prefix to be applied to all predefined rules. list(string) only allowed one element (CIDR, `*`, source IP range or Tags). Example [\"10.0.3.0/24\"] or [\"VirtualNetwork\"]" } variable "source_address_prefixes" { - description = "Destination address prefix to be applied to all predefined rules. Example [\"10.0.3.0/32\",\"10.0.3.128/32\"]" type = list(string) default = null + description = "Destination address prefix to be applied to all predefined rules. Example [\"10.0.3.0/32\",\"10.0.3.128/32\"]" } variable "tags" { - description = "The tags to associate with your network security group." type = map(string) default = {} + description = "The tags to associate with your network security group." } variable "use_for_each" { - description = "Choose wheter to use 'for_each' as iteration technic to generate the rules, defaults to false so we will use 'count' for compatibilty with previous module versions, but prefered method is 'for_each'" type = bool default = false + description = "Choose wheter to use 'for_each' as iteration technic to generate the rules, defaults to false so we will use 'count' for compatibilty with previous module versions, but prefered method is 'for_each'" nullable = false -} \ No newline at end of file +}