diff --git a/it-linux-base/README.md b/it-linux-base/README.md index 40f1574..dca6bee 100644 --- a/it-linux-base/README.md +++ b/it-linux-base/README.md @@ -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: @@ -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)` |
[| 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)` |
"0.0.0.0/0"
]
[| 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` |
"0.0.0.0/0"
]
{
"CostAllocation": "csvd:infrastructure",
"Environment": "csvd-infrastructure"
} | 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 |
-
diff --git a/it-linux-base/main.tf b/it-linux-base/main.tf
index d09b4b8..81bfdc0 100644
--- a/it-linux-base/main.tf
+++ b/it-linux-base/main.tf
@@ -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