From e686fba899f6929551e467e0cc96636aaa926193 Mon Sep 17 00:00:00 2001 From: arnol377 Date: Wed, 26 Mar 2025 19:19:52 -0400 Subject: [PATCH] docs: standardize README documentation --- README.md | 58 ++++++------------------------------------------------- 1 file changed, 6 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 63064fb..578279a 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,9 @@ # terraform-validate -A GitHub composite action that runs `terraform validate` on a workspace after initializing it. - ## Description - The `terraform-validate` action automates the validation of Terraform configurations by running `terraform init` followed by `terraform validate`. It handles backend configuration and variable files, making it easy to validate Terraform code in your CI/CD pipelines. ## Features - - Automatically runs `terraform init` before validation - Supports custom working directories - Handles backend configuration variables @@ -17,64 +13,22 @@ The `terraform-validate` action automates the validation of Terraform configurat ## Inputs -| Name | Description | Required | Default | -|------|-------------|----------|---------| -| `working-directory` | Directory containing Terraform configuration files | false | `.` | -| `backend-config` | Backend configuration variables, one per line | false | N/A | -| `var-file` | Path to a Terraform tfvars file | false | N/A | +This action has no inputs. ## Outputs | Name | Description | |------|-------------| -| `is_valid` | Whether the Terraform configuration is valid (true/false) | -| `stdout` | Output from terraform validate command | -| `stderr` | Any error output from terraform validate command | +| `is_valid` | No description provided | +| `description` | No description provided | +| `stdout` | No description provided | +| `stderr` | No description provided | ## Usage Examples -### Basic Validation - -```yaml -jobs: - validate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup Terraform - uses: hashicorp/setup-terraform@v3 - - - name: Validate Terraform Configuration - uses: CSVD/terraform-validate@v1 - with: - working-directory: './terraform' -``` - -### With Backend Configuration - -```yaml -jobs: - validate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup Terraform - uses: hashicorp/setup-terraform@v3 - - - name: Validate Terraform Configuration - uses: CSVD/terraform-validate@v1 - with: - working-directory: './terraform' - backend-config: | - bucket=my-terraform-state - key=prod/terraform.tfstate - region=us-east-1 -``` ## Requirements - - Terraform must be installed in the runner environment (typically using `hashicorp/setup-terraform` action) - Repository must be checked out before running this action - Appropriate AWS credentials if using remote state in S3 (or similar backend configuration) +