Skip to content

suzuki-shunsuke/github-action-terraform-init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-action-terraform-init

GitHub Actions to run terraform init and terraform providers lock. If Terraform lock file .terraform.lock.hcl is created or updated, this action pushes a commit to the remote branch GITHUB_HEAD_REF.

image

--

image

Requirements

Example

- uses: suzuki-shunsuke/github-action-terraform-init@main
  with:
    github_app_token: ${{ secrets.GITHUB_APP_TOKEN }}
- uses: suzuki-shunsuke/github-action-terraform-init@main
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    github_app_token: ${{ secrets.GITHUB_APP_TOKEN }}
    working_directory: foo
    skip_push: "true"
    terraform_command: tofu

Inputs

Required Inputs

name description
github_app_token GitHub Access Token. This is used to push a commit to the remote branch

Optional Inputs

name default description
github_token github.token GitHub Access Token. This is used to notify the failure with github-comment
working_directory "" (current directory) Working Directory path
providers_lock_opts -platform=windows_amd64 -platform=linux_amd64 -platform=darwin_amd64 terraform providers lock options
skip_push "" If "true", a commit isn't pushed to the remote branch
terraform_command terraform You can execute a tool such as OpenTofu instead of Terraform

Outputs

Nothing.

License

MIT