> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# masutaka/tfupdate

CircleCI orb for tfupdate.


## Commands

### provider

Update a provider to latest

| Parameter | Type | Default | Description |
|---|---|---|---|
| `args` | string | -r ./ | Arguments for tfupdate command |
| `assignees` | string |  | A comma-separated list (no spaces around the comma) of GitHub handles to assign to this pull request |
| `base_branch` | string | master | A base branch name to update |
| `provider_name` | string |  | A name of provider |
| `repo_name` | string |  | A name of GitHub repository |

### setup

Setup tfupdate

| Parameter | Type | Default | Description |
|---|---|---|---|
| `git_user_email` | string |  | git user email |
| `git_user_name` | string |  | git user name |
| `github_token` | env_var_name | GITHUB_TOKEN | environment variable name for GitHub access token |

### terraform

Update the terraform to latest

| Parameter | Type | Default | Description |
|---|---|---|---|
| `args` | string | -r ./ | Arguments for tfupdate command |
| `assignees` | string |  | A comma-separated list (no spaces around the comma) of GitHub handles to assign to this pull request |
| `base_branch` | string | master | A base branch name to update |

## Executors

### default

| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag` | string | latest |  |

## Examples

### tfupdate_and_create_pull_request

Run tfupdate and create pull request if needed.
Uses https://github.com/minamijoyo/tfupdate


```yaml
version: '2.1'
orbs:
  tfupdate: masutaka/tfupdate@x
workflows:
  scheduled:
    jobs:
      - tfupdate
    triggers:
      - schedule:
          cron: 0 0 * * *
          filters:
            branches:
              only:
                - master
  tfupdate_test:
    jobs:
      - tfupdate:
          filters:
            branches:
              only:
                - /tfupdate-.*/
  version: 2
```