Skip to content

Commit 3fcd6cd

Browse files
committed
update README.md
1 parent 5afaea1 commit 3fcd6cd

File tree

1 file changed

+54
-11
lines changed

1 file changed

+54
-11
lines changed

README.md

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,62 @@ This module has a few dependencies:
7474
**IMPORTANT:** Since the `master` branch used in `source` varies based on new modifications, we suggest that you use the release versions [here](https://github.com/clouddrove/terraform-aws-security-group/releases).
7575

7676

77-
### Simple Example
77+
### NEW_SECURITY_GROUP
7878
Here is an example of how you can use this module in your inventory structure:
7979
```hcl
8080
# use this
8181
module "security_group" {
8282
source = "clouddrove/security-group/aws"
8383
version = "1.3.0"
84-
name = "security-group"
85-
environment = "test"
86-
protocol = "tcp"
87-
label_order = ["name", "environment"]
88-
vpc_id = "vpc-xxxxxxxxx"
89-
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
90-
allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"]
91-
allowed_ports = [22, 27017]
84+
name = "security-group"
85+
environment = "test"
86+
label_order = ["name", "environment"]
87+
88+
vpc_id = module.vpc.vpc_id
89+
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
90+
allowed_ports = [22, 27017]
91+
security_groups = ["sg-xxxxxxxxxxxx"]
92+
prefix_list_ids = ["pl-xxxxxxxxxxxx"]
93+
}
94+
```
95+
### NEW_SECURITY_GROUP_WITH_EGRESS
96+
module "security_group" {
97+
source = "clouddrove/security-group/aws"
98+
version = "1.3.0"
99+
name = "security-group"
100+
environment = "test"
101+
label_order = ["name", "environment"]
102+
103+
vpc_id = module.vpc.vpc_id
104+
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
105+
allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"]
106+
allowed_ports = [22, 27017]
107+
security_groups = ["sg-xxxxxxxxx"]
108+
prefix_list_ids = ["pl-6da54004"]
109+
110+
egress_rule = true
111+
egress_allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
112+
egress_allowed_ports = [22, 27017]
113+
egress_protocol = "tcp"
114+
egress_prefix_list_ids = ["pl-xxxxxxxxx"]
115+
egress_security_groups = ["sg-xxxxxxxxx"]
116+
117+
}
118+
```
119+
### UPDATED_EXISTING
120+
module "security_group" {
121+
source = "clouddrove/security-group/aws"
122+
version = "1.3.0"
123+
name = "security-group"
124+
environment = "test"
125+
label_order = ["name", "environment"]
126+
127+
is_external = true
128+
existing_sg_id = "sg-xxxxxxxxxxxx"
129+
vpc_id = module.vpc.vpc_id
130+
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
131+
allowed_ports = [22, 27017]
132+
security_groups = ["sg-xxxxxxxxxxxxx"]
92133
}
93134
```
94135

@@ -102,12 +143,12 @@ Here is an example of how you can use this module in your inventory structure:
102143
| Name | Description | Type | Default | Required |
103144
|------|-------------|------|---------|:--------:|
104145
| allowed\_ip | List of allowed ip. | `list(any)` | `[]` | no |
105-
| allowed\_ipv6 | List of allowed ipv6. | `list(any)` | `[]` | no |
146+
| allowed\_ipv6 | List of allowed ipv6. | `list(any)` | <pre>[<br> "2405:201:5e00:3684:cd17:9397:5734:a167/128"<br>]</pre> | no |
106147
| allowed\_ports | List of allowed ingress ports | `list(any)` | `[]` | no |
107148
| attributes | Additional attributes (e.g. `1`). | `list(any)` | `[]` | no |
108149
| description | The security group description. | `string` | `"Instance default security group (only egress access is allowed)."` | no |
109150
| egress\_allowed\_ip | List of allowed ip. | `list(any)` | `[]` | no |
110-
| egress\_allowed\_ipv6 | List of allowed ipv6. | `list(any)` | `[]` | no |
151+
| egress\_allowed\_ipv6 | List of allowed ipv6. | `list(any)` | <pre>[<br> "2405:201:5e00:3684:cd17:9397:5734:a167/128"<br>]</pre> | no |
111152
| egress\_allowed\_ports | List of allowed ingress ports | `list(any)` | `[]` | no |
112153
| egress\_prefix\_list\_ids | List of prefix list IDs (for allowing access to VPC endpoints)Only valid with egress | `list(any)` | `[]` | no |
113154
| egress\_protocol | The protocol. If not icmp, tcp, udp, or all use the. | `string` | `"tcp"` | no |
@@ -124,6 +165,8 @@ Here is an example of how you can use this module in your inventory structure:
124165
| prefix\_list\_ids | Provide allow source Prefix id of resources | `list(string)` | `[]` | no |
125166
| protocol | The protocol. If not icmp, tcp, udp, or all use the. | `string` | `"tcp"` | no |
126167
| repository | Terraform current module repo | `string` | `"https://github.com/clouddrove/terraform-aws-security-group"` | no |
168+
| security\_group\_egress\_ipv6\_rule\_description | Represents a single ingress or egress group egress-ipv6 rule, which can be added to external Security Groups. | `string` | `"Description of the egress rule."` | no |
169+
| security\_group\_egress\_rule\_description | Represents a single ingress or egress group rule, which can be added to external Security Groups. | `string` | `"Description of the egress rule."` | no |
127170
| security\_groups | List of Security Group IDs allowed to connect to the instance. | `list(string)` | `[]` | no |
128171
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`). | `map(string)` | `{}` | no |
129172
| vpc\_id | The ID of the VPC that the instance security group belongs to. | `string` | `""` | no |

0 commit comments

Comments
 (0)