forked from dhall-terraform/dhall-terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (33 loc) · 1.54 KB
/
Makefile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
shell:
nix-shell --attr env shell.nix
release:
nix-build shell.nix
install:
nix-env -f shell.nix -i
hlint:
hlint ./app
hlint ./src
gen-google-schema:
cd tf/google && terraform init && terraform providers schema -json | jq > schema.json
gen-aws-schema:
cd tf/aws && terraform init && terraform providers schema -json | jq > schema.json
gen-azure-schema:
cd tf/azurerm && terraform init && terraform providers schema -json | jq > schema.json
gen-oci-schema:
cd tf/oci && terraform init && terraform providers schema -json | jq > schema.json
gen-aci-schema:
cd tf/aci && terraform init && terraform providers schema -json | jq > schema.json
gen-kubernetes-schema:
cd tf/kubernetes && terraform init && terraform providers schema -json | jq > schema.json
patch-aws-schema:
# Although it's not specified in the schema the aws provider also takes a version parameter.
# Without it, it defaults to the latest availalbe.
@echo "Adding the version field on the provider"
jq '.provider_schemas.aws.provider.block.attributes += {"version": { "type": "string", "optional": true, "description": "The desired version for the provider" } }' \
./tf/aws/schema.json > ./tf/aws/schema-patched.json
patch-azurerm-schema:
@echo "Adding the version field on the provider"
jq '.provider_schemas.azurerm.provider.block.attributes += {"version": { "type": "string", "optional": true, "description": "The desired version for the provider" } }' \
./tf/azurerm/schema.json > ./tf/azurerm/schema-patched.json
gen-nix:
cabal2nix --no-haddock --no-check . > default.nix