@@ -42,7 +42,34 @@ public static OrchestrationTemplate create() {
4242 @ Nonnull
4343 public static ReferenceBuilder reference () {
4444 final var templ = TemplateRefByScenarioNameVersion .create ();
45- return s -> n -> v -> new OrchestrationTemplateReference (templ .scenario (s ).name (n ).version (v ));
45+ return s ->
46+ n ->
47+ v ->
48+ new OrchestrationTemplateReference (
49+ templ
50+ .scenario (s )
51+ .name (n )
52+ .version (v )
53+ .scope (TemplateRefByScenarioNameVersion .ScopeEnum .TENANT ));
54+ }
55+
56+ /**
57+ * Build a template reference with resource group scope.
58+ *
59+ * @return An intermediate object to build the template reference.
60+ */
61+ @ Nonnull
62+ public static ReferenceBuilder referenceWithResourceGroupScope () {
63+ final var templ = TemplateRefByScenarioNameVersion .create ();
64+ return s ->
65+ n ->
66+ v ->
67+ new OrchestrationTemplateReference (
68+ templ
69+ .scenario (s )
70+ .name (n )
71+ .version (v )
72+ .scope (TemplateRefByScenarioNameVersion .ScopeEnum .RESOURCE_GROUP ));
4673 }
4774
4875 /** Intermediate object to build a template reference. */
@@ -56,7 +83,20 @@ public interface ReferenceBuilder {
5683 */
5784 @ Nonnull
5885 default OrchestrationTemplateReference byId (@ Nonnull final String id ) {
59- return new OrchestrationTemplateReference (TemplateRefByID .create ().id (id ));
86+ return new OrchestrationTemplateReference (
87+ TemplateRefByID .create ().id (id ).scope (TemplateRefByID .ScopeEnum .TENANT ));
88+ }
89+
90+ /**
91+ * Build a template reference with the given id and resource group scope.
92+ *
93+ * @param id The id of the template.
94+ * @return A template reference with the given id.
95+ */
96+ @ Nonnull
97+ default OrchestrationTemplateReference byIdWithResourceGroupScope (@ Nonnull final String id ) {
98+ return new OrchestrationTemplateReference (
99+ TemplateRefByID .create ().id (id ).scope (TemplateRefByID .ScopeEnum .RESOURCE_GROUP ));
60100 }
61101
62102 /**
0 commit comments