Skip to content

Commit

Permalink
Merge pull request #5 from terraform-modules/update_comments
Browse files Browse the repository at this point in the history
add usage, update document
  • Loading branch information
badra001 committed Jun 29, 2020
2 parents bf24972 + 904b4c5 commit 18eb464
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 37 deletions.
57 changes: 20 additions & 37 deletions it-linux-base/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# About it-linux-base

This describes how to use the aws-common-security-groups submodule for it-linux-base.

Commonly used ports and services are set up here, including ICMP, SSH, NTP, DNS, SNMP,
monit, munin, iperf, netperf, NetBackup and Opsware.

## Usage

```hcl
module "it-linux-base" {
source = "git@github.e.it.census.gov:terraform-modules/aws-common-security-groups.git//it-linux-base"
# name = "m-it-linux-base"
vpc_id = var.vpc_id
# Name, CostAllocation, and Environment are pre-set, but they can be overriden
# tags = { }
}
```

## Requirements

The following requirements are needed by this module:
Expand Down Expand Up @@ -151,40 +171,3 @@ Description: Created security group ARN

Description: Created security group ID

## Requirements

| Name | Version |
|------|---------|
| terraform | >= 0.12 |

## Providers

| Name | Version |
|------|---------|
| aws | n/a |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| \_module\_version | Module version number | `string` | `"1.0.1"` | no |
| description | Security Group Description | `string` | `"Linux Common Base Security Group"` | no |
| egress\_networks | List of egress networks (all ports) | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
| egress\_security\_groups | List of egress security groups (all ports) | `list(string)` | `[]` | no |
| enable\_self | Enable\|Disable self full access | `bool` | `false` | no |
| ingress\_networks | List of ingress networks for external access (not all ports) | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
| ingress\_security\_groups | List of ingress security groups for all ports | `list(string)` | `[]` | no |
| name | Security Group Name | `string` | `"it-linux-base"` | no |
| short\_description | Security Group Short Description | `string` | `"Linux"` | no |
| tags | Extra security group tags | `map` | <pre>{<br> "CostAllocation": "csvd:infrastructure",<br> "Environment": "csvd-infrastructure"<br>}</pre> | no |
| use\_vpc\_cidr | Enable\|Disable use of VPC CIDR block in the ingress\_networks | `bool` | `false` | no |
| vpc\_full\_name | VPC Name | `string` | `""` | no |
| vpc\_id | VPC ID Number | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| this\_security\_group\_arn | Created security group ARN |
| this\_security\_group\_id | Created security group ID |

22 changes: 22 additions & 0 deletions it-linux-base/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/**
* # About it-linux-base
*
* This describes how to use the aws-common-security-groups submodule for it-linux-base.
*
* Commonly used ports and services are set up here, including ICMP, SSH, NTP, DNS, SNMP,
* monit, munin, iperf, netperf, NetBackup and Opsware.
*
* ## Usage
*
* ```hcl
* module "it-linux-base" {
* source = "git@github.e.it.census.gov:terraform-modules/aws-common-security-groups.git//it-linux-base"
*
* # name = "m-it-linux-base"
* vpc_id = var.vpc_id
* # Name, CostAllocation, and Environment are pre-set, but they can be overriden
* # tags = { }
* }
* ```
*/

data "aws_vpc" "this_vpc" {
count = var.use_vpc_cidr ? 1 : 0
id = var.vpc_id
Expand Down

0 comments on commit 18eb464

Please sign in to comment.