Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README and bugfix on outputs to handle optional resources #54

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ The following resources will be created:

```hcl
module "network" {
source = "git::https://github.com/DNXLabs/terraform-aws-network.git?ref=2.0.0"

source = "git::https://github.com/DNXLabs/terraform-aws-network.git"
# To use a specific version, replace <version> with the desired release (eg: 2.3.1):
# source = "git::https://github.com/DNXLabs/terraform-aws-network.git?ref=<version>"

vpc_cidr = "10.1.0.0/16"
name = "MyVPC" #required
vpc_cidr = "10.1.0.0/16" #required

# Add other module-specific variables here
newbits = 8 # will create /24 subnets
name = "MyVPC"
multi_nat = false
}
```
Expand Down Expand Up @@ -67,7 +72,7 @@ module "network" {
| enable\_firewall\_default\_rule | Enable or disable the default stateful rule. | `bool` | `true` | no |
| firewall\_custom\_rule\_arn | The stateful rule group arn created outside the module | `list(string)` | `[]` | no |
| firewall\_custom\_rules | The stateful rule group rules specifications in Suricata file format, with one rule per line | `list(string)` | `[]` | no |
| firewall\_domain\_list | List the domain names you want to take action on. | `list(any)` | <pre>[<br> ".amazonaws.com",<br> ".github.com"<br>]</pre> | no |
| firewall\_domain\_list | List the domain names you want to take action on. | `list(any)` | <pre>[<br> ".amazonaws.com",<br> ".github.com"<br>]</pre> | no |
| firewall\_netnum\_offset | Start with this subnet for secure ones, plus number of AZs | `number` | `14` | no |
| kms\_key\_arn | The ARN of the KMS Key to use when encrypting log data. | `string` | `""` | no |
| kubernetes\_clusters | List of kubernetes cluster names to creates tags in public and private subnets of this VPC | `list(string)` | `[]` | no |
Expand Down Expand Up @@ -98,15 +103,8 @@ module "network" {
| vpc\_cidr\_summ | Define cidr used to summarize subnets by tier | `string` | `"/0"` | no |
| vpc\_endpoint\_dynamodb\_gateway | Enable or disable VPC Endpoint for DynamoDB (Gateway) | `bool` | `true` | no |
| vpc\_endpoint\_s3\_gateway | Enable or disable VPC Endpoint for S3 Gateway | `bool` | `true` | no |
| vpc\_endpoint\_s3\_policy | A policy to attach to the endpoint that controls access to the service | `string` | `" {
\"Statement\": [
{
\"Action\": \"*\",\"Effect\": \"Allow\",\"Resource\": \"*\",\"Principal\": \"*\"
}
]
}
"` | no |
| vpc\_endpoints | AWS services to create a VPC endpoint on private subnets for (e.g: ssm, ec2, ecr.dkr) | <pre>list(object(<br> {<br> name = string<br> policy = optional(string)<br> allowed_cidrs = optional(list(string))<br> }<br> ))</pre> | `[]` | no |
| vpc\_endpoint\_s3\_policy | A policy to attach to the endpoint that controls access to the service | `string` |<pre>{ "Statement": <br> [<br> {<br> "Action": <br> "\*\",<br> "Effect\": <br> "Allow\",<br> "Resource\":<br> "\*\",<br> "Principal\":<br> \"*\" <br> } <br> ] <br>}</pre> | no |
| vpc\_endpoints | AWS services to create a VPC endpoint on private subnets for (e.g: ssm, ec2, ecr.dkr) |<pre>list(object(<br>{<br>name = string<br>policy = <br> optional(string)<br>allowed_cidrs =<br> optional(list<br> (string))<br>}<br>))</pre> | `[]` | no |
| vpc\_flow\_logs | Enable or disable VPC Flow Logs | `bool` | `true` | no |
| vpc\_flow\_logs\_retention | Retention in days for VPC Flow Logs CloudWatch Log Group | `number` | `365` | no |

Expand Down
6 changes: 3 additions & 3 deletions _outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ output "nat_gateway_ids" {
}

output "db_subnet_group_secure_id" {
value = aws_db_subnet_group.secure[0].id
value = try(aws_db_subnet_group.secure[0].id, null)
}

output "db_subnet_group_private_id" {
value = aws_db_subnet_group.private[0].id
value = try(aws_db_subnet_group.private[0].id, null)
}

output "db_subnet_group_public_id" {
value = aws_db_subnet_group.public[0].id
value = try(aws_db_subnet_group.public[0].id, null)
}

output "public_route_table_id" {
Expand Down