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

Issue 66 : update README to include a docs usage and add a contribution file in root #67

Merged
merged 2 commits into from
Jan 30, 2024
Merged
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
18 changes: 18 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,21 @@ jobs:
user-name: ${{ github.actor }}
target-branch: main
commit-message: ${{ github.event.head_commit.message }}
transfer-file-usage-guide:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Pushes Module Usage Guide
uses: dmnemec/copy_file_to_another_repo_action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_TOKEN_GITHUB: ${{ secrets.ARC_DOCS_API_TOKEN_GITHUB }}
with:
source_file: 'docs/module-usage-guide/README.md'
destination_repo: 'sourcefuse/arc-docs'
destination_folder: 'docs/arc-iac-docs/modules/terraform-aws-ref-arch-network/docs/module-usage-guide'
user_email: '[email protected]'
user_name: ${{ github.actor }}
commit_message: ${{ github.event.head_commit.message }}
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributing to AWS ARC Network
Thank you for considering contributing to AWS ARC Network! We appreciate your time and effort.
To ensure a smooth collaboration, please take a moment to review the following guidelines.

## How to Contribute
1. Fork the repository to your own GitHub account.
2. Clone the repository to your local machine.
```bash
git clone https://github.com/<your_organization>/<your_terraform_module>.git
```
3. Create a new branch for your feature / bugfix.
```bash
git checkout -b feature/branch_name
```
4. Make your changes and commit them.
```bash
git commit -m "Your descriptive commit message"
```
5. Push to your forked repository.
```bash
git push origin feature/branch_name
```
6. Open a pull request in the original repository with a clear title and description.
If your pull request addresses an issue, please reference the issue number in the pull request description.

## Code Style
Please follow the Terraform language conventions and formatting guidelines. Consider using an editor with Terraform support or a linter to ensure adherence to the style.

## Testing
!!! This section is a work-in-progress, as we are starting to adopt testing using Terratest. !!!

Before submitting a pull request, ensure that your changes pass all tests. If applicable, add new tests to cover your changes.

## Documentation
Keep the module documentation up-to-date. If you add new features or change existing functionality, update the [README](README.md) and any relevant documentation files.

## Security and Compliance Checks
GitHub Actions are in place to perform security and compliance checks. Please make sure your changes pass these checks before submitting a pull request.

## Licensing
By contributing, you agree that your contributions will be licensed under the project's [LICENSE](LICENSE).
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
[![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)
## Overview

AWS Terraform module for the SourceFuse Reference Architecture.
SourceFuse AWS Reference Architecture (ARC) Terraform module for managing AWS VPC and related AWS networking resources.

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

![arc_network_hla](./static/arc_network_hla.png)

Expand Down
120 changes: 120 additions & 0 deletions docs/module-usage-guide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Terraform AWS ARC Network Module Usage Guide

## Introduction

### Purpose of the Document

This document provides guidelines and instructions for users looking to implement the Terraform AWS ARC Network module for managing VPC and other network resources on AWS.

### Module Overview

The [Terraform AWS ARC GitHub IAM](https://github.com/sourcefuse/terraform-aws-arc-network) module provides a secure and modular foundation for building robust and secure VPC and network resources on AWS.

![arc_network_hla](../../static/arc_network_hla.png)

### Prerequisites

Before using this module, ensure you have the following:

- AWS credentials configured.
- Terraform installed.
- A working knowledge of AWS VPC, Networking and Terraform concepts.

## Getting Started

### Module Source

To use the module in your Terraform configuration, include the following source block:

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

Refer to the [Terraform Registry](https://registry.terraform.io/modules/sourcefuse/arc-network/aws/latest) for the latest version.

### Integration with Existing Terraform Configurations

Integrate the module with your existing Terraform mono repo configuration, follow the steps below:

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.
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

### Required AWS Permissions

Ensure that the AWS credentials used to execute Terraform have the necessary permissions to create and modify VPC and network resources (like site to site vpn, client vpn, vpc endpoints etc. as per your need) for the account.

## Module Configuration

### Input Variables

For a list of input variables, see the README [Inputs](https://github.com/sourcefuse/terraform-aws-arc-network?tab=readme-ov-file#inputs) section.

### Output Values

For a list of outputs, see the README [Outputs](https://github.com/sourcefuse/terraform-aws-arc-network?tab=readme-ov-file#outputs) section.

## Module Usage

### Basic Usage

For basic usage, see the [example](https://github.com/sourcefuse/terraform-aws-arc-network/tree/main/examples/simple) folder.

This example will create:

- A VPC with CIDR block `10.9.0.0/16`
- Two subnets in availability zones : `"us-east-1a"`, `"us-east-1b"`
- Route tables, internet gateway, NAT Gateways
- vpc endpoints for the services: s3, kms, cloudwatch, elb, dynamodb, ec2, sns, sqs, ecs, rds

### Tips and Recommendations

- If you want to create custom subnet ranges, check [example](https://github.com/sourcefuse/terraform-aws-arc-network/tree/main/examples/cistom-subnets)

## Troubleshooting

### Reporting Issues

If you encounter a bug or issue, please report it on the [GitHub repository](https://github.com/sourcefuse/terraform-aws-arc-network/issues).

## Security Considerations

### AWS VPC

Understand the security considerations related to Network Security on AWS when using this module.

### Best Practices for IAM Roles

Follow best practices to ensure secure Network configurations:

- [Network security on AWS](https://aws.amazon.com/solutions/guidance/network-security-on-aws/)

## Contributing and Community Support

### Contributing Guidelines

Contribute to the module by following the guidelines outlined in the [CONTRIBUTING.md](https://github.com/sourcefuse/terraform-aws-arc-network/blob/main/CONTRIBUTING.md) file.

### Reporting Bugs and Issues

If you find a bug or issue, report it on the [GitHub repository](https://github.com/sourcefuse/terraform-aws-arc-network/issues).

## License

### License Information

This module is licensed under the Apache 2.0 license. Refer to the [LICENSE](https://github.com/sourcefuse/terraform-aws-arc-network/blob/main/LICENSE) file for more details.

### Open Source Contribution

Contribute to open source by using and enhancing this module. Your contributions are welcome!
Loading