Skip to content

Commit

Permalink
Updated Docs (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
manikanta-sadurla authored Feb 28, 2024
1 parent b95f4f4 commit 2a698b3
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 10 deletions.
30 changes: 23 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Known Vulnerabilities](https://github.com/sourcefuse/terraform-aws-ref-arch-network/actions/workflows/snyk.yaml/badge.svg)](https://github.com/sourcefuse/terraform-aws-ref-arch-network/actions/workflows/snyk.yaml)
## Introduction

SourceFuse's AWS Reference Architecture (ARC) Terraform module for managing AWS VPC and related AWS networking resources.
SourceFuse's AWS Reference Architecture (ARC) Terraform module facilitates the management of AWS VPC and associated networking resources. It includes features like VPC creation, Client VPN, and VPC endpoints for services like S3 and DynamoDB, enhancing network connectivity and security.

For more information about this repository and its usage, please see [Terraform AWS ARC Network Module Usage Guide](docs/module-usage-guide/README.md).

Expand Down Expand Up @@ -33,8 +33,8 @@ See the `examples` folder for a complete example.
```shell

module "network" {
source = "sourcefuse/arc-network/aws"
version = "2.4.2"
source = "sourcefuse/arc-network/aws"
version = "2.6.10"
namespace = var.namespace
environment = var.environment
availability_zones = var.availability_zones
Expand All @@ -58,6 +58,8 @@ module "network" {
ec2 = false
sns = true
sqs = true
ecs = true
rds = true
}
gateway_endpoint_route_table_filter = ["*private*"]
}
Expand All @@ -68,9 +70,9 @@ module "network" {
```shell

module "network" {
source = "sourcefuse/arc-network/aws"
version = "2.4.2"

source = "sourcefuse/arc-network/aws"
version = "2.6.10"
namespace = var.namespace
environment = var.environment
availability_zones = var.availability_zones
Expand Down Expand Up @@ -104,14 +106,25 @@ module "network" {
}
]

// If have disabled the default nat gateways for your custom subnetes
// then you need to pass a nat gateway id for each private subnet that
// you are creating. If custom_az_ngw_ids is left empty in this case
// then no default route is created by the module.

custom_nat_gateway_enabled = false
custom_az_ngw_ids = {
"us-east-1a" = "ngw-13df3f3" // Dummy NAT gateway IDs. Use data sources or resource attributes instead.
"us-east-1b" = "ngw-12cesc3"
}

client_vpn_authorization_rules = [
{
target_network_cidr = var.vpc_ipv4_primary_cidr_block
authorize_all_groups = true
description = "default authorization group to allow all authenticated clients to access the vpc"
}
]
## if no vpc endpoint is required then you can remove this block with gateway_endpoint_route_table_filter
// if no vpc endpoint is required then you can remove this block with gateway_endpoint_route_table_filter
vpc_endpoint_config = {
s3 = true
kms = false
Expand All @@ -121,13 +134,16 @@ module "network" {
ec2 = false
sns = true
sqs = true
ecs = true
rds = true
}

gateway_endpoint_route_table_filter = ["*private*"]

tags = module.tags.tags
}


```
## Configuring your VPN Client
Expand Down
21 changes: 18 additions & 3 deletions docs/module-usage-guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Before using this module, ensure you have the following:

### Module Source

To use the module in your Terraform configuration, include the following source block:
To incorporate the module into your main Terraform configuration file (e.g., main.tf), declare the module and define its source along with the desired version. For instance, you can specify the module source and version as follows:

```hcl
module "network" {
source = "sourcefuse/arc-network/aws"
version = "2.6.3"
# insert the 6 required variables here
version = "2.6.10"
# insert the required variables here
}
```

Expand All @@ -42,13 +42,28 @@ Integrate the module with your existing Terraform mono repo configuration, follo

1. Create a new folder in `terraform/` named `network`.
2. Create the required files, see the [examples](https://github.com/sourcefuse/terraform-aws-arc-network/tree/main/examples/simple) to base off of.
```plaintext
network/
|-- main.tf
|-- variables.tf
|-- outputs.tf
```
3. Configure with your backend
- Create the environment backend configuration file: `config.<environment>.hcl`
- **region**: Where the backend resides
- **key**: `<working_directory>/terraform.tfstate`
- **bucket**: Bucket name where the terraform state will reside
- **dynamodb_table**: Lock table so there are not duplicate tfplans in the mix
- **encrypt**: Encrypt all traffic to and from the backend
4. Execute Terraform Commands
- After defining your main configuration, navigate to the directory containing your Terraform files and run the following commands:

```bash
terraform init
terraform apply
```
5. Review and Confirm
- Terraform will display a plan showing the changes it intends to make. Review the plan and confirm by typing 'yes' when prompted.

### Required AWS Permissions

Expand Down

0 comments on commit 2a698b3

Please sign in to comment.