From 442f637061eb854bb5cc374c4466dcf891df65ca Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Fri, 4 Apr 2025 11:49:59 +0100 Subject: [PATCH 01/19] docs: remove references to A-A sub in rediscloud subscription --- provider/datasource_rediscloud_pro_subscription.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provider/datasource_rediscloud_pro_subscription.go b/provider/datasource_rediscloud_pro_subscription.go index d33a7374..d5e47093 100644 --- a/provider/datasource_rediscloud_pro_subscription.go +++ b/provider/datasource_rediscloud_pro_subscription.go @@ -63,7 +63,7 @@ func dataSourceRedisCloudProSubscription() *schema.Resource { Computed: true, }, "region": { - Description: "Cloud networking details, per region (single region or multiple regions for Active-Active cluster only)", + Description: "Cloud networking details, per region", Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ From 9114baed76c91da4b3b9a73795f2d8ade72964c7 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Mon, 7 Apr 2025 17:31:56 +0100 Subject: [PATCH 02/19] feat: incorporate api for regions into new datasource --- go.mod | 56 ++++--- go.sum | 157 +++++++++--------- ...e_rediscloud_active_active_subscription.go | 2 +- ...loud_active_active_subscription_regions.go | 97 +++++++++++ .../datasource_rediscloud_pro_subscription.go | 2 +- provider/provider.go | 26 +-- ...iscloud_active_active_subscription_test.go | 4 + 7 files changed, 225 insertions(+), 119 deletions(-) create mode 100644 provider/datasource_rediscloud_active_active_subscription_regions.go diff --git a/go.mod b/go.mod index 0a9ba814..f077a20b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/RedisLabs/terraform-provider-rediscloud -go 1.22.4 +go 1.23.0 + +toolchain go1.24.1 require ( github.com/RedisLabs/rediscloud-go-api v0.25.0 @@ -11,58 +13,60 @@ require ( ) require ( - github.com/ProtonMail/go-crypto v1.1.3 // indirect - github.com/agext/levenshtein v1.2.2 // indirect + github.com/ProtonMail/go-crypto v1.2.0 // indirect + github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/avast/retry-go/v4 v4.6.0 // indirect + github.com/avast/retry-go/v4 v4.6.1 // indirect github.com/bflad/gopaniccheck v0.1.0 // indirect - github.com/cloudflare/circl v1.3.7 // indirect + github.com/cloudflare/circl v1.6.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fatih/color v1.16.0 // indirect + github.com/fatih/color v1.18.0 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/go-cmp v0.6.0 // indirect - github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.6.2 // indirect + github.com/hashicorp/go-plugin v1.6.3 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.7.0 // indirect - github.com/hashicorp/hc-install v0.9.1 // indirect + github.com/hashicorp/hc-install v0.9.2 // indirect github.com/hashicorp/hcl/v2 v2.23.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-exec v0.22.0 // indirect + github.com/hashicorp/terraform-exec v0.23.0 // indirect github.com/hashicorp/terraform-json v0.24.0 // indirect github.com/hashicorp/terraform-plugin-go v0.26.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect - github.com/hashicorp/terraform-registry-address v0.2.4 // indirect + github.com/hashicorp/terraform-registry-address v0.2.5 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect - github.com/hashicorp/yamux v0.1.1 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect + github.com/hashicorp/yamux v0.1.2 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/mitchellh/go-wordwrap v1.0.0 // indirect + github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/oklog/run v1.0.0 // indirect + github.com/oklog/run v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/zclconf/go-cty v1.16.2 // indirect - golang.org/x/crypto v0.33.0 // indirect - golang.org/x/mod v0.23.0 // indirect - golang.org/x/net v0.35.0 // indirect - golang.org/x/sync v0.11.0 // indirect - golang.org/x/sys v0.30.0 // indirect - golang.org/x/text v0.22.0 // indirect - golang.org/x/tools v0.30.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/mod v0.24.0 // indirect + golang.org/x/net v0.39.0 // indirect + golang.org/x/sync v0.13.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/text v0.24.0 // indirect + golang.org/x/tools v0.32.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect - google.golang.org/grpc v1.69.4 // indirect - google.golang.org/protobuf v1.36.3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect + google.golang.org/grpc v1.71.1 // indirect + google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/RedisLabs/rediscloud-go-api => ../rediscloud-go-api diff --git a/go.sum b/go.sum index 476114d8..7ad03ece 100644 --- a/go.sum +++ b/go.sum @@ -1,50 +1,48 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= -github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= -github.com/RedisLabs/rediscloud-go-api v0.25.0 h1:44q7fPxjkS94slkUxZCueaDB5i+axxjkFqOXIx3D44M= -github.com/RedisLabs/rediscloud-go-api v0.25.0/go.mod h1:3/oVb71rv2OstFRYEc65QCIbfwnJTgZeQhtPCcdHook= -github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= -github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/ProtonMail/go-crypto v1.2.0 h1:+PhXXn4SPGd+qk76TlEePBfOfivE0zkWFenhGhFLzWs= +github.com/ProtonMail/go-crypto v1.2.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= +github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= +github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= -github.com/avast/retry-go/v4 v4.6.0 h1:K9xNA+KeB8HHc2aWFuLb25Offp+0iVRXEvFx8IinRJA= -github.com/avast/retry-go/v4 v4.6.0/go.mod h1:gvWlPhBVsvBbLkVGDg/KwvBv0bEkCOLRRSHKIr2PyOE= +github.com/avast/retry-go/v4 v4.6.1 h1:VkOLRubHdisGrHnTu89g08aQEWEgRU7LVEop3GbIcMk= +github.com/avast/retry-go/v4 v4.6.1/go.mod h1:V6oF8njAwxJ5gRo1Q7Cxab24xs5NCWZBeaHHBklR8mA= github.com/bflad/gopaniccheck v0.1.0 h1:tJftp+bv42ouERmUMWLoUn/5bi/iQZjHPznM00cP/bU= github.com/bflad/gopaniccheck v0.1.0/go.mod h1:ZCj2vSr7EqVeDaqVsWN4n2MwdROx1YL+LFo47TSWtsA= github.com/bflad/tfproviderlint v0.31.0 h1:9N/dUzFARsTpAQOjdZzIWnHKMzQc7UDDEYrSNV2xnrw= github.com/bflad/tfproviderlint v0.31.0/go.mod h1:yZQdJs4uobBIgVHt1Tv5OpHhgM8fwh29OgxL/La5BFs= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= -github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= -github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo= -github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= +github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= +github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= +github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= -github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.6.0 h1:w2hPNtoehvJIxR00Vb4xX94qHQi/ApZfX+nBE2Cjio8= -github.com/go-git/go-billy/v5 v5.6.0/go.mod h1:sFDq7xD3fn3E0GOwUSZqHo9lrkmx8xJhA0ZrfvjBRGM= -github.com/go-git/go-git/v5 v5.13.0 h1:vLn5wlGIh/X78El6r3Jr+30W16Blk0CTcxTYcYPWi5E= -github.com/go-git/go-git/v5 v5.13.0/go.mod h1:Wjo7/JyVKtQgUNdXYXIepzWfJQkUEIGvkvVkiXRR/zw= +github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= +github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= +github.com/go-git/go-git/v5 v5.14.0 h1:/MD3lCrGjCen5WfEAzKg00MJJffKhC8gzS80ycmCi60= +github.com/go-git/go-git/v5 v5.14.0/go.mod h1:Z5Xhoia5PcWA3NF8vRLURn9E5FRhSl7dGj9ItW3Wk5k= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -52,12 +50,13 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -69,8 +68,8 @@ github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB1 github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.6.2 h1:zdGAEd0V1lCaU0u+MxWQhtSDQmahpkwOun8U8EiRVog= -github.com/hashicorp/go-plugin v1.6.2/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q= +github.com/hashicorp/go-plugin v1.6.3 h1:xgHB+ZUSYeuJi96WtxEjzi23uh7YQpznjGh0U0UUrwg= +github.com/hashicorp/go-plugin v1.6.3/go.mod h1:MRobyh+Wc/nYy1V4KAXUiYfzxoYhs7V1mlH1Z7iY2h0= github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -78,14 +77,14 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.9.1 h1:gkqTfE3vVbafGQo6VZXcy2v5yoz2bE0+nhZXruCuODQ= -github.com/hashicorp/hc-install v0.9.1/go.mod h1:pWWvN/IrfeBK4XPeXXYkL6EjMufHkCK5DvwxeLKuBf0= +github.com/hashicorp/hc-install v0.9.2 h1:v80EtNX4fCVHqzL9Lg/2xkp62bbvQMnvPQ0G+OmtO24= +github.com/hashicorp/hc-install v0.9.2/go.mod h1:XUqBQNnuT4RsxoxiM9ZaUk0NX8hi2h+Lb6/c0OZnC/I= github.com/hashicorp/hcl/v2 v2.23.0 h1:Fphj1/gCylPxHutVSEOf2fBOh1VE4AuLV7+kbJf3qos= github.com/hashicorp/hcl/v2 v2.23.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-exec v0.22.0 h1:G5+4Sz6jYZfRYUCg6eQgDsqTzkNXV+fP8l+uRmZHj64= -github.com/hashicorp/terraform-exec v0.22.0/go.mod h1:bjVbsncaeh8jVdhttWYZuBGj21FcYw6Ia/XfHcNO7lQ= +github.com/hashicorp/terraform-exec v0.23.0 h1:MUiBM1s0CNlRFsCLJuM5wXZrzA3MnPYEsiXmzATMW/I= +github.com/hashicorp/terraform-exec v0.23.0/go.mod h1:mA+qnx1R8eePycfwKkCRk3Wy65mwInvlpAeOwmA7vlY= github.com/hashicorp/terraform-json v0.24.0 h1:rUiyF+x1kYawXeRth6fKFm/MdfBS6+lW4NbeATsYz8Q= github.com/hashicorp/terraform-json v0.24.0/go.mod h1:Nfj5ubo9xbu9uiAoZVBsNOjvNKB66Oyrvtit74kC7ow= github.com/hashicorp/terraform-plugin-go v0.26.0 h1:cuIzCv4qwigug3OS7iKhpGAbZTiypAfFQmw8aE65O2M= @@ -94,12 +93,12 @@ github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9T github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1 h1:WNMsTLkZf/3ydlgsuXePa3jvZFwAJhruxTxP/c1Viuw= github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1/go.mod h1:P6o64QS97plG44iFzSM6rAn6VJIC/Sy9a9IkEtl79K4= -github.com/hashicorp/terraform-registry-address v0.2.4 h1:JXu/zHB2Ymg/TGVCRu10XqNa4Sh2bWcqCNyKWjnCPJA= -github.com/hashicorp/terraform-registry-address v0.2.4/go.mod h1:tUNYTVyCtU4OIGXXMDp7WNcJ+0W1B4nmstVDgHMjfAU= +github.com/hashicorp/terraform-registry-address v0.2.5 h1:2GTftHqmUhVOeuu9CW3kwDkRe4pcBDq0uuK5VJngU1M= +github.com/hashicorp/terraform-registry-address v0.2.5/go.mod h1:PpzXWINwB5kuVS5CA7m1+eO2f1jKb5ZDIxrOPfpnGkg= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= -github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= -github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= +github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= @@ -113,33 +112,32 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= -github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4= +github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/skeema/knownhosts v1.3.0 h1:AM+y0rI04VksttfwjkSTNQorvGqmwATnvnAHpSgc0LY= -github.com/skeema/knownhosts v1.3.0/go.mod h1:sPINvnADmT/qYH1kfv+ePMmOBTH6Tbl7b5LvTDjFK7M= +github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8= +github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= @@ -160,36 +158,38 @@ github.com/zclconf/go-cty v1.16.2 h1:LAJSwc3v81IRBZyUVQDUdZ7hs3SYs9jv0eZJDWHD/70 github.com/zclconf/go-cty v1.16.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= -go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= -go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= -go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= -go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= -go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= -go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= -go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= -go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= -go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= -go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= +go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= +go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= +go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= -golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= -golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= -golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= +golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -201,40 +201,39 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200214201135-548b770e2dfa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= -golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU= +golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= -google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= -google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e h1:ztQaXfzEXTmCBvbtWYRhJxW+0iJcz2qXfd38/e9l7bA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.71.1 h1:ffsFWr7ygTUscGPI0KKK6TLrGz0476KUvvsbqWK0rPI= +google.golang.org/grpc v1.71.1/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= -google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/provider/datasource_rediscloud_active_active_subscription.go b/provider/datasource_rediscloud_active_active_subscription.go index 1e6cca4d..6fafbe91 100644 --- a/provider/datasource_rediscloud_active_active_subscription.go +++ b/provider/datasource_rediscloud_active_active_subscription.go @@ -155,7 +155,7 @@ func dataSourceRedisCloudActiveActiveSubscriptionRead(ctx context.Context, d *sc var filters []func(method *subscriptions.Subscription) bool - // Filter to AA subscriptions only (active-active subs) come from the same endpoint + // Filter to AA subscriptions only (pro subs come from the same endpoint) filters = append(filters, func(sub *subscriptions.Subscription) bool { return redis.StringValue(sub.DeploymentType) == "active-active" }) diff --git a/provider/datasource_rediscloud_active_active_subscription_regions.go b/provider/datasource_rediscloud_active_active_subscription_regions.go new file mode 100644 index 00000000..93f678cf --- /dev/null +++ b/provider/datasource_rediscloud_active_active_subscription_regions.go @@ -0,0 +1,97 @@ +package provider + +import ( + "context" + "github.com/RedisLabs/rediscloud-go-api/redis" + "github.com/RedisLabs/rediscloud-go-api/service/cloud_accounts" + "github.com/RedisLabs/rediscloud-go-api/service/subscriptions" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" +) + +func dataSourceRedisCloudActiveActiveSubscriptionRegions() *schema.Resource { + return &schema.Resource{ + Description: "The Active Active Subscription Regions data source allows access to a list of supported cloud provider regions. These regions can be used with the active active subscription resource.", + ReadContext: dataSourceRedisCloudActiveActiveRegionsRead, + + Schema: map[string]*schema.Schema{ + "subscription_id": { + Description: "The name of the cloud provider to filter returned regions, (accepted values are `AWS` or `GCP`).", + Optional: true, + Type: schema.TypeString, + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(cloud_accounts.ProviderValues(), false)), + }, + "provider_name": { + Description: "The name of the cloud provider to filter returned regions, (accepted values are `AWS` or `GCP`).", + Optional: true, + Type: schema.TypeString, + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(cloud_accounts.ProviderValues(), false)), + }, + "regions": { + Description: "A list of regions from either a single or multiple cloud providers", + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Description: "The identifier assigned by the cloud provider, (for example `eu-west-1` for `AWS`)", + Computed: true, + Type: schema.TypeString, + }, + "provider_name": { + Description: "The identifier of the owning cloud provider, (either `AWS` or `GCP`)", + Computed: true, + Type: schema.TypeString, + }, + }, + }, + }, + }, + } +} + +func dataSourceRedisCloudActiveActiveRegionsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + var diags diag.Diagnostics + api := meta.(*apiClient) + + subs, err := api.client.Subscription.List(ctx) + + if err != nil { + return diag.FromErr(err) + } + + var filters []func(method *subscriptions.Subscription) bool + + // Filter to active-active subscriptions only (pro subs come from the same endpoint) + filters = append(filters, func(sub *subscriptions.Subscription) bool { + return redis.StringValue(sub.DeploymentType) == "active-active" + }) + + if name, ok := d.GetOk("name"); ok { + filters = append(filters, func(sub *subscriptions.Subscription) bool { + return redis.StringValue(sub.Name) == name + }) + } + + subs = filterSubscriptions(subs, filters) + + if len(subs) == 0 { + return diag.Errorf("Your query returned no results. Please change your search criteria and try again.") + } + + if len(subs) > 1 { + return diag.Errorf("Your query returned more than one result. Please change try a more specific search criteria and try again.") + } + + sub := subs[0] + + regions, err := api.client.Subscription.ListActiveActiveRegions(ctx, *sub.ID) + + if len(regions) == 0 { + return diag.Errorf("Your query returned no results. Please change your search criteria and try again.") + } + + return diags + +} diff --git a/provider/datasource_rediscloud_pro_subscription.go b/provider/datasource_rediscloud_pro_subscription.go index d5e47093..8fe6554b 100644 --- a/provider/datasource_rediscloud_pro_subscription.go +++ b/provider/datasource_rediscloud_pro_subscription.go @@ -231,7 +231,7 @@ func dataSourceRedisCloudProSubscriptionRead(ctx context.Context, d *schema.Reso var filters []func(method *subscriptions.Subscription) bool - // Filter to pro subscriptions only (active-active subs) come from the same endpoint + // Filter to pro subscriptions only (active-active subs come from the same endpoint) filters = append(filters, func(sub *subscriptions.Subscription) bool { return redis.StringValue(sub.DeploymentType) != "active-active" }) diff --git a/provider/provider.go b/provider/provider.go index 8e660bad..8275ab6e 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -46,18 +46,20 @@ func New(version string) func() *schema.Provider { // Note the difference in public data-source name and the file/method name. // This is to help the developer relate their changes to what they would see happening in the Redis Console. // == flexible == pro - "rediscloud_subscription": dataSourceRedisCloudProSubscription(), - "rediscloud_database": dataSourceRedisCloudProDatabase(), - "rediscloud_database_modules": dataSourceRedisCloudDatabaseModules(), - "rediscloud_payment_method": dataSourceRedisCloudPaymentMethod(), - "rediscloud_regions": dataSourceRedisCloudRegions(), - "rediscloud_essentials_plan": dataSourceRedisCloudEssentialsPlan(), - "rediscloud_essentials_subscription": dataSourceRedisCloudEssentialsSubscription(), - "rediscloud_essentials_database": dataSourceRedisCloudEssentialsDatabase(), - "rediscloud_subscription_peerings": dataSourceRedisCloudSubscriptionPeerings(), - "rediscloud_private_service_connect": dataSourcePrivateServiceConnect(), - "rediscloud_private_service_connect_endpoints": dataSourcePrivateServiceConnectEndpoints(), - "rediscloud_active_active_subscription": dataSourceRedisCloudActiveActiveSubscription(), + "rediscloud_subscription": dataSourceRedisCloudProSubscription(), + "rediscloud_database": dataSourceRedisCloudProDatabase(), + "rediscloud_database_modules": dataSourceRedisCloudDatabaseModules(), + "rediscloud_payment_method": dataSourceRedisCloudPaymentMethod(), + "rediscloud_regions": dataSourceRedisCloudRegions(), + "rediscloud_essentials_plan": dataSourceRedisCloudEssentialsPlan(), + "rediscloud_essentials_subscription": dataSourceRedisCloudEssentialsSubscription(), + "rediscloud_essentials_database": dataSourceRedisCloudEssentialsDatabase(), + "rediscloud_subscription_peerings": dataSourceRedisCloudSubscriptionPeerings(), + "rediscloud_private_service_connect": dataSourcePrivateServiceConnect(), + "rediscloud_private_service_connect_endpoints": dataSourcePrivateServiceConnectEndpoints(), + "rediscloud_active_active_subscription": dataSourceRedisCloudActiveActiveSubscription(), + "rediscloud_active_active_subscription_regions": dataSourceRedisCloudActiveActiveSubscriptionRegions(), + // Note the difference in public data-source name and the file/method name. // active_active_subscription_database == active_active_database "rediscloud_active_active_subscription_database": dataSourceRedisCloudActiveActiveDatabase(), diff --git a/provider/rediscloud_active_active_subscription_test.go b/provider/rediscloud_active_active_subscription_test.go index 06d63faf..154b2d20 100644 --- a/provider/rediscloud_active_active_subscription_test.go +++ b/provider/rediscloud_active_active_subscription_test.go @@ -375,6 +375,10 @@ resource "rediscloud_active_active_subscription" "example" { data "rediscloud_active_active_subscription" "example" { name = rediscloud_active_active_subscription.example.name } + +data "redis_active_active_subscription_regions" "regions" { + subscription_id = rediscloud_active_active_subscription.example.id +} ` const testAccResourceRedisCloudActiveActiveSubscriptionNoCreationPlan = ` From 25abdc0bfc885aa5d236cc40a135fe3a2198b758 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Tue, 8 Apr 2025 16:39:22 +0100 Subject: [PATCH 03/19] feat: updating schema for regions and databases for active-active datasource --- ...loud_active_active_subscription_regions.go | 77 ++++++++++++++----- ...iscloud_active_active_subscription_test.go | 5 +- 2 files changed, 59 insertions(+), 23 deletions(-) diff --git a/provider/datasource_rediscloud_active_active_subscription_regions.go b/provider/datasource_rediscloud_active_active_subscription_regions.go index 93f678cf..c493075b 100644 --- a/provider/datasource_rediscloud_active_active_subscription_regions.go +++ b/provider/datasource_rediscloud_active_active_subscription_regions.go @@ -3,47 +3,72 @@ package provider import ( "context" "github.com/RedisLabs/rediscloud-go-api/redis" - "github.com/RedisLabs/rediscloud-go-api/service/cloud_accounts" "github.com/RedisLabs/rediscloud-go-api/service/subscriptions" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) func dataSourceRedisCloudActiveActiveSubscriptionRegions() *schema.Resource { return &schema.Resource{ - Description: "The Active Active Subscription Regions data source allows access to a list of supported cloud provider regions. These regions can be used with the active active subscription resource.", + Description: "Gets a list of regions in the specified Active-Active subscription.", ReadContext: dataSourceRedisCloudActiveActiveRegionsRead, Schema: map[string]*schema.Schema{ - "subscription_id": { - Description: "The name of the cloud provider to filter returned regions, (accepted values are `AWS` or `GCP`).", - Optional: true, - Type: schema.TypeString, - ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(cloud_accounts.ProviderValues(), false)), - }, - "provider_name": { - Description: "The name of the cloud provider to filter returned regions, (accepted values are `AWS` or `GCP`).", - Optional: true, - Type: schema.TypeString, - ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(cloud_accounts.ProviderValues(), false)), + "subscription_name": { + Description: "The name of the subscription", + Type: schema.TypeString, + Required: true, }, "regions": { - Description: "A list of regions from either a single or multiple cloud providers", + Description: "A list of regions from an active active subscription", Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "name": { - Description: "The identifier assigned by the cloud provider, (for example `eu-west-1` for `AWS`)", + "region": { + Description: "Deployment region as defined by cloud provider", + Type: schema.TypeString, Computed: true, + }, + "networking_deployment_cidr": { + Description: "Deployment CIDR mask", Type: schema.TypeString, + Computed: true, }, - "provider_name": { - Description: "The identifier of the owning cloud provider, (either `AWS` or `GCP`)", + "vpc_id": { + Description: "VPC ID for the region", Computed: true, Type: schema.TypeString, }, + "databases": { + Description: "A list of databases found in the region", + Computed: true, + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "database_id": { + Description: "A numeric id for the database", + Type: schema.TypeInt, + Required: true, + }, + "database_name": { + Description: "A meaningful name to identify the database", + Type: schema.TypeString, + Required: true, + }, + "write_operations_per_second": { + Description: "Write operations per second for the database", + Type: schema.TypeInt, + Required: true, + }, + "read_operations_per_second": { + Description: "Read operations per second for the database", + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, }, }, }, @@ -68,7 +93,8 @@ func dataSourceRedisCloudActiveActiveRegionsRead(ctx context.Context, d *schema. return redis.StringValue(sub.DeploymentType) == "active-active" }) - if name, ok := d.GetOk("name"); ok { + // Filter down to requested subscription by name + if name, ok := d.GetOk("subscription_name"); ok { filters = append(filters, func(sub *subscriptions.Subscription) bool { return redis.StringValue(sub.Name) == name }) @@ -88,10 +114,19 @@ func dataSourceRedisCloudActiveActiveRegionsRead(ctx context.Context, d *schema. regions, err := api.client.Subscription.ListActiveActiveRegions(ctx, *sub.ID) + if err != nil { + return diag.FromErr(err) + } + if len(regions) == 0 { return diag.Errorf("Your query returned no results. Please change your search criteria and try again.") } - return diags + // TODO: may have to manipulate regions to be output in a friendly way here + if err := d.Set("regions", regions); err != nil { + return diag.FromErr(err) + } + + return diags } diff --git a/provider/rediscloud_active_active_subscription_test.go b/provider/rediscloud_active_active_subscription_test.go index 154b2d20..286b4a01 100644 --- a/provider/rediscloud_active_active_subscription_test.go +++ b/provider/rediscloud_active_active_subscription_test.go @@ -28,6 +28,7 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { name := acctest.RandomWithPrefix(testResourcePrefix) const resourceName = "rediscloud_active_active_subscription.example" const datasourceName = "data.rediscloud_active_active_subscription.example" + const datasourceRegion = "data.rediscloud_active_active_subscription_region.regions" var subId int @@ -376,8 +377,8 @@ data "rediscloud_active_active_subscription" "example" { name = rediscloud_active_active_subscription.example.name } -data "redis_active_active_subscription_regions" "regions" { - subscription_id = rediscloud_active_active_subscription.example.id +data "rediscloud_active_active_subscription_regions" "regions" { + subscription_name = rediscloud_active_active_subscription.example.name } ` From c8780457df6d5ef6df6cfde73066f4191211ca93 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Tue, 8 Apr 2025 18:50:34 +0100 Subject: [PATCH 04/19] test: new checks for the datasource region --- ...iscloud_active_active_subscription_test.go | 105 +++++++++++------- 1 file changed, 62 insertions(+), 43 deletions(-) diff --git a/provider/rediscloud_active_active_subscription_test.go b/provider/rediscloud_active_active_subscription_test.go index 286b4a01..c48e5c06 100644 --- a/provider/rediscloud_active_active_subscription_test.go +++ b/provider/rediscloud_active_active_subscription_test.go @@ -27,8 +27,8 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { name := acctest.RandomWithPrefix(testResourcePrefix) const resourceName = "rediscloud_active_active_subscription.example" - const datasourceName = "data.rediscloud_active_active_subscription.example" - const datasourceRegion = "data.rediscloud_active_active_subscription_region.regions" + const datasourceSubscriptionName = "data.rediscloud_active_active_subscription.example" + const datasourceRegionName = "data.rediscloud_active_active_subscription_region.regions" var subId int @@ -122,45 +122,64 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { return nil }, - // Test the datasource - resource.TestCheckResourceAttr(datasourceName, "name", name), - resource.TestCheckResourceAttr(datasourceName, "payment_method", "credit-card"), - resource.TestCheckResourceAttrSet(datasourceName, "payment_method_id"), - resource.TestCheckResourceAttr(datasourceName, "cloud_provider", "AWS"), - resource.TestCheckResourceAttr(datasourceName, "number_of_databases", "0"), - resource.TestCheckResourceAttr(datasourceName, "status", "active"), - - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.mode", "manual"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.#", "2"), - - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.0.start_hour", "22"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.0.duration_in_hours", "8"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.0.days.#", "2"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.0.days.0", "Monday"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.0.days.1", "Thursday"), - - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.1.start_hour", "12"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.1.duration_in_hours", "6"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.1.days.#", "3"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.1.days.0", "Friday"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.1.days.1", "Saturday"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.1.days.2", "Sunday"), - - resource.TestCheckResourceAttr(datasourceName, "pricing.#", "2"), - - resource.TestCheckResourceAttr(datasourceName, "pricing.0.type", "MinimumPrice"), - resource.TestCheckResourceAttr(datasourceName, "pricing.0.quantity", "1"), - resource.TestCheckResourceAttr(datasourceName, "pricing.0.quantity_measurement", "subscription"), - resource.TestCheckResourceAttrSet(datasourceName, "pricing.0.price_per_unit"), - resource.TestCheckResourceAttr(datasourceName, "pricing.0.price_currency", "USD"), - resource.TestCheckResourceAttr(datasourceName, "pricing.0.price_period", "hour"), - - resource.TestCheckResourceAttr(datasourceName, "pricing.1.type", "MinimumPrice"), - resource.TestCheckResourceAttr(datasourceName, "pricing.1.quantity", "1"), - resource.TestCheckResourceAttr(datasourceName, "pricing.1.quantity_measurement", "subscription"), - resource.TestCheckResourceAttrSet(datasourceName, "pricing.1.price_per_unit"), - resource.TestCheckResourceAttr(datasourceName, "pricing.1.price_currency", "USD"), - resource.TestCheckResourceAttr(datasourceName, "pricing.1.price_period", "hour"), + // Test the subscription datasource + resource.TestCheckResourceAttr(datasourceSubscriptionName, "name", name), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "payment_method", "credit-card"), + resource.TestCheckResourceAttrSet(datasourceSubscriptionName, "payment_method_id"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "cloud_provider", "AWS"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "number_of_databases", "0"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "status", "active"), + + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.mode", "manual"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.#", "2"), + + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.0.start_hour", "22"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.0.duration_in_hours", "8"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.0.days.#", "2"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.0.days.0", "Monday"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.0.days.1", "Thursday"), + + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.1.start_hour", "12"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.1.duration_in_hours", "6"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.1.days.#", "3"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.1.days.0", "Friday"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.1.days.1", "Saturday"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.1.days.2", "Sunday"), + + resource.TestCheckResourceAttr(datasourceSubscriptionName, "pricing.#", "2"), + + resource.TestCheckResourceAttr(datasourceSubscriptionName, "pricing.0.type", "MinimumPrice"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "pricing.0.quantity", "1"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "pricing.0.quantity_measurement", "subscription"), + resource.TestCheckResourceAttrSet(datasourceSubscriptionName, "pricing.0.price_per_unit"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "pricing.0.price_currency", "USD"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "pricing.0.price_period", "hour"), + + resource.TestCheckResourceAttr(datasourceSubscriptionName, "pricing.1.type", "MinimumPrice"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "pricing.1.quantity", "1"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "pricing.1.quantity_measurement", "subscription"), + resource.TestCheckResourceAttrSet(datasourceSubscriptionName, "pricing.1.price_per_unit"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "pricing.1.price_currency", "USD"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "pricing.1.price_period", "hour"), + + // Test the region datasource + + resource.TestCheckResourceAttr(datasourceRegionName, "subscription_name", name), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.region", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.networking_deployment_cidr", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.vpc_id", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.database_id", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.database_name", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.write_operations_per_second", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.read_operations_per_second", ""), + + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.region", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.networking_deployment_cidr", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.vpc_id", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.databases.database_id", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.databases.database_name", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.databases.write_operations_per_second", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.databases.read_operations_per_second", ""), ), }, { @@ -184,8 +203,8 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "maintenance_windows.0.mode", "automatic"), resource.TestCheckResourceAttr(resourceName, "maintenance_windows.0.window.#", "0"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.mode", "automatic"), - resource.TestCheckResourceAttr(datasourceName, "maintenance_windows.0.window.#", "0"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.mode", "automatic"), + resource.TestCheckResourceAttr(datasourceSubscriptionName, "maintenance_windows.0.window.#", "0"), ), }, { From 7b5b24be3fe819251893655fb56f87d3f17274ac Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Wed, 9 Apr 2025 17:23:29 +0100 Subject: [PATCH 05/19] fix: generifiying region data to be returned and fixing tests --- ...loud_active_active_subscription_regions.go | 37 +++++++++++++++++-- ...iscloud_active_active_subscription_test.go | 25 ++++--------- 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/provider/datasource_rediscloud_active_active_subscription_regions.go b/provider/datasource_rediscloud_active_active_subscription_regions.go index c493075b..04350859 100644 --- a/provider/datasource_rediscloud_active_active_subscription_regions.go +++ b/provider/datasource_rediscloud_active_active_subscription_regions.go @@ -2,6 +2,7 @@ package provider import ( "context" + "fmt" "github.com/RedisLabs/rediscloud-go-api/redis" "github.com/RedisLabs/rediscloud-go-api/service/subscriptions" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" @@ -21,7 +22,7 @@ func dataSourceRedisCloudActiveActiveSubscriptionRegions() *schema.Resource { }, "regions": { Description: "A list of regions from an active active subscription", - Type: schema.TypeSet, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -122,11 +123,41 @@ func dataSourceRedisCloudActiveActiveRegionsRead(ctx context.Context, d *schema. return diag.Errorf("Your query returned no results. Please change your search criteria and try again.") } - // TODO: may have to manipulate regions to be output in a friendly way here + var genericRegions = flattenActiveActiveRegions(regions) - if err := d.Set("regions", regions); err != nil { + id := fmt.Sprintf("%d-regions", *sub.ID) + d.SetId(id) + + if err := d.Set("regions", genericRegions); err != nil { return diag.FromErr(err) } return diags } + +// generifies the region/db data so it can be put into the terraform schema +func flattenActiveActiveRegions(regionList []*subscriptions.ActiveActiveRegion) []map[string]interface{} { + var rl []map[string]interface{} + for _, currentRegion := range regionList { + + var dbs []map[string]interface{} + for _, db := range currentRegion.Databases { + dbMap := map[string]interface{}{ + "database_id": db.DatabaseId, + "database_name": db.DatabaseName, + "write_operations_per_second": db.WriteOperationsPerSecond, + "read_operations_per_second": db.ReadOperationsPerSecond, + } + dbs = append(dbs, dbMap) + } + + regionMap := map[string]interface{}{ + "region": currentRegion.Region, + "networking_deployment_cidr": currentRegion.DeploymentCIDR, + "vpc_id": currentRegion.VpcId, + "databases": dbs, + } + rl = append(rl, regionMap) + } + return rl +} diff --git a/provider/rediscloud_active_active_subscription_test.go b/provider/rediscloud_active_active_subscription_test.go index c48e5c06..ca9adc56 100644 --- a/provider/rediscloud_active_active_subscription_test.go +++ b/provider/rediscloud_active_active_subscription_test.go @@ -28,7 +28,7 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { name := acctest.RandomWithPrefix(testResourcePrefix) const resourceName = "rediscloud_active_active_subscription.example" const datasourceSubscriptionName = "data.rediscloud_active_active_subscription.example" - const datasourceRegionName = "data.rediscloud_active_active_subscription_region.regions" + const datasourceRegionName = "data.rediscloud_active_active_subscription_regions.foo" var subId int @@ -165,21 +165,12 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { // Test the region datasource resource.TestCheckResourceAttr(datasourceRegionName, "subscription_name", name), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.region", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.networking_deployment_cidr", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.vpc_id", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.database_id", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.database_name", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.write_operations_per_second", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.read_operations_per_second", ""), - - resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.region", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.networking_deployment_cidr", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.vpc_id", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.databases.database_id", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.databases.database_name", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.databases.write_operations_per_second", ""), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.databases.read_operations_per_second", ""), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.region", "us-east-1"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.networking_deployment_cidr", "10.0.1.0/24"), + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.vpc_id"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.region", "us-east-2"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.networking_deployment_cidr", "10.0.1.0/24"), + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.vpc_id"), ), }, { @@ -396,7 +387,7 @@ data "rediscloud_active_active_subscription" "example" { name = rediscloud_active_active_subscription.example.name } -data "rediscloud_active_active_subscription_regions" "regions" { +data "rediscloud_active_active_subscription_regions" "foo" { subscription_name = rediscloud_active_active_subscription.example.name } ` From b5bd87b33a6ecbcb6585e01c6b4632efea58aebf Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Thu, 10 Apr 2025 11:12:20 +0100 Subject: [PATCH 06/19] fix: final modifications to tests@ --- .../datasource_rediscloud_active_active_subscription_regions.go | 2 +- provider/rediscloud_active_active_subscription_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/provider/datasource_rediscloud_active_active_subscription_regions.go b/provider/datasource_rediscloud_active_active_subscription_regions.go index 04350859..bffb83b3 100644 --- a/provider/datasource_rediscloud_active_active_subscription_regions.go +++ b/provider/datasource_rediscloud_active_active_subscription_regions.go @@ -125,7 +125,7 @@ func dataSourceRedisCloudActiveActiveRegionsRead(ctx context.Context, d *schema. var genericRegions = flattenActiveActiveRegions(regions) - id := fmt.Sprintf("%d-regions", *sub.ID) + id := fmt.Sprintf("%d-active-active-regions", *sub.ID) d.SetId(id) if err := d.Set("regions", genericRegions); err != nil { diff --git a/provider/rediscloud_active_active_subscription_test.go b/provider/rediscloud_active_active_subscription_test.go index ca9adc56..e0b83b58 100644 --- a/provider/rediscloud_active_active_subscription_test.go +++ b/provider/rediscloud_active_active_subscription_test.go @@ -166,7 +166,7 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { resource.TestCheckResourceAttr(datasourceRegionName, "subscription_name", name), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.region", "us-east-1"), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.networking_deployment_cidr", "10.0.1.0/24"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.networking_deployment_cidr", "192.168.0.0/24"), resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.vpc_id"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.region", "us-east-2"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.networking_deployment_cidr", "10.0.1.0/24"), From 76bdb00b3e8f1875835d8c283969908cd546d802 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Thu, 10 Apr 2025 17:30:20 +0100 Subject: [PATCH 07/19] test: fixing tests --- ...iscloud_active_active_subscription_test.go | 106 ++++++++++++------ 1 file changed, 72 insertions(+), 34 deletions(-) diff --git a/provider/rediscloud_active_active_subscription_test.go b/provider/rediscloud_active_active_subscription_test.go index e0b83b58..61a2d63b 100644 --- a/provider/rediscloud_active_active_subscription_test.go +++ b/provider/rediscloud_active_active_subscription_test.go @@ -38,7 +38,7 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { CheckDestroy: testAccCheckActiveActiveSubscriptionDestroy, Steps: []resource.TestStep{ { - Config: fmt.Sprintf(testAccResourceRedisCloudActiveActiveSubscription, name), + Config: fmt.Sprintf(testAccResourceRedisCloudActiveActiveSubscription, name, name), Check: resource.ComposeAggregateTestCheckFunc( // Test the resource resource.TestCheckResourceAttr(resourceName, "name", name), @@ -165,9 +165,11 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { // Test the region datasource resource.TestCheckResourceAttr(datasourceRegionName, "subscription_name", name), + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.regionId"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.region", "us-east-1"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.networking_deployment_cidr", "192.168.0.0/24"), resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.vpc_id"), + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.regionId"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.region", "us-east-2"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.networking_deployment_cidr", "10.0.1.0/24"), resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.vpc_id"), @@ -346,43 +348,79 @@ data "rediscloud_payment_method" "card" { } resource "rediscloud_active_active_subscription" "example" { - name = "%s" - payment_method_id = data.rediscloud_payment_method.card.id - cloud_provider = "AWS" + name = "%s" + payment_method_id = data.rediscloud_payment_method.card.id + cloud_provider = "AWS" - creation_plan { - memory_limit_in_gb = 1 - modules = ["RedisJSON"] - quantity = 1 - region { - region = "us-east-1" - networking_deployment_cidr = "192.168.0.0/24" - write_operations_per_second = 1000 - read_operations_per_second = 1000 - } - region { - region = "us-east-2" - networking_deployment_cidr = "10.0.1.0/24" - write_operations_per_second = 1000 - read_operations_per_second = 1000 - } - } + creation_plan { + memory_limit_in_gb = 1 + modules = ["RedisJSON"] + quantity = 1 + region { + region = "us-east-1" + networking_deployment_cidr = "192.168.0.0/24" + write_operations_per_second = 1000 + read_operations_per_second = 1000 + } + region { + region = "us-east-2" + networking_deployment_cidr = "10.0.1.0/24" + write_operations_per_second = 1000 + read_operations_per_second = 1000 + } + } - maintenance_windows { - mode = "manual" - window { - start_hour = 22 - duration_in_hours = 8 - days = ["Monday", "Thursday"] - } - window { - start_hour = 12 - duration_in_hours = 6 - days = ["Friday", "Saturday", "Sunday"] - } - } + maintenance_windows { + mode = "manual" + window { + start_hour = 22 + duration_in_hours = 8 + days = ["Monday", "Thursday"] + } + window { + start_hour = 12 + duration_in_hours = 6 + days = ["Friday", "Saturday", "Sunday"] + } + } } +resource "rediscloud_active_active_subscription_database" "example" { + subscription_id = rediscloud_active_active_subscription.example.id + name = "%s" + dataset_size_in_gb = 1 + global_data_persistence = "aof-every-1-second" + global_password = "some-random-pass-2" + global_source_ips = ["192.168.0.0/16"] + global_alert { + name = "dataset-size" + value = 40 + } + + global_modules = ["RedisJSON"] + + override_region { + name = "us-east-2" + override_global_source_ips = ["192.10.0.0/16"] + } + + override_region { + name = "us-east-1" + override_global_data_persistence = "none" + override_global_password = "region-specific-password" + override_global_alert { + name = "dataset-size" + value = 60 + } + } + + tags = { + "environment" = "production" + "cost_center" = "0700" + } +} + + data "rediscloud_active_active_subscription" "example" { name = rediscloud_active_active_subscription.example.name } From 7605f9b25514c41afa1a5ce9fec1857700c2d890 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Thu, 10 Apr 2025 17:47:40 +0100 Subject: [PATCH 08/19] fix: fixing schema computing variables --- ...ource_rediscloud_active_active_subscription_regions.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/provider/datasource_rediscloud_active_active_subscription_regions.go b/provider/datasource_rediscloud_active_active_subscription_regions.go index bffb83b3..28ae1d0c 100644 --- a/provider/datasource_rediscloud_active_active_subscription_regions.go +++ b/provider/datasource_rediscloud_active_active_subscription_regions.go @@ -50,22 +50,22 @@ func dataSourceRedisCloudActiveActiveSubscriptionRegions() *schema.Resource { "database_id": { Description: "A numeric id for the database", Type: schema.TypeInt, - Required: true, + Computed: true, }, "database_name": { Description: "A meaningful name to identify the database", Type: schema.TypeString, - Required: true, + Computed: true, }, "write_operations_per_second": { Description: "Write operations per second for the database", Type: schema.TypeInt, - Required: true, + Computed: true, }, "read_operations_per_second": { Description: "Read operations per second for the database", Type: schema.TypeInt, - Required: true, + Computed: true, }, }, }, From ac1bc50060b3483aee5d098a0e1b1b1b78d48e0a Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Fri, 11 Apr 2025 11:09:26 +0100 Subject: [PATCH 09/19] fix: removing go mod for local development --- go.mod | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.mod b/go.mod index f077a20b..3a213500 100644 --- a/go.mod +++ b/go.mod @@ -68,5 +68,3 @@ require ( google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/RedisLabs/rediscloud-go-api => ../rediscloud-go-api From e32c2a518ac71b976e95adeb67421e260211c2eb Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Fri, 11 Apr 2025 17:20:34 +0100 Subject: [PATCH 10/19] chore: updating api version --- go.sum | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go.sum b/go.sum index 7ad03ece..bfe7c8a9 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,8 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/ProtonMail/go-crypto v1.2.0 h1:+PhXXn4SPGd+qk76TlEePBfOfivE0zkWFenhGhFLzWs= github.com/ProtonMail/go-crypto v1.2.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= +github.com/RedisLabs/rediscloud-go-api v0.24.0 h1:/cg92RJIcbeFrsE7Z2ShFW3iNHFBiqF+kd2WNe8IX8k= +github.com/RedisLabs/rediscloud-go-api v0.24.0/go.mod h1:3/oVb71rv2OstFRYEc65QCIbfwnJTgZeQhtPCcdHook= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= From 60df7cd29a385839065a1aaba3246e4870cea46d Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Fri, 16 May 2025 11:35:28 +0100 Subject: [PATCH 11/19] fix: go mod and sum updated unnecessarily --- go.mod | 54 ++++++++++---------- go.sum | 159 ++++++++++++++++++++++++++++----------------------------- 2 files changed, 105 insertions(+), 108 deletions(-) diff --git a/go.mod b/go.mod index 3a213500..0a9ba814 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/RedisLabs/terraform-provider-rediscloud -go 1.23.0 - -toolchain go1.24.1 +go 1.22.4 require ( github.com/RedisLabs/rediscloud-go-api v0.25.0 @@ -13,58 +11,58 @@ require ( ) require ( - github.com/ProtonMail/go-crypto v1.2.0 // indirect - github.com/agext/levenshtein v1.2.3 // indirect + github.com/ProtonMail/go-crypto v1.1.3 // indirect + github.com/agext/levenshtein v1.2.2 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/avast/retry-go/v4 v4.6.1 // indirect + github.com/avast/retry-go/v4 v4.6.0 // indirect github.com/bflad/gopaniccheck v0.1.0 // indirect - github.com/cloudflare/circl v1.6.1 // indirect + github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fatih/color v1.18.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/go-cmp v0.7.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.6.3 // indirect + github.com/hashicorp/go-plugin v1.6.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.7.0 // indirect - github.com/hashicorp/hc-install v0.9.2 // indirect + github.com/hashicorp/hc-install v0.9.1 // indirect github.com/hashicorp/hcl/v2 v2.23.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-exec v0.23.0 // indirect + github.com/hashicorp/terraform-exec v0.22.0 // indirect github.com/hashicorp/terraform-json v0.24.0 // indirect github.com/hashicorp/terraform-plugin-go v0.26.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect - github.com/hashicorp/terraform-registry-address v0.2.5 // indirect + github.com/hashicorp/terraform-registry-address v0.2.4 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect - github.com/hashicorp/yamux v0.1.2 // indirect - github.com/mattn/go-colorable v0.1.14 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/mitchellh/go-wordwrap v1.0.1 // indirect + github.com/mitchellh/go-wordwrap v1.0.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/oklog/run v1.1.0 // indirect + github.com/oklog/run v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/zclconf/go-cty v1.16.2 // indirect - golang.org/x/crypto v0.37.0 // indirect - golang.org/x/mod v0.24.0 // indirect - golang.org/x/net v0.39.0 // indirect - golang.org/x/sync v0.13.0 // indirect - golang.org/x/sys v0.32.0 // indirect - golang.org/x/text v0.24.0 // indirect - golang.org/x/tools v0.32.0 // indirect + golang.org/x/crypto v0.33.0 // indirect + golang.org/x/mod v0.23.0 // indirect + golang.org/x/net v0.35.0 // indirect + golang.org/x/sync v0.11.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/text v0.22.0 // indirect + golang.org/x/tools v0.30.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect - google.golang.org/grpc v1.71.1 // indirect - google.golang.org/protobuf v1.36.6 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect + google.golang.org/grpc v1.69.4 // indirect + google.golang.org/protobuf v1.36.3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index bfe7c8a9..476114d8 100644 --- a/go.sum +++ b/go.sum @@ -1,50 +1,50 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= -github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/ProtonMail/go-crypto v1.2.0 h1:+PhXXn4SPGd+qk76TlEePBfOfivE0zkWFenhGhFLzWs= -github.com/ProtonMail/go-crypto v1.2.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= -github.com/RedisLabs/rediscloud-go-api v0.24.0 h1:/cg92RJIcbeFrsE7Z2ShFW3iNHFBiqF+kd2WNe8IX8k= -github.com/RedisLabs/rediscloud-go-api v0.24.0/go.mod h1:3/oVb71rv2OstFRYEc65QCIbfwnJTgZeQhtPCcdHook= -github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= -github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= +github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/RedisLabs/rediscloud-go-api v0.25.0 h1:44q7fPxjkS94slkUxZCueaDB5i+axxjkFqOXIx3D44M= +github.com/RedisLabs/rediscloud-go-api v0.25.0/go.mod h1:3/oVb71rv2OstFRYEc65QCIbfwnJTgZeQhtPCcdHook= +github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= +github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= -github.com/avast/retry-go/v4 v4.6.1 h1:VkOLRubHdisGrHnTu89g08aQEWEgRU7LVEop3GbIcMk= -github.com/avast/retry-go/v4 v4.6.1/go.mod h1:V6oF8njAwxJ5gRo1Q7Cxab24xs5NCWZBeaHHBklR8mA= +github.com/avast/retry-go/v4 v4.6.0 h1:K9xNA+KeB8HHc2aWFuLb25Offp+0iVRXEvFx8IinRJA= +github.com/avast/retry-go/v4 v4.6.0/go.mod h1:gvWlPhBVsvBbLkVGDg/KwvBv0bEkCOLRRSHKIr2PyOE= github.com/bflad/gopaniccheck v0.1.0 h1:tJftp+bv42ouERmUMWLoUn/5bi/iQZjHPznM00cP/bU= github.com/bflad/gopaniccheck v0.1.0/go.mod h1:ZCj2vSr7EqVeDaqVsWN4n2MwdROx1YL+LFo47TSWtsA= github.com/bflad/tfproviderlint v0.31.0 h1:9N/dUzFARsTpAQOjdZzIWnHKMzQc7UDDEYrSNV2xnrw= github.com/bflad/tfproviderlint v0.31.0/go.mod h1:yZQdJs4uobBIgVHt1Tv5OpHhgM8fwh29OgxL/La5BFs= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= -github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= -github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= -github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= -github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo= +github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= -github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= -github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= -github.com/go-git/go-git/v5 v5.14.0 h1:/MD3lCrGjCen5WfEAzKg00MJJffKhC8gzS80ycmCi60= -github.com/go-git/go-git/v5 v5.14.0/go.mod h1:Z5Xhoia5PcWA3NF8vRLURn9E5FRhSl7dGj9ItW3Wk5k= +github.com/go-git/go-billy/v5 v5.6.0 h1:w2hPNtoehvJIxR00Vb4xX94qHQi/ApZfX+nBE2Cjio8= +github.com/go-git/go-billy/v5 v5.6.0/go.mod h1:sFDq7xD3fn3E0GOwUSZqHo9lrkmx8xJhA0ZrfvjBRGM= +github.com/go-git/go-git/v5 v5.13.0 h1:vLn5wlGIh/X78El6r3Jr+30W16Blk0CTcxTYcYPWi5E= +github.com/go-git/go-git/v5 v5.13.0/go.mod h1:Wjo7/JyVKtQgUNdXYXIepzWfJQkUEIGvkvVkiXRR/zw= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= -github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -52,13 +52,12 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= -github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -70,8 +69,8 @@ github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB1 github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.6.3 h1:xgHB+ZUSYeuJi96WtxEjzi23uh7YQpznjGh0U0UUrwg= -github.com/hashicorp/go-plugin v1.6.3/go.mod h1:MRobyh+Wc/nYy1V4KAXUiYfzxoYhs7V1mlH1Z7iY2h0= +github.com/hashicorp/go-plugin v1.6.2 h1:zdGAEd0V1lCaU0u+MxWQhtSDQmahpkwOun8U8EiRVog= +github.com/hashicorp/go-plugin v1.6.2/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q= github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -79,14 +78,14 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.9.2 h1:v80EtNX4fCVHqzL9Lg/2xkp62bbvQMnvPQ0G+OmtO24= -github.com/hashicorp/hc-install v0.9.2/go.mod h1:XUqBQNnuT4RsxoxiM9ZaUk0NX8hi2h+Lb6/c0OZnC/I= +github.com/hashicorp/hc-install v0.9.1 h1:gkqTfE3vVbafGQo6VZXcy2v5yoz2bE0+nhZXruCuODQ= +github.com/hashicorp/hc-install v0.9.1/go.mod h1:pWWvN/IrfeBK4XPeXXYkL6EjMufHkCK5DvwxeLKuBf0= github.com/hashicorp/hcl/v2 v2.23.0 h1:Fphj1/gCylPxHutVSEOf2fBOh1VE4AuLV7+kbJf3qos= github.com/hashicorp/hcl/v2 v2.23.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-exec v0.23.0 h1:MUiBM1s0CNlRFsCLJuM5wXZrzA3MnPYEsiXmzATMW/I= -github.com/hashicorp/terraform-exec v0.23.0/go.mod h1:mA+qnx1R8eePycfwKkCRk3Wy65mwInvlpAeOwmA7vlY= +github.com/hashicorp/terraform-exec v0.22.0 h1:G5+4Sz6jYZfRYUCg6eQgDsqTzkNXV+fP8l+uRmZHj64= +github.com/hashicorp/terraform-exec v0.22.0/go.mod h1:bjVbsncaeh8jVdhttWYZuBGj21FcYw6Ia/XfHcNO7lQ= github.com/hashicorp/terraform-json v0.24.0 h1:rUiyF+x1kYawXeRth6fKFm/MdfBS6+lW4NbeATsYz8Q= github.com/hashicorp/terraform-json v0.24.0/go.mod h1:Nfj5ubo9xbu9uiAoZVBsNOjvNKB66Oyrvtit74kC7ow= github.com/hashicorp/terraform-plugin-go v0.26.0 h1:cuIzCv4qwigug3OS7iKhpGAbZTiypAfFQmw8aE65O2M= @@ -95,12 +94,12 @@ github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9T github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1 h1:WNMsTLkZf/3ydlgsuXePa3jvZFwAJhruxTxP/c1Viuw= github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1/go.mod h1:P6o64QS97plG44iFzSM6rAn6VJIC/Sy9a9IkEtl79K4= -github.com/hashicorp/terraform-registry-address v0.2.5 h1:2GTftHqmUhVOeuu9CW3kwDkRe4pcBDq0uuK5VJngU1M= -github.com/hashicorp/terraform-registry-address v0.2.5/go.mod h1:PpzXWINwB5kuVS5CA7m1+eO2f1jKb5ZDIxrOPfpnGkg= +github.com/hashicorp/terraform-registry-address v0.2.4 h1:JXu/zHB2Ymg/TGVCRu10XqNa4Sh2bWcqCNyKWjnCPJA= +github.com/hashicorp/terraform-registry-address v0.2.4/go.mod h1:tUNYTVyCtU4OIGXXMDp7WNcJ+0W1B4nmstVDgHMjfAU= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= -github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= -github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= @@ -114,32 +113,33 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= -github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= -github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= +github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4= -github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= +github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8= -github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY= +github.com/skeema/knownhosts v1.3.0 h1:AM+y0rI04VksttfwjkSTNQorvGqmwATnvnAHpSgc0LY= +github.com/skeema/knownhosts v1.3.0/go.mod h1:sPINvnADmT/qYH1kfv+ePMmOBTH6Tbl7b5LvTDjFK7M= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= @@ -160,38 +160,36 @@ github.com/zclconf/go-cty v1.16.2 h1:LAJSwc3v81IRBZyUVQDUdZ7hs3SYs9jv0eZJDWHD/70 github.com/zclconf/go-cty v1.16.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= -golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= +golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= +golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= -golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= +golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= -golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -203,39 +201,40 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= -golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= -golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= -golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200214201135-548b770e2dfa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU= -golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s= +golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= +golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e h1:ztQaXfzEXTmCBvbtWYRhJxW+0iJcz2qXfd38/e9l7bA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.71.1 h1:ffsFWr7ygTUscGPI0KKK6TLrGz0476KUvvsbqWK0rPI= -google.golang.org/grpc v1.71.1/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= +google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 7fe34e16ae3f3e3ea95c9a710925a67fcc7fdc58 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Fri, 16 May 2025 11:39:32 +0100 Subject: [PATCH 12/19] chore: changing smoke tests to run new feature --- .github/workflows/terraform_provider_pr.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/terraform_provider_pr.yml b/.github/workflows/terraform_provider_pr.yml index cf80a88c..c469cbb8 100644 --- a/.github/workflows/terraform_provider_pr.yml +++ b/.github/workflows/terraform_provider_pr.yml @@ -149,10 +149,9 @@ jobs: go-version-file: go.mod - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloud(PrivateServiceConnect_CRUDI|AclRule_CRUDI)"' - # TODO: remove this after release - # qpf = query performance factor - go_test_smoke_qpf: - name: go test smoke qpf + # all the aa datasource checks are included in the wider CRUDI test for aa subscriptions + go_test_smoke_aa_datasource: + name: go test smoke aa datasource needs: [ go_build ] runs-on: ubuntu-latest steps: @@ -160,7 +159,7 @@ jobs: - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 with: go-version-file: go.mod - - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudProDatabase_qpf.*"' + - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudActiveActiveSubscription_CRUDI"' tfproviderlint: name: tfproviderlint From c33acb345cc1c66ddcfd90b59522ae7d71f7edcd Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Mon, 19 May 2025 16:01:56 +0100 Subject: [PATCH 13/19] fix: aa regions datasource checks on aa database --- .github/workflows/terraform_provider_pr.yml | 12 ------------ go.mod | 2 ++ .../rediscloud_active_active_database_test.go | 18 ++++++++++++++++-- ...discloud_active_active_subscription_test.go | 9 +++++---- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/terraform_provider_pr.yml b/.github/workflows/terraform_provider_pr.yml index c469cbb8..309d801e 100644 --- a/.github/workflows/terraform_provider_pr.yml +++ b/.github/workflows/terraform_provider_pr.yml @@ -149,18 +149,6 @@ jobs: go-version-file: go.mod - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloud(PrivateServiceConnect_CRUDI|AclRule_CRUDI)"' - # all the aa datasource checks are included in the wider CRUDI test for aa subscriptions - go_test_smoke_aa_datasource: - name: go test smoke aa datasource - needs: [ go_build ] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 - with: - go-version-file: go.mod - - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudActiveActiveSubscription_CRUDI"' - tfproviderlint: name: tfproviderlint needs: [go_build] diff --git a/go.mod b/go.mod index 0a9ba814..70a9a2e3 100644 --- a/go.mod +++ b/go.mod @@ -66,3 +66,5 @@ require ( google.golang.org/protobuf v1.36.3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/RedisLabs/rediscloud-go-api => ../rediscloud-go-api diff --git a/provider/rediscloud_active_active_database_test.go b/provider/rediscloud_active_active_database_test.go index 5802ef68..da71acd3 100644 --- a/provider/rediscloud_active_active_database_test.go +++ b/provider/rediscloud_active_active_database_test.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) -// Checks CRUDI (CREATE,READ,UPDATE,IMPORT) operations on the database resource. +// Checks CRUDI (CREATE, READ, UPDATE, IMPORT) operations on the database resource. func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { testAccRequiresEnvVar(t, "EXECUTE_TESTS") @@ -24,6 +24,7 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { password := acctest.RandString(20) const resourceName = "rediscloud_active_active_subscription_database.example" const datasourceName = "data.rediscloud_active_active_subscription_database.example" + const datasourceRegionName = "data.rediscloud_active_active_subscription_regions.foo" const subscriptionResourceName = "rediscloud_active_active_subscription.example" var subId int @@ -105,7 +106,7 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { return nil }, - // Test datasource + // Test subscription datasource resource.TestCheckResourceAttrSet(datasourceName, "subscription_id"), resource.TestCheckResourceAttrSet(datasourceName, "db_id"), resource.TestCheckResourceAttr(datasourceName, "name", name), @@ -119,6 +120,15 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "tags.deployment_family", "blue"), resource.TestCheckResourceAttr(datasourceName, "tags.priority", "code-2"), + + // Test the region datasource + resource.TestCheckResourceAttr(datasourceRegionName, "subscription_name", name), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.region", "us-east-1"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.networking_deployment_cidr", "192.168.0.0/24"), + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.vpc_id"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.region", "us-east-2"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.networking_deployment_cidr", "10.0.1.0/24"), + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.vpc_id"), ), }, // Test database is updated successfully, including updates to both global and local alerts and clearing modules @@ -322,6 +332,10 @@ data "rediscloud_active_active_subscription_database" "example" { subscription_id = rediscloud_active_active_subscription.example.id name = rediscloud_active_active_subscription_database.example.name } + +data "rediscloud_active_active_subscription_regions" "foo" { + subscription_name = rediscloud_active_active_subscription.example.name +} ` // TF config for updating a database diff --git a/provider/rediscloud_active_active_subscription_test.go b/provider/rediscloud_active_active_subscription_test.go index 61a2d63b..fd843fa1 100644 --- a/provider/rediscloud_active_active_subscription_test.go +++ b/provider/rediscloud_active_active_subscription_test.go @@ -20,10 +20,11 @@ var activeActiveContractFlag = flag.Bool("activeActiveContract", false, var activeActiveMarketplaceFlag = flag.Bool("activeActiveMarketplace", false, "Add this flag '-activeActiveMarketplace' to run tests for marketplace associated accounts") -// Checks CRUDI (CREATE,READ,UPDATE,IMPORT) operations on the subscription resource. +// Checks CRUDI (CREATE, READ, UPDATE, IMPORT) operations on the subscription resource. +// Also checks active-active subscription regions. func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { - testAccRequiresEnvVar(t, "EXECUTE_TESTS") + //testAccRequiresEnvVar(t, "EXECUTE_TESTS") name := acctest.RandomWithPrefix(testResourcePrefix) const resourceName = "rediscloud_active_active_subscription.example" @@ -165,11 +166,11 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { // Test the region datasource resource.TestCheckResourceAttr(datasourceRegionName, "subscription_name", name), - resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.regionId"), + //resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.regionId"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.region", "us-east-1"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.networking_deployment_cidr", "192.168.0.0/24"), resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.vpc_id"), - resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.regionId"), + //resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.regionId"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.region", "us-east-2"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.networking_deployment_cidr", "10.0.1.0/24"), resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.vpc_id"), From 76de82ef5b45e3c7d3636024a5875bdee50cccc0 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Tue, 20 May 2025 15:30:05 +0100 Subject: [PATCH 14/19] test: changing aa database test to test regions --- .../rediscloud_active_active_database_test.go | 164 ++++++++++-------- 1 file changed, 87 insertions(+), 77 deletions(-) diff --git a/provider/rediscloud_active_active_database_test.go b/provider/rediscloud_active_active_database_test.go index da71acd3..35c34665 100644 --- a/provider/rediscloud_active_active_database_test.go +++ b/provider/rediscloud_active_active_database_test.go @@ -17,12 +17,10 @@ import ( // Checks CRUDI (CREATE, READ, UPDATE, IMPORT) operations on the database resource. func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { - testAccRequiresEnvVar(t, "EXECUTE_TESTS") - subscriptionName := acctest.RandomWithPrefix(testResourcePrefix) + "-subscription" - name := acctest.RandomWithPrefix(testResourcePrefix) + "-database" + databaseName := acctest.RandomWithPrefix(testResourcePrefix) + "-database" password := acctest.RandString(20) - const resourceName = "rediscloud_active_active_subscription_database.example" + const databaseResourceName = "rediscloud_active_active_subscription_database.example" const datasourceName = "data.rediscloud_active_active_subscription_database.example" const datasourceRegionName = "data.rediscloud_active_active_subscription_regions.foo" const subscriptionResourceName = "rediscloud_active_active_subscription.example" @@ -36,44 +34,44 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { Steps: []resource.TestStep{ // Test database creation { - Config: fmt.Sprintf(testAccResourceRedisCloudActiveActiveDatabase, subscriptionName, name, password), + Config: fmt.Sprintf(testAccResourceRedisCloudActiveActiveDatabase, subscriptionName, databaseName, password), Check: resource.ComposeAggregateTestCheckFunc( // Test resource - resource.TestCheckResourceAttr(resourceName, "name", name), - resource.TestCheckResourceAttr(resourceName, "dataset_size_in_gb", "3"), - resource.TestCheckResourceAttr(resourceName, "support_oss_cluster_api", "false"), - resource.TestCheckResourceAttr(resourceName, "global_data_persistence", "none"), - resource.TestCheckResourceAttr(resourceName, "external_endpoint_for_oss_cluster_api", "false"), - resource.TestCheckResourceAttr(resourceName, "global_password", password), - resource.TestCheckResourceAttr(resourceName, "enable_tls", "false"), - resource.TestCheckResourceAttr(resourceName, "data_eviction", "volatile-lru"), - resource.TestCheckResourceAttr(resourceName, "global_alert.#", "1"), - resource.TestCheckResourceAttr(resourceName, "global_alert.0.name", "dataset-size"), - resource.TestCheckResourceAttr(resourceName, "global_alert.0.value", "1"), - resource.TestCheckResourceAttr(resourceName, "global_modules.#", "1"), - resource.TestCheckResourceAttr(resourceName, "global_modules.0", "RedisJSON"), - resource.TestCheckResourceAttr(resourceName, "global_source_ips.#", "2"), - - resource.TestCheckResourceAttr(resourceName, "override_region.#", "2"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.name", "us-east-1"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_data_persistence", "aof-every-write"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_password", "region-specific-password"), + resource.TestCheckResourceAttr(databaseResourceName, "name", databaseName), + resource.TestCheckResourceAttr(databaseResourceName, "dataset_size_in_gb", "3"), + resource.TestCheckResourceAttr(databaseResourceName, "support_oss_cluster_api", "false"), + resource.TestCheckResourceAttr(databaseResourceName, "global_data_persistence", "none"), + resource.TestCheckResourceAttr(databaseResourceName, "external_endpoint_for_oss_cluster_api", "false"), + resource.TestCheckResourceAttr(databaseResourceName, "global_password", password), + resource.TestCheckResourceAttr(databaseResourceName, "enable_tls", "false"), + resource.TestCheckResourceAttr(databaseResourceName, "data_eviction", "volatile-lru"), + resource.TestCheckResourceAttr(databaseResourceName, "global_alert.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "global_alert.0.name", "dataset-size"), + resource.TestCheckResourceAttr(databaseResourceName, "global_alert.0.value", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "global_modules.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "global_modules.0", "RedisJSON"), + resource.TestCheckResourceAttr(databaseResourceName, "global_source_ips.#", "2"), + + resource.TestCheckResourceAttr(databaseResourceName, "override_region.#", "2"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.name", "us-east-1"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_data_persistence", "aof-every-write"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_password", "region-specific-password"), // check override region alert block - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_alert.#", "1"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_alert.0.name", "dataset-size"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_alert.0.value", "42"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_source_ips.#", "1"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_source_ips.0", "192.175.0.0/16"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_alert.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_alert.0.name", "dataset-size"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_alert.0.value", "42"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_source_ips.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_source_ips.0", "192.175.0.0/16"), // Check that global values are used for the second region where no override is set - resource.TestCheckResourceAttr(resourceName, "override_region.1.name", "us-east-2"), - resource.TestCheckResourceAttr(resourceName, "override_region.1.override_global_data_persistence", ""), - resource.TestCheckResourceAttr(resourceName, "override_region.1.override_global_password", ""), - resource.TestCheckResourceAttr(resourceName, "override_region.1.override_global_alert.#", "0"), - resource.TestCheckResourceAttr(resourceName, "override_region.1.override_source_ips.#", "0"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.1.name", "us-east-2"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.1.override_global_data_persistence", ""), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.1.override_global_password", ""), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.1.override_global_alert.#", "0"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.1.override_source_ips.#", "0"), - resource.TestCheckResourceAttr(resourceName, "tags.deployment_family", "blue"), - resource.TestCheckResourceAttr(resourceName, "tags.priority", "code-2"), + resource.TestCheckResourceAttr(databaseResourceName, "tags.deployment_family", "blue"), + resource.TestCheckResourceAttr(databaseResourceName, "tags.priority", "code-2"), // Test databases exist func(s *terraform.State) error { @@ -109,7 +107,7 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { // Test subscription datasource resource.TestCheckResourceAttrSet(datasourceName, "subscription_id"), resource.TestCheckResourceAttrSet(datasourceName, "db_id"), - resource.TestCheckResourceAttr(datasourceName, "name", name), + resource.TestCheckResourceAttr(datasourceName, "name", databaseName), resource.TestCheckResourceAttr(datasourceName, "dataset_size_in_gb", "3"), resource.TestCheckResourceAttr(datasourceName, "support_oss_cluster_api", "false"), resource.TestCheckResourceAttr(datasourceName, "external_endpoint_for_oss_cluster_api", "false"), @@ -122,41 +120,53 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "tags.priority", "code-2"), // Test the region datasource - resource.TestCheckResourceAttr(datasourceRegionName, "subscription_name", name), + resource.TestCheckResourceAttr(datasourceRegionName, "subscription_name", subscriptionName), + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.vpc_id"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.region", "us-east-1"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.networking_deployment_cidr", "192.168.0.0/24"), - resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.vpc_id"), + + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.databases.0.database_id"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.database_name", databaseName), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.read_operations_per_second", "1000"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.write_operations_per_second", "1000"), + + + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.vpc_id"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.region", "us-east-2"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.networking_deployment_cidr", "10.0.1.0/24"), - resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.vpc_id"), + + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.databases.0.database_id"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.0.database_name", databaseName), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.0.read_operations_per_second", "1000"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.0.write_operations_per_second", "1000"), ), }, // Test database is updated successfully, including updates to both global and local alerts and clearing modules { - Config: fmt.Sprintf(testAccResourceRedisCloudActiveActiveDatabaseUpdate, subscriptionName, name), + Config: fmt.Sprintf(testAccResourceRedisCloudActiveActiveDatabaseUpdate, subscriptionName, databaseName), Check: resource.ComposeAggregateTestCheckFunc( // Test resource - resource.TestCheckResourceAttr(resourceName, "dataset_size_in_gb", "1"), - resource.TestCheckResourceAttr(resourceName, "support_oss_cluster_api", "true"), - resource.TestCheckResourceAttr(resourceName, "external_endpoint_for_oss_cluster_api", "true"), - resource.TestCheckResourceAttr(resourceName, "global_data_persistence", "aof-every-1-second"), - resource.TestCheckResourceAttr(resourceName, "global_password", "updated-password"), - resource.TestCheckResourceAttr(resourceName, "global_alert.#", "1"), - resource.TestCheckResourceAttr(resourceName, "global_alert.0.name", "dataset-size"), - resource.TestCheckResourceAttr(resourceName, "global_alert.0.value", "60"), + resource.TestCheckResourceAttr(databaseResourceName, "dataset_size_in_gb", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "support_oss_cluster_api", "true"), + resource.TestCheckResourceAttr(databaseResourceName, "external_endpoint_for_oss_cluster_api", "true"), + resource.TestCheckResourceAttr(databaseResourceName, "global_data_persistence", "aof-every-1-second"), + resource.TestCheckResourceAttr(databaseResourceName, "global_password", "updated-password"), + resource.TestCheckResourceAttr(databaseResourceName, "global_alert.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "global_alert.0.name", "dataset-size"), + resource.TestCheckResourceAttr(databaseResourceName, "global_alert.0.value", "60"), // Changes are ignored after creation - resource.TestCheckResourceAttr(resourceName, "global_modules.#", "1"), - resource.TestCheckResourceAttr(resourceName, "global_modules.0", "RedisJSON"), - - resource.TestCheckResourceAttr(resourceName, "override_region.#", "1"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.name", "us-east-1"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_data_persistence", "none"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_password", "password-updated"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_alert.#", "1"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_alert.0.name", "dataset-size"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_alert.0.value", "41"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_source_ips.#", "0"), + resource.TestCheckResourceAttr(databaseResourceName, "global_modules.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "global_modules.0", "RedisJSON"), + + resource.TestCheckResourceAttr(databaseResourceName, "override_region.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.name", "us-east-1"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_data_persistence", "none"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_password", "password-updated"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_alert.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_alert.0.name", "dataset-size"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_alert.0.value", "41"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_source_ips.#", "0"), // Test datasource resource.TestCheckResourceAttr(datasourceName, "dataset_size_in_gb", "1"), @@ -166,28 +176,28 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { }, // Test database is updated, including deletion of global and local alerts and replacing modules { - Config: fmt.Sprintf(testAccResourceRedisCloudActiveActiveDatabaseUpdateNoAlerts, subscriptionName, name), + Config: fmt.Sprintf(testAccResourceRedisCloudActiveActiveDatabaseUpdateNoAlerts, subscriptionName, databaseName), Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr(resourceName, "dataset_size_in_gb", "1"), - resource.TestCheckResourceAttr(resourceName, "support_oss_cluster_api", "true"), - resource.TestCheckResourceAttr(resourceName, "external_endpoint_for_oss_cluster_api", "true"), - resource.TestCheckResourceAttr(resourceName, "global_data_persistence", "aof-every-1-second"), - resource.TestCheckResourceAttr(resourceName, "global_password", "updated-password"), - resource.TestCheckResourceAttr(resourceName, "global_alert.#", "0"), - resource.TestCheckResourceAttr(resourceName, "global_modules.#", "1"), - resource.TestCheckResourceAttr(resourceName, "global_modules.0", "RedisJSON"), - - resource.TestCheckResourceAttr(resourceName, "override_region.#", "1"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.name", "us-east-1"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_data_persistence", "none"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_password", "password-updated"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_alert.#", "0"), - resource.TestCheckResourceAttr(resourceName, "override_region.0.override_global_source_ips.#", "0"), + resource.TestCheckResourceAttr(databaseResourceName, "dataset_size_in_gb", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "support_oss_cluster_api", "true"), + resource.TestCheckResourceAttr(databaseResourceName, "external_endpoint_for_oss_cluster_api", "true"), + resource.TestCheckResourceAttr(databaseResourceName, "global_data_persistence", "aof-every-1-second"), + resource.TestCheckResourceAttr(databaseResourceName, "global_password", "updated-password"), + resource.TestCheckResourceAttr(databaseResourceName, "global_alert.#", "0"), + resource.TestCheckResourceAttr(databaseResourceName, "global_modules.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "global_modules.0", "RedisJSON"), + + resource.TestCheckResourceAttr(databaseResourceName, "override_region.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.name", "us-east-1"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_data_persistence", "none"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_password", "password-updated"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_alert.#", "0"), + resource.TestCheckResourceAttr(databaseResourceName, "override_region.0.override_global_source_ips.#", "0"), ), }, // Test that that database is imported successfully { - Config: fmt.Sprintf(testAccResourceRedisCloudActiveActiveDatabaseImport, subscriptionName, name), + Config: fmt.Sprintf(testAccResourceRedisCloudActiveActiveDatabaseImport, subscriptionName, databaseName), ResourceName: "rediscloud_active_active_subscription_database.example", ImportState: true, ImportStateVerify: true, From e35e96955ac6c550eeb02aac7adf55811f98dd6d Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Tue, 20 May 2025 17:36:07 +0100 Subject: [PATCH 15/19] chore: cleaning up --- provider/rediscloud_active_active_database_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/provider/rediscloud_active_active_database_test.go b/provider/rediscloud_active_active_database_test.go index 35c34665..b5b9833b 100644 --- a/provider/rediscloud_active_active_database_test.go +++ b/provider/rediscloud_active_active_database_test.go @@ -129,8 +129,7 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.database_name", databaseName), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.read_operations_per_second", "1000"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.write_operations_per_second", "1000"), - - + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.vpc_id"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.region", "us-east-2"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.networking_deployment_cidr", "10.0.1.0/24"), From 0984891a3b957d72c7008ea1771bd060b7c7ef87 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Tue, 20 May 2025 18:18:54 +0100 Subject: [PATCH 16/19] chore: updating go api version --- go.mod | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 70a9a2e3..282bc8c0 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/RedisLabs/terraform-provider-rediscloud go 1.22.4 require ( - github.com/RedisLabs/rediscloud-go-api v0.25.0 + github.com/RedisLabs/rediscloud-go-api v0.26.0 github.com/bflad/tfproviderlint v0.31.0 github.com/hashicorp/go-cty v1.5.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1 @@ -66,5 +66,3 @@ require ( google.golang.org/protobuf v1.36.3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/RedisLabs/rediscloud-go-api => ../rediscloud-go-api From 69f0ce5111bffa892187311e584670ed58d13138 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Tue, 20 May 2025 18:41:52 +0100 Subject: [PATCH 17/19] fix: go sum not correct --- go.sum | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.sum b/go.sum index 476114d8..abd0f506 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= -github.com/RedisLabs/rediscloud-go-api v0.25.0 h1:44q7fPxjkS94slkUxZCueaDB5i+axxjkFqOXIx3D44M= -github.com/RedisLabs/rediscloud-go-api v0.25.0/go.mod h1:3/oVb71rv2OstFRYEc65QCIbfwnJTgZeQhtPCcdHook= +github.com/RedisLabs/rediscloud-go-api v0.26.0 h1:ka6CN2O+Ti6igkfH8lDT9Ua1/ksEh2H5dj1GF/pnKKQ= +github.com/RedisLabs/rediscloud-go-api v0.26.0/go.mod h1:3/oVb71rv2OstFRYEc65QCIbfwnJTgZeQhtPCcdHook= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= From ee5bafc765d75a2bcca97e5341473ea45c902b32 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Wed, 21 May 2025 09:24:11 +0100 Subject: [PATCH 18/19] test: name of terraform resource incorrect --- provider/rediscloud_active_active_database_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/provider/rediscloud_active_active_database_test.go b/provider/rediscloud_active_active_database_test.go index b5b9833b..f14279f8 100644 --- a/provider/rediscloud_active_active_database_test.go +++ b/provider/rediscloud_active_active_database_test.go @@ -119,7 +119,7 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "tags.deployment_family", "blue"), resource.TestCheckResourceAttr(datasourceName, "tags.priority", "code-2"), - // Test the region datasource + // Test the db region datasource resource.TestCheckResourceAttr(datasourceRegionName, "subscription_name", subscriptionName), resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.vpc_id"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.region", "us-east-1"), @@ -129,7 +129,7 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.database_name", databaseName), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.read_operations_per_second", "1000"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.write_operations_per_second", "1000"), - + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.vpc_id"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.region", "us-east-2"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.networking_deployment_cidr", "10.0.1.0/24"), @@ -336,7 +336,7 @@ resource "rediscloud_active_active_subscription_database" "example" { } } - +// data "rediscloud_active_active_subscription_database" "example" { subscription_id = rediscloud_active_active_subscription.example.id name = rediscloud_active_active_subscription_database.example.name From da0b8667cfd7c17612598dfd306efa40149aac59 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Wed, 21 May 2025 11:41:57 +0100 Subject: [PATCH 19/19] test: moving aa sub tests over to the specific test for region resource --- .github/workflows/terraform_provider_pr.yml | 14 +++++++++++++- .../rediscloud_active_active_database_test.go | 15 ++------------- .../rediscloud_active_active_subscription_test.go | 4 ++-- ...oud_active_active_subscription_regions_test.go | 15 +++++++++++++++ 4 files changed, 32 insertions(+), 16 deletions(-) diff --git a/.github/workflows/terraform_provider_pr.yml b/.github/workflows/terraform_provider_pr.yml index 309d801e..e050127a 100644 --- a/.github/workflows/terraform_provider_pr.yml +++ b/.github/workflows/terraform_provider_pr.yml @@ -140,7 +140,7 @@ jobs: go_test_smoke_misc: name: go test smoke misc - needs: [go_build] + needs: [ go_build ] runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -149,6 +149,18 @@ jobs: go-version-file: go.mod - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloud(PrivateServiceConnect_CRUDI|AclRule_CRUDI)"' + # TODO: remove, temporary: tests the subscription regions + go_test_smoke_aa_sub_regions: + name: go test smoke aa sub regions + needs: [go_build] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 + with: + go-version-file: go.mod + - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudActiveActiveSubscriptionRegions_CRUDI"' + tfproviderlint: name: tfproviderlint needs: [go_build] diff --git a/provider/rediscloud_active_active_database_test.go b/provider/rediscloud_active_active_database_test.go index f14279f8..3b69ba2a 100644 --- a/provider/rediscloud_active_active_database_test.go +++ b/provider/rediscloud_active_active_database_test.go @@ -22,7 +22,7 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { password := acctest.RandString(20) const databaseResourceName = "rediscloud_active_active_subscription_database.example" const datasourceName = "data.rediscloud_active_active_subscription_database.example" - const datasourceRegionName = "data.rediscloud_active_active_subscription_regions.foo" + const datasourceRegionName = "data.rediscloud_active_active_subscription_regions.example" const subscriptionResourceName = "rediscloud_active_active_subscription.example" var subId int @@ -124,20 +124,9 @@ func TestAccResourceRedisCloudActiveActiveDatabase_CRUDI(t *testing.T) { resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.vpc_id"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.region", "us-east-1"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.networking_deployment_cidr", "192.168.0.0/24"), - - resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.0.databases.0.database_id"), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.database_name", databaseName), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.read_operations_per_second", "1000"), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.0.databases.0.write_operations_per_second", "1000"), - resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.vpc_id"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.region", "us-east-2"), resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.networking_deployment_cidr", "10.0.1.0/24"), - - resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.1.databases.0.database_id"), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.0.database_name", databaseName), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.0.read_operations_per_second", "1000"), - resource.TestCheckResourceAttr(datasourceRegionName, "regions.1.databases.0.write_operations_per_second", "1000"), ), }, // Test database is updated successfully, including updates to both global and local alerts and clearing modules @@ -342,7 +331,7 @@ data "rediscloud_active_active_subscription_database" "example" { name = rediscloud_active_active_subscription_database.example.name } -data "rediscloud_active_active_subscription_regions" "foo" { +data "rediscloud_active_active_subscription_regions" "example" { subscription_name = rediscloud_active_active_subscription.example.name } ` diff --git a/provider/rediscloud_active_active_subscription_test.go b/provider/rediscloud_active_active_subscription_test.go index fd843fa1..63c7d701 100644 --- a/provider/rediscloud_active_active_subscription_test.go +++ b/provider/rediscloud_active_active_subscription_test.go @@ -29,7 +29,7 @@ func TestAccResourceRedisCloudActiveActiveSubscription_CRUDI(t *testing.T) { name := acctest.RandomWithPrefix(testResourcePrefix) const resourceName = "rediscloud_active_active_subscription.example" const datasourceSubscriptionName = "data.rediscloud_active_active_subscription.example" - const datasourceRegionName = "data.rediscloud_active_active_subscription_regions.foo" + const datasourceRegionName = "data.rediscloud_active_active_subscription_regions.example" var subId int @@ -426,7 +426,7 @@ data "rediscloud_active_active_subscription" "example" { name = rediscloud_active_active_subscription.example.name } -data "rediscloud_active_active_subscription_regions" "foo" { +data "rediscloud_active_active_subscription_regions" "example" { subscription_name = rediscloud_active_active_subscription.example.name } ` diff --git a/provider/resource_rediscloud_active_active_subscription_regions_test.go b/provider/resource_rediscloud_active_active_subscription_regions_test.go index ffe7b7a6..fb0138eb 100644 --- a/provider/resource_rediscloud_active_active_subscription_regions_test.go +++ b/provider/resource_rediscloud_active_active_subscription_regions_test.go @@ -20,6 +20,7 @@ func TestAccResourceRedisCloudActiveActiveSubscriptionRegions_CRUDI(t *testing.T dbName := acctest.RandomWithPrefix(testResourcePrefix) + "-regions" + "-db" dbPass := acctest.RandString(20) const resourceName = "rediscloud_active_active_subscription_regions.example" + const datasourceRegionName = "data.rediscloud_active_active_subscription_regions.example" var subId int @@ -39,6 +40,16 @@ func TestAccResourceRedisCloudActiveActiveSubscriptionRegions_CRUDI(t *testing.T resource.TestCheckResourceAttr(resourceName, "region.2.database.0.local_write_operations_per_second", "1500"), resource.TestCheckResourceAttr(resourceName, "region.2.database.0.local_read_operations_per_second", "1500"), + // Test the db regions datasource + resource.TestCheckResourceAttr(datasourceRegionName, "subscription_name", subName), + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.2.vpc_id"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.region", "us-west-2"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.networking_deployment_cidr", "10.2.0.0/24"), + resource.TestCheckResourceAttrSet(datasourceRegionName, "regions.2.databases.0.database_id"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.databases.0.database_name", dbName), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.databases.0.read_operations_per_second", "1500"), + resource.TestCheckResourceAttr(datasourceRegionName, "regions.2.databases.0.write_operations_per_second", "1500"), + func(s *terraform.State) error { r := s.RootModule().Resources[resourceName] @@ -152,6 +163,10 @@ resource "rediscloud_active_active_subscription_database" "example" { } } +data "rediscloud_active_active_subscription_regions" "example" { + subscription_name = rediscloud_active_active_subscription.example.name +} + ` // TF config for provisioning a new region.