File tree Expand file tree Collapse file tree 2 files changed +41
-4
lines changed
Expand file tree Collapse file tree 2 files changed +41
-4
lines changed Original file line number Diff line number Diff line change 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
66See https://github.com/polytomic/terraform-sync-template for a template
77repository that configures the action and uses it to create pull requests for
88changes.
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` .
Original file line number Diff line number Diff line change 11# action.yml
22name : " Polytomic Terraform Sync"
3- description : " Syncs Polytomic resources to HCL "
3+ description : " Generates Terraform HCL from Polytomic. "
44branding :
55 icon : " archive"
66 color : " purple"
You can’t perform that action at this time.
0 commit comments