feat: new nacl module improved with Qoder
This commit is contained in:
@@ -1,23 +1,73 @@
|
||||
# nacl module
|
||||
This module takes in list(list(string)) and construct NACL using dynamic block.
|
||||
<!-- This readme file is generated with terraform-docs -->
|
||||
## Example
|
||||
|
||||
Example code in root module
|
||||
```hcl
|
||||
module "nacl" {
|
||||
source = "../../modules/networking/nacl"
|
||||
source = "../"
|
||||
|
||||
# comma-separated values with this field definition
|
||||
# protocol,from_port,to_port,source_cidr,action
|
||||
egress_rules = [
|
||||
["210", "-1", "0", "0", "10.29.0.0/16", "allow"],
|
||||
["220", "tcp", "443", "443", "10.35.32.0/22", "allow"],
|
||||
["230", "udp", "53", "53", "10.35.67.0/24", "allow"]
|
||||
"-1,0,0,10.29.0.0/16,allow", # IPv4 - All traffic
|
||||
"tcp,443,443,10.35.32.0/22,allow", # IPv4 - HTTPS
|
||||
"udp,53,53,10.35.67.0/24,allow" # IPv4 - DNS
|
||||
]
|
||||
# comma-separated values with this field definition
|
||||
# protocol,from_port,to_port,source_cidr,action
|
||||
ingress_rules = [
|
||||
["310", "-1", "0", "0", "10.29.0.0/16", "allow"],
|
||||
["320", "tcp", "80", "81", "10.35.32.0/22", "allow"],
|
||||
["330", "udp", "53", "53", "10.35.67.0/24", "allow"]
|
||||
"-1,0,0,10.29.0.0/16,allow", # IPv4 - All traffic
|
||||
"tcp,22,22,10.0.0.0/8,allow", # IPv4 - SSH
|
||||
"tcp,443,443,2001:db8::/32,allow" # IPv6 - HTTPS
|
||||
]
|
||||
subnet_ids = ["subnet-0927ba1b06ccfe6c5", "subnet-0551e96ffd016192a"]
|
||||
vpc_id = "vpc-01a10b033169f89a8"
|
||||
acl_name = "test-nacl"
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
# nacl module
|
||||
|
||||
Code reviewed and improved with Qoder
|
||||
|
||||
## Requirements
|
||||
|
||||
No requirements.
|
||||
|
||||
## Providers
|
||||
|
||||
| Name | Version |
|
||||
| ---- | ------- |
|
||||
| aws | n/a |
|
||||
|
||||
## Modules
|
||||
|
||||
No modules.
|
||||
|
||||
## Resources
|
||||
|
||||
| Name | Type |
|
||||
| ---- | ---- |
|
||||
| [aws_network_acl.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_acl) | resource |
|
||||
| [aws_network_acl_rule.egress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_acl_rule) | resource |
|
||||
| [aws_network_acl_rule.ingress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_acl_rule) | resource |
|
||||
|
||||
## Inputs
|
||||
|
||||
| Name | Description | Type | Default | Required |
|
||||
| ---- | ----------- | ---- | ------- | :------: |
|
||||
| acl\_name | ACL name tag | `string` | n/a | yes |
|
||||
| egress\_rules | Egress rules. See example | `list(string)` | n/a | yes |
|
||||
| ingress\_rules | Ingress rules. See example | `list(string)` | n/a | yes |
|
||||
| subnet\_ids | IDs of subnet to be associated with the nacl | `list(string)` | n/a | yes |
|
||||
| vpc\_id | VPC ID | `string` | n/a | yes |
|
||||
|
||||
## Outputs
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| nacl\_arn | n/a |
|
||||
| nacl\_id | n/a |
|
||||
|
||||
---
|
||||
## Authorship
|
||||
This module was developed by xpk.
|
||||
Reference in New Issue
Block a user