Skip to content

Commit b03136d

Browse files
authored
Merge pull request #371 from dflook/docs-gen
Updates docs for consistency
2 parents d31e85d + a5b70a2 commit b03136d

File tree

121 files changed

+4616
-1245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+4616
-1245
lines changed

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ jobs:
2828
with:
2929
persist-credentials: true
3030

31-
- name: Check tofu actions are up to date
31+
- name: Check action documentation is up-to-date
3232
run: |
33-
python3 tofu/tofuize.py
33+
PYTHONPATH=docs-gen python3 docs-gen/generate.py
3434
git diff --exit-code
3535
3636
- name: Registry login

.github/workflows/test.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ jobs:
6464
# run: |
6565
# GNUPGHOME=$HOME/.gnupg PYTHONPATH=image/tools:image/src pytest tests
6666

67-
tofu:
67+
docs:
6868
runs-on: ubuntu-24.04
69-
name: OpenTofu actions
69+
name: Check documentation
7070
env:
7171
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
7272
steps:
@@ -75,7 +75,8 @@ jobs:
7575
with:
7676
persist-credentials: false
7777

78-
- name: Check tofu actions are up to date
78+
- name: Check documentation is up-to-date
7979
run: |
80-
python3 tofu/tofuize.py
80+
PYTHONPATH=docs-gen python3 docs-gen/generate.py
8181
git diff --exit-code
82+

