Skip to content

Commit bbc03ae

Browse files
committed
everything else
1 parent 662b4ff commit bbc03ae

8 files changed

Lines changed: 83 additions & 4 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff 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

bin/install-macos.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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

examples/basic/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# basic example
2+
A basic example for this repository

examples/basic/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
module "example" {
3+
source = "../.."
4+
}

main.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
}

outputs.tf

Whitespace-only changes.

variables.tf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
}

0 commit comments

Comments
 (0)