Skip to content

Commit 3e9f2c1

Browse files
committed
Simplify usage example
1 parent 57b35c7 commit 3e9f2c1

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,7 @@ To parse HCL into a PHP object, create a new `HCLParser` object passing a string
2020
as the first parameter of the construction, then call the `parse` method. See the example below.
2121

2222
```php
23-
$hcl = '
24-
# Specify the provider and access details
25-
provider "aws" {
26-
access_key = "${var.access_key}"
27-
secret_key = "${var.secret_key}"
28-
region = "${var.region}"
29-
}
30-
31-
# Create an instance
32-
resource "aws_instance" "example" {
33-
ami = "ami-2757f631"
34-
instance_type = "t2.micro"
35-
}
36-
37-
';
38-
23+
$hcl = file_get_contents('example.tf');
3924
$configObject = (new HCLParser($hcl))->parse();
4025
```
4126

0 commit comments

Comments
 (0)