Skip to content

Commit b01f937

Browse files
feat: Update Readme with latest example
1 parent ca21e6b commit b01f937

File tree

1 file changed

+50
-9
lines changed

1 file changed

+50
-9
lines changed

README.yaml

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,61 @@ include:
4040
# How to use this project
4141
# yamllint disable rule:line-length
4242
usage: |-
43-
### Simple Example
43+
### NEW_SECURITY_GROUP
4444
Here is an example of how you can use this module in your inventory structure:
4545
```hcl
4646
# use this
4747
module "security_group" {
4848
source = "clouddrove/security-group/aws"
4949
version = "1.3.0"
50-
name = "security-group"
51-
environment = "test"
52-
protocol = "tcp"
53-
label_order = ["name", "environment"]
54-
vpc_id = "vpc-xxxxxxxxx"
55-
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
56-
allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"]
57-
allowed_ports = [22, 27017]
50+
name = "security-group"
51+
environment = "test"
52+
label_order = ["name", "environment"]
53+
54+
vpc_id = module.vpc.vpc_id
55+
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
56+
allowed_ports = [22, 27017]
57+
security_groups = ["sg-xxxxxxxxxxxx"]
58+
prefix_list_ids = ["pl-xxxxxxxxxxxx"]
5859
}
5960
```
61+
### NEW_SECURITY_GROUP_WITH_EGRESS
62+
module "security_group" {
63+
source = "clouddrove/security-group/aws"
64+
version = "1.3.0"
65+
name = "security-group"
66+
environment = "test"
67+
label_order = ["name", "environment"]
68+
69+
vpc_id = module.vpc.vpc_id
70+
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
71+
allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"]
72+
allowed_ports = [22, 27017]
73+
security_groups = ["sg-xxxxxxxxx"]
74+
prefix_list_ids = ["pl-6da54004"]
75+
76+
egress_rule = true
77+
egress_allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
78+
egress_allowed_ports = [22, 27017]
79+
egress_protocol = "tcp"
80+
egress_prefix_list_ids = ["pl-xxxxxxxxx"]
81+
egress_security_groups = ["sg-xxxxxxxxx"]
82+
83+
}
84+
```
85+
### UPDATED_EXISTING
86+
module "security_group" {
87+
source = "clouddrove/security-group/aws"
88+
version = "1.3.0"
89+
name = "security-group"
90+
environment = "test"
91+
label_order = ["name", "environment"]
92+
93+
is_external = true
94+
existing_sg_id = "sg-xxxxxxxxxxxx"
95+
vpc_id = module.vpc.vpc_id
96+
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
97+
allowed_ports = [22, 27017]
98+
security_groups = ["sg-xxxxxxxxxxxxx"]
99+
}
100+
```

0 commit comments

Comments
 (0)