mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-11-30 17:42:32 +01:00
Keep selection on the registry ID through context, sessions and command routing so same-name resources cannot cross provider boundaries. Retain native executor coordinates, legacy inputs that resolve uniquely, policy redaction and paid execution modes. Refs #2681
18 lines
565 B
Go
18 lines
565 B
Go
package tools
|
|
|
|
import (
|
|
"github.com/rcourtman/pulse-go-rewrite/internal/models"
|
|
"github.com/rcourtman/pulse-go-rewrite/internal/unifiedresources"
|
|
)
|
|
|
|
func (e *PulseToolExecutor) resolveResourceLocation(reference string) models.ResourceLocation {
|
|
rs, err := e.readStateForControl()
|
|
if err != nil {
|
|
return models.ResourceLocation{Name: reference}
|
|
}
|
|
if selected := unifiedresources.ResolveResourceReferenceContext(rs, reference); selected.Resource != nil {
|
|
return selected.Location
|
|
}
|
|
return unifiedresources.ResolveResourceContext(rs, reference).Location
|
|
}
|