forked from shinzui/node-hcl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
48 lines (40 loc) · 924 Bytes
/
test.js
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
47
48
"use strict";
const HCL = require("./index")(".tf"),
PrettyPrint = require("prettyjson");
// const object = HCL.load("./AppFile");
//
// console.log("\n--- Lets see how we did ---\n")
// console.log(PrettyPrint.render(object));
const object = {
"application": {
"awesomeString": "string",
"awesomeNumber": 100,
"awsomeBoolean": true,
"array": [
"string",
true,
10
],
"object": {
"key": "value"
}
},
"variable": {
"bool": true,
"image": {
"default": "value",
"description": "the AMI to use"
},
"images": {
"description": "the AMI to use",
"default": {
"us-east-1": "image-1234",
"us-west-2": "image-4567"
}
}
}
}
const testObject = HCL.load("./Norma");
console.log(HCL.stringify(testObject));
console.log("\n--- Lets see how we did ---\n")
console.log(PrettyPrint.render(testObject));