@@ -40,20 +40,61 @@ include:
40
40
# How to use this project
41
41
# yamllint disable rule:line-length
42
42
usage : |-
43
- ### Simple Example
43
+ ### NEW_SECURITY_GROUP
44
44
Here is an example of how you can use this module in your inventory structure:
45
45
```hcl
46
46
# use this
47
47
module "security_group" {
48
48
source = "clouddrove/security-group/aws"
49
49
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"]
58
59
}
59
60
```
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