Skip to content

Commit 1979c67

Browse files
committed
update README.md
1 parent d0aa119 commit 1979c67

File tree

1 file changed

+45
-40
lines changed

1 file changed

+45
-40
lines changed

README.md

Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
<h1 align="center">
7-
Terraform AWS Security Group
7+
Terraform Module Security-Group
88
</h1>
99

1010
<p align="center" style="font-size: 1.2rem;">
@@ -13,17 +13,14 @@
1313

1414
<p align="center">
1515

16-
<a href="https://www.terraform.io">
17-
<img src="https://img.shields.io/badge/terraform-v1.1.7-green" alt="Terraform">
18-
</a>
19-
<a href="LICENSE.md">
20-
<img src="https://img.shields.io/badge/License-APACHE-blue.svg" alt="Licence">
16+
<a href="https://github.com/clouddrove/terraform-aws-security-group/releases/latest">
17+
<img src="https://img.shields.io/github/release/clouddrove/terraform-aws-security-group.svg" alt="Latest Release">
2118
</a>
2219
<a href="https://github.com/clouddrove/terraform-aws-security-group/actions/workflows/tfsec.yml">
2320
<img src="https://github.com/clouddrove/terraform-aws-security-group/actions/workflows/tfsec.yml/badge.svg" alt="tfsec">
2421
</a>
25-
<a href="https://github.com/clouddrove/terraform-aws-security-group/actions/workflows/terraform.yml">
26-
<img src="https://github.com/clouddrove/terraform-aws-security-group/actions/workflows/terraform.yml/badge.svg" alt="static-checks">
22+
<a href="LICENSE.md">
23+
<img src="https://img.shields.io/badge/License-APACHE-blue.svg" alt="Licence">
2724
</a>
2825

2926

@@ -33,10 +30,10 @@
3330
<a href='https://facebook.com/sharer/sharer.php?u=https://github.com/clouddrove/terraform-aws-security-group'>
3431
<img title="Share on Facebook" src="https://user-images.githubusercontent.com/50652676/62817743-4f64cb80-bb59-11e9-90c7-b057252ded50.png" />
3532
</a>
36-
<a href='https://www.linkedin.com/shareArticle?mini=true&title=Terraform+AWS+Security+Group&url=https://github.com/clouddrove/terraform-aws-security-group'>
33+
<a href='https://www.linkedin.com/shareArticle?mini=true&title=Terraform+Module+Security-Group&url=https://github.com/clouddrove/terraform-aws-security-group'>
3734
<img title="Share on LinkedIn" src="https://user-images.githubusercontent.com/50652676/62817742-4e339e80-bb59-11e9-87b9-a1f68cae1049.png" />
3835
</a>
39-
<a href='https://twitter.com/intent/tweet/?text=Terraform+AWS+Security+Group&url=https://github.com/clouddrove/terraform-aws-security-group'>
36+
<a href='https://twitter.com/intent/tweet/?text=Terraform+Module+Security-Group&url=https://github.com/clouddrove/terraform-aws-security-group'>
4037
<img title="Share on Twitter" src="https://user-images.githubusercontent.com/50652676/62817740-4c69db00-bb59-11e9-8a79-3580fbbf6d5c.png" />
4138
</a>
4239

@@ -74,6 +71,7 @@ This module has a few dependencies:
7471
**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).
7572

7673

