Framework for Monorepo to build high level Terraform Workflows by GitHub Actions
MIT License
Bot releases are hidden (Show)
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.5.2...v0.5.3 | Base revision
The bug affects v0.5.2
When we release v0.5.2 with the release script, local changes were committed accidentally.
https://github.com/suzuki-shunsuke/tfaction/commit/25a5bbe9412f5c422d236c732541a45cc206e07a
Published by suzuki-shunsuke over 2 years ago
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.5.1...v0.5.2 | Base revision
https://github.com/suzuki-shunsuke/tfaction/releases/tag/v0.5.3
When we release v0.5.2 with the release script, local changes were committed accidentally.
https://github.com/suzuki-shunsuke/tfaction/commit/25a5bbe9412f5c422d236c732541a45cc206e07a
#251 terraform-plan, terraform-apply: Set -no-color
to allow tfcmt to parse terraform's error and warning properly
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.5.0...v0.5.1 | Base revision
#247 scaffold-tfmigrate: Create a tfmigrate:*
label properly
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.4.12...v0.5.0 | Base revision
#183 #204 ignore
labels are replaced to skip
labels
https://suzuki-shunsuke.github.io/tfaction/docs/feature/tfmigrate#multi_state-migration
When you use tfmigrate across multiple Terraform States, please use skip:*
label instead of ignore:*
label.
ignore:*
label was abolished.
If skip*
label is set, terraform plan
and terraform apply
are skipped but other steps such as test are run.
The configuration label_prefixes.ignore
in tfaction-root.yaml
is replaced to label_prefixes.skip
.
#202 #207 Support skipping to create pull requests
#221 #222 Support managing Terraform Modules
#214 Decrease the number of GitHub API call by storing ci-info's result as artifacts
#202 #207 https://suzuki-shunsuke.github.io/tfaction/docs/feature/skip-creating-pr
tfaction supports creating some types of pull requests.
They are really useful, but these pull requests are created by GitHub App so you can pass 1 approval Required by approving your changes by yourself. To solve the problem, tfaction provides the setting skip_create_pr
in tfaction-root.yaml
.
skip_create_pr: true # By default, this is false
If this is true, tfaction creates a feature branch and guides how to create a pull request but doesn't create a pull request.
Please see the tfaction's message and create a pull request by gh pr create command.
#221 #222 https://suzuki-shunsuke.github.io/tfaction/docs/feature/module
tfaction supports scaffolding, testing, and releasing Terraform Modules.
Furthermore, tfaction supports generating the Module document with terraform-docs automatically.
Three actions have been added.
⚠️ terraform-docs is required.
Please add terraform-docs/terraform-docs
to aqua.yaml
.
$ aqua g -i terraform-docs/terraform-docs
Add the output modules
.
jobs:
setup:
runs-on: ubuntu-latest
outputs:
tfmigrate_targets: ${{ steps.list-targets.outputs.tfmigrate_targets }}
terraform_targets: ${{ steps.list-targets.outputs.terraform_targets }}
modules: ${{ steps.list-targets.outputs.modules }} # Add
Add the job test-module
.
test-module:
name: "test-module (${{matrix.target}})"
runs-on: ubuntu-latest
needs: setup
# if services is empty, the build job is skipped
if: "join(fromJSON(needs.setup.outputs.modules), '') != ''"
env:
TFACTION_TARGET: ${{matrix.target}}
strategy:
fail-fast: true
matrix:
target: ${{fromJSON(needs.setup.outputs.modules)}}
steps:
- uses: actions/checkout@v2
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: aquaproj/[email protected]
with:
aqua_version: v1.1.0
aqua_opts: -l -a
working_directory: ${{ matrix.target }}
- uses: suzuki-shunsuke/tfaction/[email protected]
with:
github_app_token: ${{ steps.generate_token.outputs.token }}
release-module
and scaffold-module
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.5.0-5...v0.5.0-6 | Base revision
#240 (create-follow-up-pr): create a label properly
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.5.0-4...v0.5.0-5 | Base revision
#239 release-module: Create a Release Note
e.g.
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.5.0-3...v0.5.0-4 | Base revision
#238 (test-module): Remove .terraform.lock.hcl before running terraform-docs
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.5.0-2...v0.5.0-3 | Base revision
#235 Lint before generation
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.5.0-1...v0.5.0-2 | Base revision
#233 #234 Fix release-module action
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.5.0-0...v0.5.0-1 | Base revision
#221 #222 Support managing Terraform Modules
Three actions have been added.
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.4.12...v0.5.0 | Base revision
#183 #204 ignore
labels are replaced to skip
labels
When you use tfmigrate across multiple Terraform States, please use skip:*
label instead of ignore:*
label.
ignore:*
label was abolished.
If skip*
label is set, terraform plan
and terraform apply
are skipped but other steps such as test are run.
The configuration label_prefixes.ignore
in tfaction-root.yaml
is replaced to label_prefixes.skip
.
#202 #207 Support skipping to create pull requests
#214 Decrease the number of GitHub API call by storing ci-info's result as artifacts
#202 #207
tfaction supports creating some types of pull requests.
They are really useful, but these pull requests are created by GitHub App so you can pass 1 approval Required by approving your changes by yourself. To solve the problem, tfaction provides the setting skip_create_pr
in tfaction-root.yaml
.
skip_create_pr: true # By default, this is false
If this is true, tfaction creates a feature branch and guides how to create a pull request but doesn't create a pull request.
Please see the tfaction's message and create a pull request by gh pr create command.
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.4.11...v0.4.12 | Base revision
#189 #201 Support changing terraform providers lock options
https://github.com/suzuki-shunsuke/github-action-terraform-init/releases/tag/v0.1.4
#199 Update tfsec, tflint, terraform-init action
Published by suzuki-shunsuke over 2 years ago
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.4.10...v0.4.11 | Base revision
#179 #180 Add mention to Follow up Pull Request Body
e.g.
#185 create-scaffold-pr: Add mention to GITHUB_ACTOR
#184 #187 #188 Add a workflow for tfmigrate
---
name: scaffold tfmigrate
on:
workflow_dispatch:
inputs:
target:
description: 'target'
required: true
migration_name:
description: 'migration name. e.g. "import_foo"'
required: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TFACTION_TARGET: ${{github.event.inputs.target}}
permissions:
contents: read
pull-requests: write
jobs:
scaffold:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: aquaproj/[email protected]
with:
aqua_version: v0.10.2
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: suzuki-shunsuke/tfaction/scaffold-tfmigrate@main
id: scaffold-working-dir
with:
github_app_token: ${{ steps.generate_token.outputs.token }}
migration_name: ${{github.event.inputs.migration_name}}
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.4.11-1...v0.4.11-2 | Base revision
#188 Fix scaffold .tfmigrate.hcl. Follow up #187
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.4.11-0...v0.4.11-1 | Base revision
#185 create-scaffold-pr: Add mention to GITHUB_ACTOR
#184 #187 Add a workflow for tfmigrate
---
name: scaffold tfmigrate
on:
workflow_dispatch:
inputs:
target:
description: 'target'
required: true
migration_name:
description: 'migration name. e.g. "import_foo"'
required: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TFACTION_TARGET: ${{github.event.inputs.target}}
permissions:
contents: read
pull-requests: write
jobs:
scaffold:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: aquaproj/[email protected]
with:
aqua_version: v0.10.2
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: suzuki-shunsuke/tfaction/scaffold-tfmigrate@main
id: scaffold-working-dir
with:
github_app_token: ${{ steps.generate_token.outputs.token }}
migration_name: ${{github.event.inputs.migration_name}}
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.4.10...v0.4.11-0 | Base revision
#179 #180 Add mention to Follow up Pull Request Body
e.g.
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.4.9...v0.4.10 | Base revision
#171 Update tflint action to notify with github-comment
#172 Update tfsec action to notify with github-comment
#176 Remove template_dir
from tfaction.yaml
. template_dir
is used in tfaction-root.yaml
Published by suzuki-shunsuke over 2 years ago
Issues | Pull Requests | https://github.com/suzuki-shunsuke/tfaction/compare/v0.4.9...v0.4.10-1 | Base revision
#172 Update tfsec action to notify with github-comment