Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/userbradley/action-install-terraform
Install Terraform for GitHub Actions
https://github.com/userbradley/action-install-terraform
Last synced: 28 days ago
JSON representation
Install Terraform for GitHub Actions
- Host: GitHub
- URL: https://github.com/userbradley/action-install-terraform
- Owner: userbradley
- Created: 2023-09-24T00:47:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-08T22:55:28.000Z (3 months ago)
- Last Synced: 2024-10-15T03:31:09.716Z (2 months ago)
- Size: 17.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub Action: Install Terraform
This action is designed to install Terraform by using the `provider.tf` version of terraform requested
## Quick Start
```yaml
name: Install terraform with specified versionon: [push]
jobs:
terraform:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Terraform
uses: userbradley/[email protected]
with:
providerFileLocation: "terraform"
```## Terraform Wrapper
```yaml
name: Install terraform with specified versionon: [push]
jobs:
terraform:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Terraform
uses: userbradley/[email protected]
with:
providerFileLocation: "terraform"
wrapper: true
```Assumes your directory structure is as below:
```text
.
└── repo
├── .github
│ └── workflows
│ └── install-terraform.yml
└── terraform
├── backend.tf
├── main.tf
└── provider.tf
```The workflow will inspect the `provider.tf` file and install the required terraform version as specified in
```hcl
terraform {
required_version = "1.5.3"
}
```## Inputs
| Input Name | Required | Default Value | Example |
|------------------------|----------|-----------------------|----------------------------------|
| `providerFileLocation` | `no` | `terraform/templates` | `terraform/deployments/puppy-ui` |
| `wrapper` | `no` | `false` | `true` |---
Created by Bradley