Skip to content

Commit 3319e71

Browse files
committed
Update README
1 parent 708497b commit 3319e71

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

README.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,45 @@
1-
# terraform-export-gh-action
1+
# Polytomic Terraform Sync
22

3-
The `polytomic/terraform-export-gh-action` action exports Polytomic resources to
4-
Terraform HCL.
3+
The `polytomic/terraform-sync` action exports Polytomic resources to Terraform
4+
HCL.
55

66
See https://github.com/polytomic/terraform-sync-template for a template
77
repository that configures the action and uses it to create pull requests for
88
changes.
9+
10+
## Usage
11+
12+
This action may be used in a Github workflow as follows:
13+
14+
```yaml
15+
on:
16+
schedule:
17+
# Runs "At every 10th minute." (https://crontab.guru/#*/10_*_*_*_*)
18+
- cron: "*/10 * * * *"
19+
20+
env:
21+
POLYTOMIC_API_KEY: ${{ secrets.POLYTOMIC_API_KEY }}
22+
23+
jobs:
24+
pull-request:
25+
environment: exporter
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v3
29+
- name: Create output directory
30+
run: |
31+
mkdir -p terraform
32+
- name: Polytomic Terraform Sync
33+
uses: polytomic/terraform-export-gh-action@v0.1.0
34+
with:
35+
api_key: ${{ env.POLYTOMIC_API_KEY }}
36+
- name: Commit changes
37+
uses: EndBug/add-and-commit@v9
38+
```
39+
40+
The following arguments are supported:
41+
42+
- `api_key`: The Polytomic API key to use when exporting resources (required).
43+
- `output_dir`: The output directly to write to; defaults to `terraform`.
44+
- `url`: The URL of the Polytomic deployment to sync from; defaults to
45+
`https://app.polytomic.com`.

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# action.yml
22
name: "Polytomic Terraform Sync"
3-
description: "Syncs Polytomic resources to HCL"
3+
description: "Generates Terraform HCL from Polytomic."
44
branding:
55
icon: "archive"
66
color: "purple"

0 commit comments

Comments
 (0)