Skip to content

Commit

Permalink
v1.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Apr 10, 2021
1 parent 7710b0c commit 57f5dce
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
47 changes: 45 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ the master branch:

## Inputs

These input values must be the same as any `terraform-plan` for the same configuration. (unless auto_approve: true)

* `path`

Path to the terraform configuration to apply
Expand All @@ -56,9 +58,50 @@ the master branch:
- Type: string
- Optional

* `var`
* `variables`

Variables to set for the terraform plan. This should be valid terraform syntax - like a [variable definition file](https://www.terraform.io/docs/language/values/variables.html#variable-definitions-tfvars-files).

```yaml
with:
variables: |
image_id = "${{ secrets.AMI_ID }}"
availability_zone_names = [
"us-east-1a",
"us-west-1c",
]
```
Variables set here override any given in `var_file`s.

- Type: string
- Optional

* ~~`var`~~

Comma separated list of terraform vars to set
> :warning: **Deprecated**: Use the `variables` input instead.

Comma separated list of terraform vars to set.

This is deprecated due to the following limitations:
- Only primitive types can be set with `var` - number, bool and string.
- String values may not contain a comma.
- Values set with `var` will be overridden by values contained in `var_file`s

You can change from `var` to `variables` by putting each variable on a separate line and ensuring each string value is quoted.

For example:
```yaml
with:
var: instance_type=m5.xlarge,nat_type=instance
```
Becomes:
```yaml
with:
variables: |
instance_type="m5.xlarge"
nat_type="instance"
```

- Type: string
- Optional
Expand Down
6 changes: 5 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ inputs:
description: Path to a backend config file
required: false
default: ""
variables:
description: Variable definitions
required: false
var:
description: Comma separated list of vars to set, e.g. 'foo=bar'
required: false
default: ""
deprecationMessage: Use the variables input instead.
var_file:
description: Comma separated list of var file paths
required: false
Expand All @@ -44,7 +48,7 @@ inputs:

runs:
using: docker
image: docker://danielflook/terraform-github-actions:v1.8.0
image: docker://danielflook/terraform-github-actions:v1.9.0
entrypoint: /entrypoints/apply.sh

branding:
Expand Down

0 comments on commit 57f5dce

Please sign in to comment.