pulumi/pkg/resource/config.go
joeduffy 35aa6b7559 Rename pulumi/lumi to pulumi/pulumi-fabric
We are renaming Lumi to Pulumi Fabric.  This change simply renames the
pulumi/lumi repo to pulumi/pulumi-fabric, without the CLI tools and other
changes that will follow soon afterwards.
2017-08-02 09:25:22 -07:00

22 lines
544 B
Go

// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
package resource
import (
"sort"
"github.com/pulumi/pulumi-fabric/pkg/tokens"
)
// ConfigMap contains a mapping from variable token to the value to poke into that variable.
type ConfigMap map[tokens.Token]interface{}
func (config ConfigMap) StableKeys() []tokens.Token {
sorted := make([]tokens.Token, 0, len(config))
for key := range config {
sorted = append(sorted, key)
}
sort.Slice(sorted, func(i, j int) bool { return sorted[i] < sorted[j] })
return sorted
}