https://github.com/timoa/terraform-aws-module-example
A Terraform module uses as an example to start new AWS Terraform module. It includes all the automation (versioning, providers update, lint, security) and best practices from HashiCorp
https://github.com/timoa/terraform-aws-module-example
aws managed-by-terraform renovate semantic-release terraform terraform-module
Last synced: about 1 year ago
JSON representation
A Terraform module uses as an example to start new AWS Terraform module. It includes all the automation (versioning, providers update, lint, security) and best practices from HashiCorp
- Host: GitHub
- URL: https://github.com/timoa/terraform-aws-module-example
- Owner: timoa
- License: apache-2.0
- Created: 2022-04-13T11:01:24.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-13T17:23:21.000Z (over 1 year ago)
- Last Synced: 2024-11-13T18:29:23.651Z (over 1 year ago)
- Topics: aws, managed-by-terraform, renovate, semantic-release, terraform, terraform-module
- Language: HCL
- Homepage: https://timoa.com
- Size: 214 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# Terraform AWS module example
[![Latest Release][release-badge]][release-url]
[![Build Status][github-badge]][github-url]
[![License][license-badge]][license-url]
A Terraform module uses as a template to start new module.
It includes all the automation (versioning, providers update, lint, security) and best practices from HashiCorp.
* [Pre-commit][pre-commit-url]: enforce checks on the module before commit
* [Semantic Release][semantic-release-url]: automate the release and version process
* [Reviewdog][reviewdog-url]: automate the review process with per code line comments (TFLint & TFSec checks)
* [Renovate][renovate-url]: automate the dependency management (update provider version, etc.)
* [ShiftLeft SCAN][shiftleft-scan-url]: security audit tool to detect security flaws in application and infrastructure code
## Usage
### Integrate the module into your Terraform project
If you want to use this module inside your project, you can use the following code (change the tag to match the latest version):
```bash
module "module-template" {
source = "git::https://github.com/timoa/terraform-aws-module-example.git?ref=tags/0.0.2"
# Required
region = "us-east-1"
# Optional
namespace = "my-project"
stage = "prod"
}
```
### Output example
```bash
terraform init
terraform plan
```
```bash
Changes to Outputs:
+ available_zones = [
+ "us-east-1a",
+ "us-east-1b",
+ "us-east-1c",
+ "us-east-1d",
+ "us-east-1e",
+ "us-east-1f",
]
You can apply this plan to save these new output values to the Terraform
state, without changing any real infrastructure.
```
[github-badge]: https://github.com/timoa/terraform-aws-module-example/workflows/Terraform/badge.svg
[github-url]: https://github.com/timoa/terraform-aws-module-example/actions?query=workflow%3ATerraform
[release-badge]: https://img.shields.io/github/release/timoa/terraform-aws-module-example.svg
[release-url]: https://github.com/timoa/terraform-aws-module-example/releases/latest
[license-badge]: https://img.shields.io/github/license/timoa/terraform-aws-module-example.svg
[license-url]: https://github.com/timoa/terraform-aws-module-example/blob/main/LICENSE
[pre-commit-url]: https://pre-commit.com/
[semantic-release-url]: https://semantic-release.gitbook.io/semantic-release/
[reviewdog-url]: https://github.com/reviewdog/reviewdog
[renovate-url]: https://www.whitesourcesoftware.com/free-developer-tools/renovate/
[shiftleft-scan-url]: https://shiftleft.io/docs/scan/