File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ name : pre-commit-check
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+
9+ jobs :
10+ build :
11+ runs-on : macOS-latest
12+ steps :
13+ - uses : actions/checkout@v1
14+
15+ - name : Install prerequisites
16+ run : |
17+ brew install tfenv tflint terraform-docs pre-commit
18+ pre-commit install
19+ tfenv install
20+ - name : pre-commit run all
21+ run : |
22+ pre-commit run -a
Original file line number Diff line number Diff line change @@ -12,13 +12,25 @@ module "example" {
1212## About
1313
1414<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
15+ ## Requirements
16+
17+ No requirements.
18+
19+ ## Providers
20+
21+ No provider.
22+
1523## Inputs
1624
1725| Name | Description | Type | Default | Required |
18- | ------| -------------| :----:| :-----:| :-----:|
19- | env | Environment to tag resources with | string | ` "default" ` | no |
20- | name | Moniker to apply to all resources in the module | string | n/a | yes |
21- | tags | User-Defined tags | map(string) | ` {} ` | no |
26+ | ------| -------------| ------| ---------| :--------:|
27+ | env | Environment to tag resources with | ` string ` | ` "default" ` | no |
28+ | name | Moniker to apply to all resources in the module | ` string ` | n/a | yes |
29+ | tags | User-Defined tags | ` map(string) ` | ` {} ` | no |
30+
31+ ## Outputs
32+
33+ No output.
2234
2335<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
2436
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ echo ' installing brew packages'
4+ brew install tfenv tflint terraform-docs pre-commit
5+
6+ echo ' installing pre-commit hooks'
7+ pre-commit install
8+
9+ echo ' installing terraform with tfenv'
10+ tfenv install
Original file line number Diff line number Diff line change 1+ # basic example
2+ A basic example for this repository
Original file line number Diff line number Diff line change 1+
2+ module "example" {
3+ source = " ../.."
4+ }
Original file line number Diff line number Diff line change 1+
2+ module "tags" {
3+ source = " rhythmictech/tags/terraform"
4+ version = " 1.0.0"
5+
6+ enforce_case = " UPPER"
7+ tags = var. tags
8+ names = [
9+ var . env ,
10+ var . name
11+ ]
12+ }
Original file line number Diff line number Diff line change 1+
2+ variable "name" {
3+ description = " Moniker to apply to all resources in the module"
4+ type = string
5+ }
6+
7+ variable "tags" {
8+ description = " User-Defined tags"
9+ type = map (string )
10+ default = {}
11+ }
12+
13+ variable "env" {
14+ description = " Environment to tag resources with"
15+ type = string
16+ default = " default"
17+ }
You can’t perform that action at this time.
0 commit comments