diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-30 14:04:37 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-30 14:04:37 +0100 |
commit | 191799ab976bd7dad7162d62bf86f2d3cc5d0dbd (patch) | |
tree | 1cb264828b8d8f05ee67c57650bf05aff381d2fb /module/ri-base/src/main/resources/io/trygvis | |
parent | bb92e6eaa9bca36d9f1e356a2f578d22c98af22f (diff) | |
download | rules-sandbox-191799ab976bd7dad7162d62bf86f2d3cc5d0dbd.tar.gz rules-sandbox-191799ab976bd7dad7162d62bf86f2d3cc5d0dbd.tar.bz2 rules-sandbox-191799ab976bd7dad7162d62bf86f2d3cc5d0dbd.tar.xz rules-sandbox-191799ab976bd7dad7162d62bf86f2d3cc5d0dbd.zip |
Better Terraform resources.
Diffstat (limited to 'module/ri-base/src/main/resources/io/trygvis')
-rw-r--r-- | module/ri-base/src/main/resources/io/trygvis/rules/scaleway/terraform.drl (renamed from module/ri-base/src/main/resources/io/trygvis/rules/terraform/terraform.drl) | 2 | ||||
-rw-r--r-- | module/ri-base/src/main/resources/io/trygvis/rules/terraform/terraform-resources.drl | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/module/ri-base/src/main/resources/io/trygvis/rules/terraform/terraform.drl b/module/ri-base/src/main/resources/io/trygvis/rules/scaleway/terraform.drl index 7313998..06bfc68 100644 --- a/module/ri-base/src/main/resources/io/trygvis/rules/terraform/terraform.drl +++ b/module/ri-base/src/main/resources/io/trygvis/rules/scaleway/terraform.drl @@ -1,4 +1,4 @@ -package io.trygvis.rules.terraform +package io.trygvis.rules.terraform.scaleway import io.trygvis.rules.dba.Cluster import io.trygvis.rules.dba.Container diff --git a/module/ri-base/src/main/resources/io/trygvis/rules/terraform/terraform-resources.drl b/module/ri-base/src/main/resources/io/trygvis/rules/terraform/terraform-resources.drl new file mode 100644 index 0000000..34af8fe --- /dev/null +++ b/module/ri-base/src/main/resources/io/trygvis/rules/terraform/terraform-resources.drl @@ -0,0 +1,14 @@ +package io.trygvis.rules.terraform; +import java.util.Map + +global io.trygvis.rules.engine.TemplateEngine te; + +dialect "mvel" + +rule "terraform-resources" + agenda-group "generate" +when + $r : TerraformResource() +then + te.template("terraform/resource", $r.output, Map.of("resource", $r)); +end |