Skip to content

Commit

Permalink
Modified Code
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-das committed Mar 17, 2020
1 parent 185bdb2 commit 0a97825
Showing 1 changed file with 48 additions and 68 deletions.
116 changes: 48 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,122 +1,102 @@
# Terraform Module Name: terraform-module-aws-security-group
# _Terraform Module Name: terraform-module-aws-security-group_
_Terraform module for_ **_AWS Security Group_**


## General
<!--BEGIN STABILITY BANNER-->
---

![_Code : Stable_](https://img.shields.io/badge/Code-Stable-brightgreen?style=for-the-badge&logo=github)

> **_This is a stable example. It should successfully build out of the box_**
>
> _This examples does is built on Construct Libraries marked "Stable" and does not have any infrastructure prerequisites to build._
---
<!--END STABILITY BANNER-->


_This module may be used to create_ **_Security Group_** _resources in AWS cloud provider...._
## _General_

_This module may be used to create_ **_Security Group_** _resources in AWS Cloud provider......._

---


## Prerequisites
## _Prerequisites_

_This module needs_ **_Terraform 0.12.18_** _or newer._
_You can download the latest Terraform version from [here](https://www.terraform.io/downloads.html)._
_This module needs Terraform 0.12.23 or newer._
_You can download the latest Terraform version from_ [_here_](https://www.terraform.io/downloads.html).

_This module deploys aws services details are in respective feature branches._

---


## Below are the resources that are launched by this module
## _Features_

_Below we are able to check the resources that are being created as part of this module call:_


- **_Security Group_**


---

## Usage
## _Usage_

## Using this repo
## _Using this repo_

_To use this module, add the following call to your code:_

```tf
module "<layer>-security-group-<AccountID>" {
source = "git::https://github.com/nitinda/terraform-module-aws-security-group.git?ref=terraform-12/master"
providers = {
aws = aws.services
}
# Tags
tags = merge(
var.common_tags,
{
"Name" = "service-sg"
"ManagedBy" = "Terraform"
},
)
# Security Groups
name_prefix = "service-sg-"
description = "Code Build EC2 Instance security group that allows traffic from whitelisted ips"
vpc_id = var.vpc_id
revoke_rules_on_delete = true
ingress_rules = [
{
from_port = 22
to_port = 22
protocol = "tcp"
description = "Ingress rule that allows traffic from subnets"
cidr_blocks = [ var.vpc_cidr ]
}
]
egress_rules = [
{
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
description = "The egress rule allows all ports"
}
]
module "security_group" {
source = "git::https://github.com/nitinda/terraform-module-aws-security-group.git?ref=master"
}
```
---

## Inputs
## _Inputs_

_The variables required in order for the module to be successfully called from the deployment repository are the following:_


|**_Variable_** | **_Description_** | **_Type_** | **_Argument Status_** |
|:----|:----|-----:|-----:|
| **_name\_prefix_** | Name prefix | _string_ | **_Required_** |
| **_description_** | description | _string_ | **_Required_** |
| **_vpc\_id_** | VPC ID | _string_ | **_Required_** |
| **_tags_** | Resource Tag | _map(string)_ | **_Required_** |
| **_revoke\_rules\_on\_delete_** | Instruct Terraform to revoke | _string_ | **_Optional_** *(Default - **false**)* |
| **_ingress\_rules_** | Ingress Rules | _any_ | **_Optional_** *(Default - **[]**)* |
| **_egress\_rules_** | Egress Rules | _any_ | **_Optional_** *(Default - **[]**)* |
|:----|:----|-----:|:---:|



---


# _Outputs_

## Outputs
### _General_

_This module has the following outputs:_

- **_id_**
- **_arn_**
- **_name_**


---

### _Usage_

### Usage
_In order for the variables to be accessed on module level please use the syntax below:_
_In order for the variables to be accessed at module level please use the syntax below:_

```tf
module.<module_name>.<output_variable_name>
```


_The output variable is able to be accessed through terraform state file using the syntax below:_

```tf
"${data.terraform_remote_state.<module_name>.<output_variable_name>}"
data.terraform_remote_state.<layer_name>.<output_variable_name>
```

## Authors
_Module maintained by Module maintained by the -_**_Nitin Das_**
---



## _Authors_

_Module maintained by Module maintained by the -_ **_Nitin Das_**

0 comments on commit 0a97825

Please sign in to comment.