Skip to content

Commit d876261

Browse files
committed
fix: nested components display
1 parent f42f14b commit d876261

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

pkg/list/list_values.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,7 @@ func extractComponentValues(stacksMap map[string]interface{}, component string,
164164
func processComponentType(component string, componentFilter string, includeAbstract bool) string {
165165
// If this is a regular component query with a specific component filter
166166
if component == "" && componentFilter != "" {
167-
// Extract component name from path
168-
componentName := getComponentNameFromPath(componentFilter)
169-
170-
// Return a direct path to the component.
171-
return fmt.Sprintf(".components.%s.%s", KeyTerraform, componentName)
167+
return fmt.Sprintf(".components.%s.\"%s\"", KeyTerraform, componentFilter)
172168
}
173169

174170
// Handle special section queries.

pkg/list/utils/utils.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ func CheckComponentExists(atmosConfig *schema.AtmosConfiguration, componentName
3131
return false
3232
}
3333

34-
// Extract component name from path if needed
35-
parts := strings.Split(componentName, "/")
36-
baseName := parts[len(parts)-1]
37-
3834
// Get all stacks to check for the component
3935
stacksMap, err := e.ExecuteDescribeStacks(*atmosConfig, "", nil, nil, nil, false, false, false, false, nil)
4036
if err != nil {
@@ -59,7 +55,7 @@ func CheckComponentExists(atmosConfig *schema.AtmosConfiguration, componentName
5955
}
6056

6157
// Check if the component exists in this stack
62-
_, exists := terraformComponents[baseName]
58+
_, exists := terraformComponents[componentName]
6359
if exists {
6460
return true
6561
}

0 commit comments

Comments
 (0)