README.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Terraform and OpenTofu GitHub Actions ![release](https://img.shields.io/github/v/release/dflook/terraform-github-actions)![job runs](https://img.shields.io/docker/pulls/danielflook/terraform-github-actions?label=job%20runs)
22

3-
This is a suite of terraform and OpenTofu related GitHub Actions that can be used together to build effective Infrastructure as Code workflows.
3+
This is a suite of Terraform and OpenTofu related GitHub Actions that can be used together to build effective Infrastructure as Code workflows.
44

55
[GitHub Actions](https://github.com/features/actions) are a way to make automated workflows that trigger when events occur on your GitHub repository, using a YAML file that lives in your repo.
66
These actions can be used to easily perform [Terraform](https://www.terraform.io/) or [OpenTofu](https://www.opentofu.org/) tasks as part of your workflow.
@@ -10,27 +10,29 @@ Currently, there is just experimental support for OpenTofu, see [here](https://g
1010
## Actions
1111
See the documentation for the available actions:
1212

13-
- [dflook/terraform-plan](terraform-plan)
14-
- [dflook/terraform-apply](terraform-apply)
15-
- [dflook/terraform-output](terraform-output)
16-
- [dflook/terraform-remote-state](terraform-remote-state)
17-
- [dflook/terraform-validate](terraform-validate)
18-
- [dflook/terraform-fmt-check](terraform-fmt-check)
19-
- [dflook/terraform-fmt](terraform-fmt)
20-
- [dflook/terraform-check](terraform-check)
21-
- [dflook/terraform-new-workspace](terraform-new-workspace)
22-
- [dflook/terraform-destroy-workspace](terraform-destroy-workspace)
23-
- [dflook/terraform-destroy](terraform-destroy)
24-
- [dflook/terraform-version](terraform-version)
25-
- [dflook/terraform-unlock-state](terraform-unlock-state)
26-
- [dflook/terraform-test](terraform-test)
13+
| Terraform | OpenTofu |
14+
|--------------------------------------------------------------------|---------------------------------------------------------|
15+
| [dflook/terraform-plan](terraform-plan) | [dflook/tofu-plan](tofu-plan) |
16+
| [dflook/terraform-apply](terraform-apply) | [dflook/tofu-apply](tofu-apply) |
17+
| [dflook/terraform-output](terraform-output) | [dflook/tofu-output](tofu-output) |
18+
| [dflook/terraform-remote-state](terraform-remote-state) | [dflook/tofu-remote-state](tofu-remote-state) |
19+
| [dflook/terraform-validate](terraform-validate) | [dflook/tofu-validate](tofu-validate) |
20+
| [dflook/terraform-fmt-check](terraform-fmt-check) | [dflook/tofu-fmt-check](tofu-fmt-check) |
21+
| [dflook/terraform-fmt](terraform-fmt) | [dflook/tofu-fmt](tofu-fmt) |
22+
| [dflook/terraform-check](terraform-check) | [dflook/tofu-check](tofu-check) |
23+
| [dflook/terraform-new-workspace](terraform-new-workspace) | [dflook/tofu-new-workspace](tofu-new-workspace) |
24+
| [dflook/terraform-destroy-workspace](terraform-destroy-workspace) | [dflook/tofu-destroy-workspace](tofu-destroy-workspace) |
25+
| [dflook/terraform-destroy](terraform-destroy) | [dflook/tofu-destroy](tofu-destroy) |
26+
| [dflook/terraform-version](terraform-version) | [dflook/tofu-version](tofu-version) |
27+
| [dflook/terraform-unlock-state](terraform-unlock-state) | [dflook/tofu-unlock-state](tofu-unlock-state) |
28+
| [dflook/terraform-test](terraform-test) | [dflook/tofu-test](tofu-test) |
2729

2830
## Example Usage
29-
These terraform actions can be added as steps to your own workflow files.
31+
These actions can be added as steps to your own workflow files.
3032
GitHub reads workflow files from `.github/workflows/` within your repository.
3133
See the [Workflow documentation](https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#about-workflows) for details on writing workflows.
3234

33-
Here are some examples of how the terraform actions can be used together in workflows.
35+
Here are some examples of how the actions can be used together in workflows.
3436

3537
### Terraform plan PR approval
3638

@@ -48,7 +50,7 @@ You can make GitHub enforce this using branch protection, see the [dflook/terraf
4850
In this example we use two workflows:
4951

5052
#### plan.yaml
51-
This workflow runs on changes to a PR branch. It generates a terraform plan and attaches it to the PR as a comment.
53+
This workflow runs on changes to a PR branch. It generates a Terraform plan and attaches it to the PR as a comment.
5254
```yaml
5355
name: Create terraform plan
5456

@@ -179,7 +181,7 @@ jobs:
179181
```
180182
181183
### Scheduled infrastructure updates
182-
There may be times when you expect terraform to plan updates without any changes to your terraform configuration files.
184+
There may be times when you expect Terraform to plan updates without any changes to your configuration files.
183185
Your configuration could be consuming secrets from elsewhere, or renewing certificates every few months.
184186
185187
This example workflow runs every morning and applies any outstanding changes to those specific resources.
@@ -211,7 +213,7 @@ jobs:
211213
```
212214
213215
### Automatically fixing formatting
214-
Perhaps you don't want to spend engineer time making formatting changes. This workflow will automatically create or update a PR that fixes any terraform formatting issues.
216+
Perhaps you don't want to spend engineer time making formatting changes. This workflow will automatically create or update a PR that fixes any formatting issues.
215217
216218
#### fmt.yaml
217219
```yaml
@@ -253,7 +255,7 @@ There are two workflows:
253255
#### integration-test.yaml
254256
This workflow runs with every change to a PR.
255257
256-
It deploys the testing infrastructure using a terraform workspace dedicated to this branch, then runs integration tests against the new infrastructure.
258+
It deploys the testing infrastructure using a Terraform workspace dedicated to this branch, then runs integration tests against the new infrastructure.
257259
258260
```yaml
259261
name: Run integration tests
@@ -310,7 +312,3 @@ jobs:
310312
path: my-terraform-config
311313
workspace: ${{ github.head_ref }}
312314
```
313-
314-
## What if I don't use GitHub Actions?
315-
If you use CircleCI, check out OVO Energy's [`ovotech/terraform`](https://github.com/ovotech/circleci-orbs/tree/master/terraform) CircleCI orb.
316-
If you use Jenkins, you have my sympathy.

0 commit comments

Comments
 (0)