https://github.com/tmknom/template-terraform-module
Terraform module template following Standard Module Structure.
https://github.com/tmknom/template-terraform-module
infrastructure-as-code terraform terraform-module
Last synced: 3 months ago
JSON representation
Terraform module template following Standard Module Structure.
- Host: GitHub
- URL: https://github.com/tmknom/template-terraform-module
- Owner: tmknom
- License: apache-2.0
- Created: 2018-09-17T03:26:54.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-24T10:52:17.000Z (almost 4 years ago)
- Last Synced: 2024-11-05T20:47:13.687Z (8 months ago)
- Topics: infrastructure-as-code, terraform, terraform-module
- Language: Shell
- Homepage:
- Size: 145 KB
- Stars: 6
- Watchers: 3
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# template-terraform-module
[](https://github.com/tmknom/template-terraform-module/actions?query=workflow%3ATerraform)
[](https://github.com/tmknom/template-terraform-module/actions?query=workflow%3A%22Shell+Script%22)
[](https://github.com/tmknom/template-terraform-module/actions?query=workflow%3AMarkdown)
[](https://github.com/tmknom/template-terraform-module/actions?query=workflow%3AYAML)
[](https://github.com/tmknom/template-terraform-module/actions?query=workflow%3AJSON)
[](https://registry.terraform.io/modules/tmknom/name/provider)
[](https://opensource.org/licenses/Apache-2.0)Terraform module template following [Standard Module Structure](https://www.terraform.io/docs/modules/create.html#standard-module-structure).
## Usage
Named `terraform--`. Module repositories must use this three-part name format.
```shell
curl -fsSL https://raw.githubusercontent.com/tmknom/template-terraform-module/master/install | sh -s terraform-aws-sample
cd terraform-aws-sample && make install
```## Examples
- [Minimal](https://github.com/tmknom/template-terraform-module/tree/master/examples/minimal)
- [Complete](https://github.com/tmknom/template-terraform-module/tree/master/examples/complete)## Requirements
Write your Terraform module requirements.
## Providers
Write your Terraform module providers.
## Inputs
Write your Terraform module inputs.
## Outputs
Write your Terraform module outputs.
## Development
### Development Requirements
- [Docker](https://www.docker.com/)
### Configure environment variables
```shell
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=ap-northeast-1
```### Installation
```shell
git clone [email protected]:tmknom/template-terraform-module.git
cd template-terraform-module
make install
```### Makefile targets
```text
apply-complete Run terraform apply examples/complete
apply-minimal Run terraform apply examples/minimal
check-format Check format code
clean Clean .terraform
destroy-complete Run terraform destroy examples/complete
destroy-minimal Run terraform destroy examples/minimal
diff Word diff
docs Generate docs
format Format code
help Show help
install Install requirements
lint Lint code
plan-complete Run terraform plan examples/complete
plan-minimal Run terraform plan examples/minimal
release Release GitHub and Terraform Module Registry
upgrade Upgrade makefile
```### Releasing new versions
Bump VERSION file, and run `make release`.
### Terraform Module Registry
-
## License
Apache 2 Licensed. See LICENSE for full details.