Skip to content

Commit

Permalink
Fixes path for file reference
Browse files Browse the repository at this point in the history
  • Loading branch information
sebradloff committed Apr 24, 2020
1 parent 504ec2a commit 17f2bfd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/hclfile/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (f *HCLFile) AddK8sObjectToResourceBlockContentFile(o *unstructured.Unstruc
},
{
Type: hclsyntax.TokenQuotedLit,
Bytes: []byte(pathToK8sFile),
Bytes: []byte("/" + pathToK8sFile),
},
{
Type: hclsyntax.TokenCQuote,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "k8s_manifest" "test_apps-v1_Deployment_another" {
content = file("${path.module}fake-another.yaml")
content = file("${path.module}/fake-another.yaml")
}

2 changes: 1 addition & 1 deletion pkg/hclfile/test-fixtures/one_object_with_file_content.hcl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "k8s_manifest" "test_apps-v1_Deployment_one" {
content = file("${path.module}fake-one.yaml")
content = file("${path.module}/fake-one.yaml")
}

2 changes: 1 addition & 1 deletion testdata/golden/one-obj-file-reference.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "k8s_manifest" "default_apps-v1_Deployment_nginx-deployment" {
content = file("${path.module}../testdata/k8s-files/one-obj.yaml")
content = file("${path.module}/../testdata/k8s-files/one-obj.yaml")
}

0 comments on commit 17f2bfd

Please sign in to comment.