Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Commit 300ca18

Browse files
authored
fix(engines): remove default subtype imputation (#108)
1 parent 3ddf451 commit 300ca18

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

engines/terraform/platform.go

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -101,36 +101,32 @@ func (p PlatformSpec) GetLibraries() map[libraryID]*Library {
101101
}
102102

103103
type MissingResourceBlueprintError struct {
104-
IntentType string
105-
IntentSubType string
106-
AvailableTypes []string
104+
IntentType string
105+
IntentSubType string
106+
AvailableTypes []string
107107
}
108108

109109
func (e *MissingResourceBlueprintError) Error() string {
110-
return fmt.Sprintf(
111-
"platform does not define a '%s' type for %ss, available types: %v",
112-
e.IntentSubType, e.IntentType, e.AvailableTypes,
113-
)
110+
return fmt.Sprintf(
111+
"platform does not define a '%s' type for %ss, available types: %v",
112+
e.IntentSubType, e.IntentType, e.AvailableTypes,
113+
)
114114
}
115115

116116
func NewMissingResourceBlueprintError(
117-
intentType, intentSubType string,
118-
availableTypes []string,
117+
intentType, intentSubType string,
118+
availableTypes []string,
119119
) error {
120-
return &MissingResourceBlueprintError{
121-
IntentType: intentType,
122-
IntentSubType: intentSubType,
123-
AvailableTypes: availableTypes,
124-
}
120+
return &MissingResourceBlueprintError{
121+
IntentType: intentType,
122+
IntentSubType: intentSubType,
123+
AvailableTypes: availableTypes,
124+
}
125125
}
126126

127127
func (p PlatformSpec) GetServiceBlueprint(intentSubType string) (*ServiceBlueprint, error) {
128128
spec := p.ServiceBlueprints
129129

130-
if intentSubType == "" {
131-
intentSubType = "default"
132-
}
133-
134130
concreteSpec, ok := spec[intentSubType]
135131
if !ok || concreteSpec == nil {
136132
return nil, NewMissingResourceBlueprintError("service", intentSubType, slices.Collect(maps.Keys(spec)))
@@ -162,10 +158,6 @@ func (p PlatformSpec) GetResourceBlueprintsForType(typ string) (map[string]*Reso
162158
}
163159

164160
func (p PlatformSpec) GetResourceBlueprint(intentType string, intentSubType string) (*ResourceBlueprint, error) {
165-
if intentSubType == "" {
166-
intentSubType = "default"
167-
}
168-
169161
var spec *ResourceBlueprint
170162
var availableTypes []string
171163
switch intentType {

0 commit comments

Comments
 (0)