Skip to content

Commit

Permalink
feat: Update Readme with latest example
Browse files Browse the repository at this point in the history
  • Loading branch information
theprashantyadav committed Jun 15, 2023
1 parent ca21e6b commit b01f937
Showing 1 changed file with 50 additions and 9 deletions.
59 changes: 50 additions & 9 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,61 @@ include:
# How to use this project
# yamllint disable rule:line-length
usage: |-
### Simple Example
### NEW_SECURITY_GROUP
Here is an example of how you can use this module in your inventory structure:
```hcl
# use this
module "security_group" {
source = "clouddrove/security-group/aws"
version = "1.3.0"
name = "security-group"
environment = "test"
protocol = "tcp"
label_order = ["name", "environment"]
vpc_id = "vpc-xxxxxxxxx"
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"]
allowed_ports = [22, 27017]
name = "security-group"
environment = "test"
label_order = ["name", "environment"]
vpc_id = module.vpc.vpc_id
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
allowed_ports = [22, 27017]
security_groups = ["sg-xxxxxxxxxxxx"]
prefix_list_ids = ["pl-xxxxxxxxxxxx"]
}
```
### NEW_SECURITY_GROUP_WITH_EGRESS
module "security_group" {
source = "clouddrove/security-group/aws"
version = "1.3.0"
name = "security-group"
environment = "test"
label_order = ["name", "environment"]
vpc_id = module.vpc.vpc_id
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"]
allowed_ports = [22, 27017]
security_groups = ["sg-xxxxxxxxx"]
prefix_list_ids = ["pl-6da54004"]
egress_rule = true
egress_allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
egress_allowed_ports = [22, 27017]
egress_protocol = "tcp"
egress_prefix_list_ids = ["pl-xxxxxxxxx"]
egress_security_groups = ["sg-xxxxxxxxx"]
}
```
### UPDATED_EXISTING
module "security_group" {
source = "clouddrove/security-group/aws"
version = "1.3.0"
name = "security-group"
environment = "test"
label_order = ["name", "environment"]
is_external = true
existing_sg_id = "sg-xxxxxxxxxxxx"
vpc_id = module.vpc.vpc_id
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"]
allowed_ports = [22, 27017]
security_groups = ["sg-xxxxxxxxxxxxx"]
}
```

0 comments on commit b01f937

Please sign in to comment.