Skip to content

Commit

Permalink
Merge pull request #2 from BCDevOps/add-gha-workflows
Browse files Browse the repository at this point in the history
add gha workflows
  • Loading branch information
wrnu authored Feb 14, 2023
2 parents c01c966 + 8b751ac commit 15977fe
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/terraform-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Generate terraform docs
on:
- pull_request
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Render terraform docs inside the README.md and push changes back to PR branch
uses: terraform-docs/[email protected]
with:
working-dir: .
output-file: README.md
output-method: inject
git-push: "true"
12 changes: 12 additions & 0 deletions .github/workflows/terraform-fmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: terraform format check
on:
- pull_request
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-terraform@v2

- name: terraform fmt
run: terraform fmt -check -recursive -diff
15 changes: 15 additions & 0 deletions .github/workflows/terraform-validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: terraform validate
on:
- pull_request
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-terraform@v2

- name: terraform init
run: terraform init -input=false -backend=false

- name: terraform validate
run: terraform validate
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,46 @@ This repo provides a starting point for users who want to create valid Terraform
- [x] Development
- [ ] Production/Maintenance

## Documentation
<!--- Point to another readme or create a GitHub Pages (https://guides.github.com/features/pages/) --->
# Documentation

<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~>4.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~>4.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_organizations_organization.org_root](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/organizations_organization) | data source |
| [aws_organizations_organizational_units.org_ous](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/organizations_organizational_units) | data source |

## Inputs

No inputs.

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_core_accounts"></a> [core\_accounts](#output\_core\_accounts) | n/a |
| <a name="output_master_account"></a> [master\_account](#output\_master\_account) | n/a |
| <a name="output_root"></a> [root](#output\_root) | n/a |
| <a name="output_workload_accounts"></a> [workload\_accounts](#output\_workload\_accounts) | n/a |
| <a name="output_workload_ous"></a> [workload\_ous](#output\_workload\_ous) | n/a |
<!-- END_TF_DOCS -->

## Getting Started
<!--- setup env vars, secrets, instructions... --->
Expand Down

0 comments on commit 15977fe

Please sign in to comment.