Skip to content

Commit 55253d0

Browse files
authored
Merge pull request #15 from OpsLevel/eo/fix-predicate-export
Eo/fix predicate export
2 parents 5f158bd + 01d0205 commit 55253d0

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Bugfix
2+
body: Fix bug when exporting regex predicates to terraform
3+
time: 2022-02-23T10:52:11.626318-06:00

src/cmd/terraform.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,9 @@ func flattenPredicate(key string, value *opslevel.Predicate) string {
399399
config := `
400400
%s {
401401
type = "%s"
402-
value = "%s"
402+
value = <<-EOT
403+
%s
404+
EOT
403405
}
404406
`
405407
if value != nil {
@@ -414,7 +416,9 @@ func flattenFilterPredicate(value *opslevel.FilterPredicate) string {
414416
key = "%s"
415417
key_data = "%s"
416418
type = "%s"
417-
value = "%s"
419+
value = <<-EOT
420+
%s
421+
EOT
418422
}
419423
`
420424
if value != nil {

0 commit comments

Comments
 (0)