-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmain.go
27 lines (23 loc) · 807 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main
import (
"flag"
"github.com/scottwinkler/terraform-policymaker/policymaker"
)
func main() {
providerPtr := flag.String("provider", "aws", "provider to fetch (e.g. aws)")
organizationPtr := flag.String("organization", "terraform-providers", "the github org to fetch provider from")
useCachePtr := flag.Bool("use-cache", true, "if no, then will redownload the provider from GitHub")
pathPtr := flag.String("path", "./test", "the path to your Terraform configuration code")
flag.Parse()
provider := *providerPtr
organization := *organizationPtr
useCache := *useCachePtr
path := *pathPtr
pm := policymaker.NewPolicyMaker(&policymaker.Options{
Provider: provider,
Organization: organization,
UseCache: useCache,
Path: path,
})
pm.GeneratePolicyDocument()
}