summaryrefslogtreecommitdiff
path: root/internal/resource/resource.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/resource/resource.go')
-rw-r--r--internal/resource/resource.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/resource/resource.go b/internal/resource/resource.go
index 4e72485..2a01629 100644
--- a/internal/resource/resource.go
+++ b/internal/resource/resource.go
@@ -18,7 +18,7 @@ func (f ApplierFunc) Apply() error {
type Resource struct {
Type string
Name string
- Apply Applier
+ applier Applier
dependsOn map[string]struct{}
}
@@ -26,7 +26,7 @@ func Register(type_, name string, apply Applier) Resource {
r := Resource{
Type: type_,
Name: name,
- Apply: apply,
+ applier: apply,
dependsOn: make(map[string]struct{}),
}
@@ -44,3 +44,7 @@ func (r Resource) String() string {
func (r Resource) ID() string {
return fmt.Sprintf("%s[%s]", r.Type, r.Name)
}
+
+func (r Resource) Apply() error {
+ return r.applier.Apply()
+}