diff options
author | Nathan Dench <ndenc2@gmail.com> | 2019-05-24 15:16:44 +1000 |
---|---|---|
committer | Nathan Dench <ndenc2@gmail.com> | 2019-05-24 15:16:44 +1000 |
commit | 107c1cdb09c575aa2f61d97f48d8587eb6bada4c (patch) | |
tree | ca7d008643efc555c388baeaf1d986e0b6b3e28c /vendor/github.com/hashicorp/terraform/helper/schema/set.go | |
parent | 844b5a68d8af4791755b8f0ad293cc99f5959183 (diff) | |
download | terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.gz terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.zst terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.zip |
Upgrade to 0.12
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/helper/schema/set.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/helper/schema/set.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/set.go b/vendor/github.com/hashicorp/terraform/helper/schema/set.go index cba2890..8ee89e4 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/set.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/set.go | |||
@@ -198,6 +198,16 @@ func (s *Set) add(item interface{}, computed bool) string { | |||
198 | code := s.hash(item) | 198 | code := s.hash(item) |
199 | if computed { | 199 | if computed { |
200 | code = "~" + code | 200 | code = "~" + code |
201 | |||
202 | if isProto5() { | ||
203 | tmpCode := code | ||
204 | count := 0 | ||
205 | for _, exists := s.m[tmpCode]; exists; _, exists = s.m[tmpCode] { | ||
206 | count++ | ||
207 | tmpCode = fmt.Sprintf("%s%d", code, count) | ||
208 | } | ||
209 | code = tmpCode | ||
210 | } | ||
201 | } | 211 | } |
202 | 212 | ||
203 | if _, ok := s.m[code]; !ok { | 213 | if _, ok := s.m[code]; !ok { |