74+
Here are some examples of how you can use this module in your inventory structure:
7775
### NEW_SECURITY_GROUP
7876
Here is an example of how you can use this module in your inventory structure:
7977
```hcl
@@ -84,12 +82,25 @@ Here is an example of how you can use this module in your inventory structure:
8482
name = "security-group"
8583
environment = "test"
8684
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"]
85+
86+
vpc_id = module.vpc.vpc_id
87+
new_enable_security_group = true
88+
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
89+
allowed_ports = [22, 27017]
90+
security_groups = []
91+
max_entries = 5
92+
prefix_list_enabled = true
93+
prefix_list_id = []
94+
entry = [
95+
{
96+
cidr = "10.0.0.0/16"
97+
description = "VPC CIDR"
98+
},
99+
{
100+
cidr = "10.10.0.0/24"
101+
description = "VPC CIDR"
102+
}
103+
]
93104
}
94105
```
95106
### NEW_SECURITY_GROUP_WITH_EGRESS
@@ -99,21 +110,21 @@ Here is an example of how you can use this module in your inventory structure:
99110
name = "security-group"
100111
environment = "test"
101112
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-
113+
114+
vpc_id = module.vpc.vpc_id
115+
prefix_list_enabled = false
116+
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
117+
allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"]
118+
allowed_ports = [22, 27017]
119+
security_groups = ["sg-xxxxxxxxx"]
120+
prefix_list_id = ["pl-6da54004"]
110121
egress_rule = true
111122
egress_allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
112123
egress_allowed_ports = [22, 27017]
113124
egress_protocol = "tcp"
114125
egress_prefix_list_ids = ["pl-xxxxxxxxx"]
115126
egress_security_groups = ["sg-xxxxxxxxx"]
116-
127+
117128
}
118129
```
119130
### UPDATED_EXISTING
@@ -123,7 +134,7 @@ module "security_group" {
123134
name = "security-group"
124135
environment = "test"
125136
label_order = ["name", "environment"]
126-
137+
127138
is_external = true
128139
existing_sg_id = "sg-xxxxxxxxxxxx"
129140
vpc_id = module.vpc.vpc_id
@@ -145,38 +156,32 @@ module "security_group" {
145156
| allowed\_ip | List of allowed ip. | `list(any)` | `[]` | no |
146157
| allowed\_ipv6 | List of allowed ipv6. | `list(any)` | <pre>[<br> "2405:201:5e00:3684:cd17:9397:5734:a167/128"<br>]</pre> | no |
147158
| allowed\_ports | List of allowed ingress ports | `list(any)` | `[]` | no |
148-
| attributes | Additional attributes (e.g. `1`). | `list(any)` | `[]` | no |
149-
| description | The security group description. | `string` | `"Instance default security group (only egress access is allowed)."` | no |
150159
| egress\_allowed\_ip | List of allowed ip. | `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 |
152160
| egress\_allowed\_ports | List of allowed ingress ports | `list(any)` | `[]` | no |
153161
| egress\_prefix\_list\_ids | List of prefix list IDs (for allowing access to VPC endpoints)Only valid with egress | `list(any)` | `[]` | no |
154162
| egress\_protocol | The protocol. If not icmp, tcp, udp, or all use the. | `string` | `"tcp"` | no |
155163
| egress\_rule | Enable to create egress rule | `bool` | `false` | no |
156164
| egress\_security\_groups | List of Security Group IDs allowed to connect to the instance. | `list(string)` | `[]` | no |
157-
| enable\_security\_group | Enable default Security Group with only Egress traffic allowed. | `bool` | `true` | no |
165+
| entry | Can be specified multiple times for each prefix list entry. | `list(any)` | `[]` | no |
158166
| environment | Environment (e.g. `prod`, `dev`, `staging`). | `string` | `""` | no |
159167
| existing\_sg\_id | Provide existing security group id for updating existing rule | `string` | `null` | no |
160168
| is\_external | enable to udated existing security Group | `bool` | `false` | no |
161169
| label\_order | Label order, e.g. `name`,`application`. | `list(any)` | `[]` | no |
162-
| managedby | ManagedBy, eg 'CloudDrove'. | `string` | `"hello@clouddrove.com"` | no |
170+
| max\_entries | The maximum number of entries that this prefix list can contain. | `number` | `5` | no |
163171
| name | Name (e.g. `app` or `cluster`). | `string` | `""` | no |
164-
| prefix\_list | List of prefix list IDs (for allowing access to VPC endpoints)Only valid with egress | `list(any)` | `[]` | no |
165-
| prefix\_list\_ids | Provide allow source Prefix id of resources | `list(string)` | `[]` | no |
166-
| protocol | The protocol. If not icmp, tcp, udp, or all use the. | `string` | `"tcp"` | no |
167-
| 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 |
172+
| new\_enable\_security\_group | Enable default Security Group with only Egress traffic allowed. | `bool` | `true` | no |
173+
| prefix\_list\_enabled | Enable prefix\_list. | `bool` | `true` | no |
174+
| prefix\_list\_id | The ID of the prefix list. | `list(string)` | `[]` | no |
170175
| security\_groups | List of Security Group IDs allowed to connect to the instance. | `list(string)` | `[]` | no |
171-
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`). | `map(string)` | `{}` | no |
172176
| vpc\_id | The ID of the VPC that the instance security group belongs to. | `string` | `""` | no |
173177

174178
## Outputs
175179

176180
| Name | Description |
177181
|------|-------------|
178-
| security\_group\_ids | IDs on the AWS Security Groups associated with the instance. |
179-
| tags | A mapping of public tags to assign to the resource. |
182+
| prefix\_id | n/a |
183+
| security\_group\_ids | A mapping of security group ids. |
184+
| tags | A mapping of tags to assign to the resource. |
180185

181186

182187

0 commit comments

Comments
 (0)