summaryrefslogtreecommitdiff
path: root/module/ri-base
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2021-02-01 16:45:47 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2021-02-01 16:45:47 +0100
commit2957c76e4027f47959f79354b07cdaa4b04da8c6 (patch)
tree0c7ddcada1549a2db7d3e4d09e2be9bd5442ae9d /module/ri-base
parent2726bd8739b78738745a462a4950b39cbfe4c1d7 (diff)
downloadrules-sandbox-2957c76e4027f47959f79354b07cdaa4b04da8c6.tar.gz
rules-sandbox-2957c76e4027f47959f79354b07cdaa4b04da8c6.tar.bz2
rules-sandbox-2957c76e4027f47959f79354b07cdaa4b04da8c6.tar.xz
rules-sandbox-2957c76e4027f47959f79354b07cdaa4b04da8c6.zip
Updating files.
Diffstat (limited to 'module/ri-base')
-rw-r--r--module/ri-base/src/main/java/io/trygvis/rules/terraform/TerraformResource.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/module/ri-base/src/main/java/io/trygvis/rules/terraform/TerraformResource.java b/module/ri-base/src/main/java/io/trygvis/rules/terraform/TerraformResource.java
index 2615dde..351a3e1 100644
--- a/module/ri-base/src/main/java/io/trygvis/rules/terraform/TerraformResource.java
+++ b/module/ri-base/src/main/java/io/trygvis/rules/terraform/TerraformResource.java
@@ -22,6 +22,10 @@ public class TerraformResource {
return output;
}
+ public String getName() {
+ return kind + "." + instance;
+ }
+
public String getKind() {
return kind;
}
@@ -34,20 +38,24 @@ public class TerraformResource {
return values;
}
- public void set(String key, String value) {
+ public TerraformResource set(String key, String value) {
values.put(key, new StringTerraformValue(value));
+ return this;
}
- public void set(String key, boolean value) {
+ public TerraformResource set(String key, boolean value) {
values.put(key, new BooleanTerraformValue(value));
+ return this;
}
- public void set(String key, int value) {
+ public TerraformResource set(String key, int value) {
values.put(key, new IntegerTerraformValue(value));
+ return this;
}
- public void setExpression(String key, String value) {
+ public TerraformResource setExpression(String key, String value) {
values.put(key, new ExpressionTerraformValue(value));
+ return this;
}
public ArrayTerraformValue array(String key) {
@@ -75,7 +83,6 @@ public class TerraformResource {
}
buf.append("}");
- buf.append(EOL);
return buf.toString();
}