rancher_environment: do not use a custom set function for members

This commit is contained in:
Raphaël Pinson 2017-05-18 09:21:27 +02:00
parent b6c9b2dc7a
commit 4f521c74b0
No known key found for this signature in database
GPG Key ID: DF0A493B74BF771E
1 changed files with 0 additions and 11 deletions

View File

@ -1,13 +1,11 @@
package rancher
import (
"bytes"
"fmt"
"log"
"strings"
"time"
"github.com/hashicorp/terraform/helper/hashcode"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
@ -63,7 +61,6 @@ func resourceRancherEnvironment() *schema.Resource {
},
},
},
Set: memberHash,
},
},
}
@ -288,14 +285,6 @@ func makeProjectMembers(in []interface{}) (out []interface{}) {
return
}
func memberHash(member interface{}) int {
var buf bytes.Buffer
m := member.(map[string]interface{})
buf.WriteString(fmt.Sprintf("%s-", m["external_id_type"]))
buf.WriteString(fmt.Sprintf("%s-", m["external_id"]))
return hashcode.String(buf.String())
}
// EnvironmentStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch
// a Rancher Environment.
func EnvironmentStateRefreshFunc(client *rancherClient.RancherClient, environmentID string) resource.StateRefreshFunc {