Skip to content

Commit 15a570b

Browse files
authored
Merge pull request #100 from trussworks/barry-update-validate-yml
"ci: validate-tf instead of validate and TFDocs GHA"
2 parents 1f2f8b9 + e407eb6 commit 15a570b

File tree

3 files changed

+67
-9
lines changed

3 files changed

+67
-9
lines changed

.github/workflows/validate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: validate
1+
name: validate-tf
22

33
on:
44
push:
@@ -9,7 +9,7 @@ on:
99
- main
1010

1111
jobs:
12-
validate:
13-
uses: trussworks/shared-actions/.github/workflows/validate.yml@main
12+
validate-tf:
13+
uses: trussworks/shared-actions/.github/workflows/validate-tf.yml@main
1414
with:
1515
go-version: 1.19

.pre-commit-config.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.3.0
3+
rev: v4.4.0
44
hooks:
55
- id: check-json
66
- id: check-merge-conflict
@@ -25,7 +25,7 @@ repos:
2525
exclude: README.m(ark)?d(own)?
2626

2727
- repo: https://github.com/igorshubovych/markdownlint-cli
28-
rev: v0.32.2
28+
rev: v0.33.0
2929
hooks:
3030
- id: markdownlint
3131

@@ -34,10 +34,13 @@ repos:
3434
hooks:
3535
- id: shell-lint
3636

37+
- repo: https://github.com/terraform-docs/terraform-docs
38+
rev: "v0.16.0"
39+
hooks:
40+
- id: terraform-docs-go
41+
args: ["markdown", "table", "--output-file", "README.md", "."]
42+
3743
- repo: https://github.com/antonbabenko/pre-commit-terraform
38-
rev: v1.76.0
44+
rev: v1.77.1
3945
hooks:
40-
- id: terraform_docs
41-
args:
42-
- --args=--config=.terraform-docs.yml
4346
- id: terraform_fmt

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,58 @@ actions need to be performed.
281281
git checkout -b update_bootstrap_for_<ORG>_<NAME>
282282
git commit -am"Update the bootstrap stack to use the bootstrap terraform module"
283283
```
284+
285+
<!-- BEGIN_TF_DOCS -->
286+
## Requirements
287+
288+
| Name | Version |
289+
|------|---------|
290+
| terraform | >= 0.13.0 |
291+
| aws | >= 3.75.0 |
292+
293+
## Providers
294+
295+
| Name | Version |
296+
|------|---------|
297+
| aws | >= 3.75.0 |
298+
299+
## Modules
300+
301+
| Name | Source | Version |
302+
|------|--------|---------|
303+
| terraform\_state\_bucket | trussworks/s3-private-bucket/aws | ~> 4.3.0 |
304+
| terraform\_state\_bucket\_logs | trussworks/logs/aws | ~> 14.2.0 |
305+
306+
## Resources
307+
308+
| Name | Type |
309+
|------|------|
310+
| [aws_dynamodb_table.terraform_state_lock](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dynamodb_table) | resource |
311+
| [aws_iam_account_alias.alias](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_account_alias) | resource |
312+
313+
## Inputs
314+
315+
| Name | Description | Type | Default | Required |
316+
|------|-------------|------|---------|:--------:|
317+
| account\_alias | The desired AWS account alias. | `string` | n/a | yes |
318+
| bucket\_purpose | Name to identify the bucket's purpose | `string` | `"tf-state"` | no |
319+
| dynamodb\_point\_in\_time\_recovery | Point-in-time recovery options | `bool` | `false` | no |
320+
| dynamodb\_table\_name | Name of the DynamoDB Table for locking Terraform state. | `string` | `"terraform-state-lock"` | no |
321+
| dynamodb\_table\_tags | Tags of the DynamoDB Table for locking Terraform state. | `map(string)` | ```{ "Automation": "Terraform", "Name": "terraform-state-lock" }``` | no |
322+
| enable\_s3\_public\_access\_block | Bool for toggling whether the s3 public access block resource should be enabled. | `bool` | `true` | no |
323+
| log\_bucket\_tags | Tags to associate with the bucket storing the Terraform state bucket logs | `map(string)` | ```{ "Automation": "Terraform" }``` | no |
324+
| log\_bucket\_versioning | A string that indicates the versioning status for the log bucket. | `string` | `"Disabled"` | no |
325+
| log\_name | Log name (for backwards compatibility this can be modified to logs) | `string` | `"log"` | no |
326+
| log\_retention | Log retention of access logs of state bucket. | `number` | `90` | no |
327+
| manage\_account\_alias | Manage the account alias as a resource. Set to 'false' if this behavior is not desired. | `bool` | `true` | no |
328+
| region | AWS region. | `string` | n/a | yes |
329+
| state\_bucket\_tags | Tags to associate with the bucket storing the Terraform state files | `map(string)` | ```{ "Automation": "Terraform" }``` | no |
330+
331+
## Outputs
332+
333+
| Name | Description |
334+
|------|-------------|
335+
| dynamodb\_table | The name of the dynamo db table |
336+
| logging\_bucket | The logging\_bucket name |
337+
| state\_bucket | The state\_bucket name |
338+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)