diff --git a/go.mod b/go.mod index 7b99e6d31..68e08ff2e 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/hashicorp/terraform v0.14.0 github.com/hashicorp/terraform-plugin-sdk v1.17.2 github.com/nav-inc/datetime v0.1.3 - github.com/openlyinc/pointy v1.1.2 github.com/outscale/osc-sdk-go/v2 v2.18.2 github.com/spf13/cast v1.3.1 ) @@ -60,7 +59,6 @@ require ( github.com/huandu/xstrings v1.3.2 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/jstemmer/go-junit-report v0.9.1 // indirect github.com/klauspost/compress v1.17.1 // indirect github.com/mattn/go-colorable v0.1.1 // indirect github.com/mattn/go-isatty v0.0.5 // indirect @@ -82,14 +80,11 @@ require ( github.com/zclconf/go-cty-yaml v1.0.2 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.14.0 // indirect - golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/mod v0.8.0 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.13.0 // indirect golang.org/x/sync v0.4.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.6.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/api v0.147.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index 1fb26fedd..0ba958f67 100644 --- a/go.sum +++ b/go.sum @@ -12,7 +12,6 @@ cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bP cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0 h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= @@ -168,7 +167,6 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= @@ -204,7 +202,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= github.com/ChrisTrenkamp/goxpath v0.0.0-20190607011252-c5096ec8773d/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= -github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -259,8 +256,6 @@ github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU github.com/aws/aws-sdk-go v1.37.0/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.44.103/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.45.23 h1:0xRQw5fsFMpisaliDZ8iUZtw9w+3YjY9/UwUGRbB/i4= -github.com/aws/aws-sdk-go v1.45.23/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= @@ -359,7 +354,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 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= @@ -369,9 +363,9 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -412,7 +406,6 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -422,10 +415,10 @@ github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0 h1:pMen7vLs8nvgEYhywH3KDWJIJTeEr2ULsVWHWYHQyBs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -445,7 +438,6 @@ github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= @@ -456,7 +448,6 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/ github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= @@ -490,7 +481,6 @@ github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.5.1/go.mod h1:a7z7NPPfNQpJWcn4rSWFtdrSldqLdLPEF3d8nFMsSLM= -github.com/hashicorp/go-getter v1.5.3 h1:NF5+zOlQegim+w/EUhSLh6QhXHmZMEeHLQzllkQ3ROU= github.com/hashicorp/go-getter v1.5.3/go.mod h1:BrrV/1clo8cCYu6mxvboYg+KutTiFnXjMEgDD8+i7ZI= github.com/hashicorp/go-getter v1.7.3 h1:bN2+Fw9XPFvOCjB0UOevFIMICZ7G2XSQHzfvLUyOM5E= github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= @@ -516,7 +506,6 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -575,7 +564,6 @@ github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBv github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -585,7 +573,6 @@ github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.11.2 h1:MiK62aErc3gIiVEtyzKfeOHgW7atJb5g/KNX5m3c2nQ= github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.17.1 h1:NE3C767s2ak2bweCZo3+rdP4U/HoyVXLv/X9f2gPS5g= @@ -639,7 +626,6 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb/go.mod h1:OaY7UOoTkkrX3wRwjpYRKafIkkyeD0UtweSHAWWiqQM= github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.4 h1:ZU1VNC02qyufSZsjjs7+khruk2fKvbQ3TwRV/IBCeFA= github.com/mitchellh/go-testing-interface v1.0.4/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= @@ -676,8 +662,6 @@ github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/openlyinc/pointy v1.1.2 h1:LywVV2BWC5Sp5v7FoP4bUD+2Yn5k0VNeRbU5vq9jUMY= -github.com/openlyinc/pointy v1.1.2/go.mod h1:w2Sytx+0FVuMKn37xpXIAyBNhFNBIJGR/v2m7ik1WtM= github.com/outscale/osc-sdk-go/v2 v2.18.2 h1:tnv6f57L0lg1czaujHTP+veZesJHICk5DbyRfgYpe5Q= github.com/outscale/osc-sdk-go/v2 v2.18.2/go.mod h1:kzhtUErCzKYl87bZ+kDMphDafmnwbsyFJY9iHF7NgNE= github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk= @@ -735,10 +719,10 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw= github.com/tencentcloud/tencentcloud-sdk-go v3.0.82+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4= @@ -746,7 +730,6 @@ github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190808065407-f07404cefc8c/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tombuildsstuff/giovanni v0.12.0/go.mod h1:qJ5dpiYWkRsuOSXO8wHbee7+wElkLNfWVolcf59N84E= github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= -github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= @@ -781,7 +764,6 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= @@ -827,7 +809,6 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= @@ -843,8 +824,6 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -904,8 +883,6 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= -golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -949,7 +926,6 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1109,8 +1085,6 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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= @@ -1137,7 +1111,6 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.34.0 h1:k40adF3uR+6x/+hO5Dh4ZFUqFp67vxvbpafFiJxl10A= google.golang.org/api v0.34.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= @@ -1213,7 +1186,6 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d h1:92D1fum1bJLKSdr11OJ+54YeCMCGYIygTA7R/YZxH5M= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1305,7 +1277,6 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= @@ -1374,8 +1345,8 @@ gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/outscale/data_source_outscale_vm.go b/outscale/data_source_outscale_vm.go index c41ffde14..d13940ce6 100644 --- a/outscale/data_source_outscale_vm.go +++ b/outscale/data_source_outscale_vm.go @@ -291,13 +291,11 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "block_device_mappings_created": { Type: schema.TypeList, - Optional: true, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "bsu": { Type: schema.TypeMap, - Optional: true, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -322,14 +320,13 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "device_name": { Type: schema.TypeString, - Optional: true, + Computed: true, }, }, }, }, "bsu_optimized": { Type: schema.TypeBool, - Optional: true, Computed: true, }, "client_token": { @@ -342,7 +339,6 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "deletion_protection": { Type: schema.TypeBool, - Optional: true, Computed: true, }, "hypervisor": { @@ -351,28 +347,24 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "image_id": { Type: schema.TypeString, - ForceNew: true, - Optional: true, Computed: true, }, "is_source_dest_checked": { Type: schema.TypeBool, - Optional: true, Computed: true, }, "keypair_name": { Type: schema.TypeString, - Optional: true, Computed: true, }, "security_group_ids": { Type: schema.TypeSet, - Optional: true, + Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "security_group_names": { Type: schema.TypeList, - Optional: true, + Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "launch_number": { @@ -557,39 +549,32 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "nics": { Type: schema.TypeList, - Optional: true, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "delete_on_vm_deletion": { Type: schema.TypeBool, Computed: true, - Optional: true, }, "description": { Type: schema.TypeString, Computed: true, - Optional: true, }, "device_number": { Type: schema.TypeInt, Computed: true, - Optional: true, }, "nic_id": { Type: schema.TypeString, - Optional: true, Computed: true, }, "private_ips": { Type: schema.TypeSet, - Optional: true, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "is_primary": { Type: schema.TypeBool, - Optional: true, Computed: true, }, "link_public_ip": { @@ -618,7 +603,6 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "private_ip": { Type: schema.TypeString, - Optional: true, Computed: true, }, }, @@ -626,12 +610,10 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "secondary_private_ip_count": { Type: schema.TypeInt, - Optional: true, Computed: true, }, "security_group_ids": { Type: schema.TypeList, - Optional: true, Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -648,7 +630,6 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { "subnet_id": { Type: schema.TypeString, Computed: true, - Optional: true, }, "link_nic": { Type: schema.TypeList, @@ -710,7 +691,6 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "security_groups_names": { Type: schema.TypeList, - Optional: true, Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -747,12 +727,10 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "placement_subregion_name": { Type: schema.TypeString, - Optional: true, Computed: true, }, "placement_tenancy": { Type: schema.TypeString, - Optional: true, Computed: true, }, "private_dns_name": { @@ -814,8 +792,6 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "subnet_id": { Type: schema.TypeString, - ForceNew: true, - Optional: true, Computed: true, }, "tags": { @@ -836,22 +812,19 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "user_data": { Type: schema.TypeString, - Optional: true, Computed: true, }, "vm_id": { Type: schema.TypeString, - Computed: true, Optional: true, + Computed: true, }, "vm_initiated_shutdown_behavior": { Type: schema.TypeString, - Optional: true, Computed: true, }, "vm_type": { Type: schema.TypeString, - Optional: true, Computed: true, }, "request_id": { @@ -860,7 +833,7 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "private_ips": { Type: schema.TypeList, - Optional: true, + Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, } diff --git a/outscale/resource_outscale_ca.go b/outscale/resource_outscale_ca.go index dbf61326b..f0ea82e9c 100644 --- a/outscale/resource_outscale_ca.go +++ b/outscale/resource_outscale_ca.go @@ -7,7 +7,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/openlyinc/pointy" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" @@ -58,8 +57,8 @@ func resourceOutscaleOAPICaCreate(d *schema.ResourceData, meta interface{}) erro req := oscgo.CreateCaRequest{ CaPem: d.Get("ca_pem").(string), } - if v, ok := d.GetOk("description"); ok { - req.Description = pointy.String(v.(string)) + if _, ok := d.GetOk("description"); ok { + req.SetDescription(d.Get("description").(string)) } var resp oscgo.CreateCaResponse @@ -130,8 +129,7 @@ func resourceOutscaleOAPICaUpdate(d *schema.ResourceData, meta interface{}) erro } if d.HasChange("description") { - _, des := d.GetChange("description") - req.Description = pointy.String(des.(string)) + req.SetDescription(d.Get("description").(string)) } var err error diff --git a/outscale/resource_outscale_dhcp_option_test.go b/outscale/resource_outscale_dhcp_option_test.go index 311688b92..e37a9c2ee 100644 --- a/outscale/resource_outscale_dhcp_option_test.go +++ b/outscale/resource_outscale_dhcp_option_test.go @@ -8,7 +8,6 @@ import ( "testing" "time" - "github.com/openlyinc/pointy" "github.com/terraform-providers/terraform-provider-outscale/utils" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -122,10 +121,9 @@ func TestAccNet_withDhcpOptional(t *testing.T) { domainName := fmt.Sprintf("%s.compute%s.internal", utils.GetRegion(), acctest.RandString(3)) domainServers := []string{"192.168.12.12", "192.168.12.132"} - tags := &oscgo.Tag{ - Key: pointy.String(acctest.RandomWithPrefix("name")), - Value: pointy.String(acctest.RandomWithPrefix("test-MZI")), - } + tags := &oscgo.Tag{} + tags.SetKey(acctest.RandomWithPrefix("name")) + tags.SetValue(acctest.RandomWithPrefix("test-MZI")) domainNameUpdated := fmt.Sprintf("%s.compute%s.internal", utils.GetRegion(), acctest.RandString(3)) diff --git a/outscale/resource_outscale_image_export_task.go b/outscale/resource_outscale_image_export_task.go index bdccbf476..cba0bc7ae 100644 --- a/outscale/resource_outscale_image_export_task.go +++ b/outscale/resource_outscale_image_export_task.go @@ -10,7 +10,6 @@ import ( "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/openlyinc/pointy" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -146,10 +145,8 @@ func resourceOAPIImageExportTaskCreate(d *schema.ResourceData, meta interface{}) a := v.([]interface{}) if len(a) > 0 { w := a[0].(map[string]interface{}) - et.OsuApiKey = &oscgo.OsuApiKey{ - ApiKeyId: pointy.String(w["api_key_id"].(string)), - SecretKey: pointy.String(w["secret_key"].(string)), - } + et.OsuApiKey.SetApiKeyId(w["api_key_id"].(string)) + et.OsuApiKey.SetSecretKey(w["secret_key"].(string)) } } if v, ok := e["osu_manifest_url"]; ok { diff --git a/outscale/resource_outscale_nic.go b/outscale/resource_outscale_nic.go index 43ecc1375..8fafad19d 100644 --- a/outscale/resource_outscale_nic.go +++ b/outscale/resource_outscale_nic.go @@ -15,7 +15,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/openlyinc/pointy" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -291,11 +290,7 @@ func resourceOutscaleOAPINicCreate(d *schema.ResourceData, meta interface{}) err if err := d.Set("private_ip", ""); err != nil { return err } - - log.Printf("[INFO] ENI ID: %s", d.Id()) - return resourceOutscaleOAPINicRead(d, meta) - } // Read OAPINic @@ -327,7 +322,6 @@ func resourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) error if err != nil { if strings.Contains(err.Error(), "Unable to find Nic") { - // The ENI is gone now, so just remove it from the state d.SetId("") return nil } @@ -368,11 +362,6 @@ func resourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) error bb["vm_account_id"] = att.GetVmAccountId() bb["state"] = att.GetState() - //aa[0] = bb - // if err := d.Set("link_nic", aa); err != nil { - // return err - // } - if err := d.Set("link_nic", bb); err != nil { return err } @@ -607,6 +596,9 @@ func resourceOutscaleOAPINicUpdate(d *schema.ResourceData, meta interface{}) err pips := d.Get("pips").(*schema.Set).List() prips := pips[:0] pip := d.Get("private_ip") + input := oscgo.LinkPrivateIpsRequest{ + NicId: d.Id(), + } for _, ip := range pips { if ip != pip { @@ -619,12 +611,7 @@ func resourceOutscaleOAPINicUpdate(d *schema.ResourceData, meta interface{}) err // Surplus of IPs, add the diff if diff > 0 { - dif := int32(diff) - input := oscgo.LinkPrivateIpsRequest{ - NicId: d.Id(), - SecondaryPrivateIpCount: pointy.Int32(dif), - } - // _, err := conn.VM.AssignPrivateIpAddresses(input) + input.SetSecondaryPrivateIpCount(int32(diff)) err := resource.Retry(5*time.Minute, func() *resource.RetryError { var err error @@ -677,15 +664,13 @@ func resourceOutscaleOAPINicUpdate(d *schema.ResourceData, meta interface{}) err if err != nil { return fmt.Errorf("Failure updating ENI: %s", err) } - } if d.HasChange("description") { request := oscgo.UpdateNicRequest{ - NicId: d.Id(), - Description: pointy.String(d.Get("description").(string)), + NicId: d.Id(), } - + request.SetDescription(d.Get("description").(string)) var err error err = resource.Retry(5*time.Minute, func() *resource.RetryError { _, httpResp, err := conn.NicApi.UpdateNic(context.Background()).UpdateNicRequest(request).Execute() diff --git a/outscale/resource_outscale_route.go b/outscale/resource_outscale_route.go index 45f82c04a..85eecf04f 100644 --- a/outscale/resource_outscale_route.go +++ b/outscale/resource_outscale_route.go @@ -9,7 +9,6 @@ import ( "strings" "time" - "github.com/openlyinc/pointy" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" @@ -286,39 +285,22 @@ func resourceOutscaleOAPIRouteUpdate(d *schema.ResourceData, meta interface{}) e return errors.New("no target found for the update") } - replaceOpts := oscgo.UpdateRouteRequest{} + replaceOpts := oscgo.UpdateRouteRequest{ + RouteTableId: d.Get("route_table_id").(string), + DestinationIpRange: d.Get("destination_ip_range").(string), + } switch target { case "gateway_id": - replaceOpts = oscgo.UpdateRouteRequest{ - RouteTableId: d.Get("route_table_id").(string), - DestinationIpRange: d.Get("destination_ip_range").(string), - GatewayId: pointy.String(d.Get("gateway_id").(string)), - } + replaceOpts.SetGatewayId(d.Get("gateway_id").(string)) case "nat_service_id": - replaceOpts = oscgo.UpdateRouteRequest{ - RouteTableId: d.Get("route_table_id").(string), - DestinationIpRange: d.Get("destination_ip_range").(string), - NatServiceId: pointy.String(d.Get("nat_service_id").(string)), - } + replaceOpts.SetNatServiceId(d.Get("nat_service_id").(string)) case "vm_id": - replaceOpts = oscgo.UpdateRouteRequest{ - RouteTableId: d.Get("route_table_id").(string), - DestinationIpRange: d.Get("destination_ip_range").(string), - VmId: pointy.String(d.Get("vm_id").(string)), - } + replaceOpts.SetVmId(d.Get("vm_id").(string)) case "nic_id": - replaceOpts = oscgo.UpdateRouteRequest{ - RouteTableId: d.Get("route_table_id").(string), - DestinationIpRange: d.Get("destination_ip_range").(string), - NicId: pointy.String(d.Get("nic_id").(string)), - } + replaceOpts.SetNicId(d.Get("nic_id").(string)) case "net_peering_id": - replaceOpts = oscgo.UpdateRouteRequest{ - RouteTableId: d.Get("route_table_id").(string), - DestinationIpRange: d.Get("destination_ip_range").(string), - NetPeeringId: pointy.String(d.Get("net_peering_id").(string)), - } + replaceOpts.SetNetPeeringId(d.Get("net_peering_id").(string)) default: return fmt.Errorf("An invalid target type specified: %s", target) } diff --git a/outscale/resource_outscale_security_group_rule.go b/outscale/resource_outscale_security_group_rule.go index 20463c54c..40b0ac181 100644 --- a/outscale/resource_outscale_security_group_rule.go +++ b/outscale/resource_outscale_security_group_rule.go @@ -9,7 +9,6 @@ import ( "strings" "time" - "github.com/openlyinc/pointy" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" @@ -98,22 +97,22 @@ func resourceOutscaleOAPIOutboundRuleCreate(d *schema.ResourceData, meta interfa } if v, ok := d.GetOkExists("from_port_range"); ok { - req.FromPortRange = pointy.Int32(cast.ToInt32(v)) + req.SetFromPortRange(cast.ToInt32(v)) } if v, ok := d.GetOkExists("to_port_range"); ok { - req.ToPortRange = pointy.Int32(cast.ToInt32(v)) + req.SetToPortRange(cast.ToInt32(v)) } if v, ok := d.GetOk("ip_protocol"); ok { - req.IpProtocol = pointy.String(v.(string)) + req.SetIpProtocol(v.(string)) } if v, ok := d.GetOk("ip_range"); ok { - req.IpRange = pointy.String(v.(string)) + req.SetIpRange(v.(string)) } if v, ok := d.GetOk("security_group_account_id_to_link"); ok { - req.SecurityGroupAccountIdToLink = pointy.String(v.(string)) + req.SetSecurityGroupAccountIdToLink(v.(string)) } if v, ok := d.GetOk("security_group_name_to_link"); ok { - req.SecurityGroupNameToLink = pointy.String(v.(string)) + req.SetSecurityGroupNameToLink(v.(string)) } var err error @@ -170,16 +169,16 @@ func resourceOutscaleOAPIOutboundRuleDelete(d *schema.ResourceData, meta interfa } if v, ok := d.GetOkExists("from_port_range"); ok { - req.FromPortRange = pointy.Int32(cast.ToInt32(v)) + req.SetFromPortRange(cast.ToInt32(v)) } if v, ok := d.GetOkExists("to_port_range"); ok { - req.ToPortRange = pointy.Int32(cast.ToInt32(v)) + req.SetToPortRange(cast.ToInt32(v)) } if v, ok := d.GetOk("ip_protocol"); ok { - req.IpProtocol = pointy.String(v.(string)) + req.SetIpProtocol(v.(string)) } if v, ok := d.GetOk("ip_range"); ok { - req.IpRange = pointy.String(v.(string)) + req.SetIpRange(v.(string)) } err := resource.Retry(5*time.Minute, func() *resource.RetryError { @@ -215,13 +214,13 @@ func expandRules(d *schema.ResourceData, conn *oscgo.APIClient) *[]oscgo.Securit rules[i].ServiceIds = utils.InterfaceSliceToStringSlicePtr(r["service_ids"].([]interface{})) } if v, ok := r["from_port_range"]; ok { - rules[i].FromPortRange = pointy.Int32(cast.ToInt32(v)) + rules[i].SetFromPortRange(cast.ToInt32(v)) } if v, ok := r["ip_protocol"]; ok && v != "" { - rules[i].IpProtocol = pointy.String(cast.ToString(v)) + rules[i].SetIpProtocol(cast.ToString(v)) } if v, ok := r["to_port_range"]; ok { - rules[i].ToPortRange = pointy.Int32(cast.ToInt32(v)) + rules[i].SetToPortRange(cast.ToInt32(v)) } } return &rules @@ -266,16 +265,16 @@ func expandSecurityGroupsMembers(gps []interface{}, conn *oscgo.APIClient) *[]os groups[i] = oscgo.SecurityGroupsMember{} if v, ok := g["account_id"]; ok && v != "" { - groups[i].AccountId = pointy.String(cast.ToString(v)) + groups[i].SetAccountId(cast.ToString(v)) } if v, ok := g["security_group_name"]; ok && v != "" { - groups[i].SecurityGroupName = pointy.String(cast.ToString(v)) + groups[i].SetSecurityGroupName(cast.ToString(v)) if sgID := getSgIdinVPC(conn, cast.ToString(v)); sgID != "" { - groups[i].SecurityGroupId = pointy.String(cast.ToString(sgID)) + groups[i].SetSecurityGroupId(cast.ToString(sgID)) } } if v, ok := g["security_group_id"]; ok && v != "" { - groups[i].SecurityGroupId = pointy.String(cast.ToString(v)) + groups[i].SetSecurityGroupId(cast.ToString(v)) } } return &groups diff --git a/outscale/resource_outscale_server_certificate.go b/outscale/resource_outscale_server_certificate.go index 6be8fbed8..c29696f54 100644 --- a/outscale/resource_outscale_server_certificate.go +++ b/outscale/resource_outscale_server_certificate.go @@ -8,7 +8,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/openlyinc/pointy" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" @@ -88,14 +87,14 @@ func resourceOutscaleOAPIServerCertificateCreate(d *schema.ResourceData, meta in return fmt.Errorf("[DEBUG] Error 'private_key' field is require for server certificate creation") } - if v, ok := d.GetOk("chain"); ok { - req.Chain = pointy.String(v.(string)) + if _, ok := d.GetOk("chain"); ok { + req.SetChain(d.Get("chain").(string)) } - if v, ok := d.GetOk("dry_run"); ok { - req.DryRun = pointy.Bool(v.(bool)) + if _, ok := d.GetOk("dry_run"); ok { + req.SetDryRun(d.Get("dry_run").(bool)) } - if v, ok := d.GetOk("path"); ok { - req.Path = pointy.String(v.(string)) + if _, ok := d.GetOk("path"); ok { + req.SetPath(d.Get("path").(string)) } var resp oscgo.CreateServerCertificateResponse var err error @@ -168,16 +167,16 @@ func resourceOutscaleOAPIServerCertificateRead(d *schema.ResourceData, meta inte func resourceOutscaleOAPIServerCertificateUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI - oldName, newName := d.GetChange("name") + oldName, _ := d.GetChange("name") req := oscgo.UpdateServerCertificateRequest{ Name: oldName.(string), } if d.HasChange("name") { - req.NewName = pointy.String(newName.(string)) + req.SetNewName(d.Get("name").(string)) } if d.HasChange("path") { - req.NewPath = pointy.String(d.Get("path").(string)) + req.SetNewPath(d.Get("path").(string)) } var err error diff --git a/outscale/resource_outscale_snapshot_export_task.go b/outscale/resource_outscale_snapshot_export_task.go index 617be5a0c..6e03407d0 100644 --- a/outscale/resource_outscale_snapshot_export_task.go +++ b/outscale/resource_outscale_snapshot_export_task.go @@ -7,7 +7,6 @@ import ( "net/http" "time" - "github.com/openlyinc/pointy" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" @@ -142,10 +141,8 @@ func resourceOAPISnapshotExportTaskCreate(d *schema.ResourceData, meta interface if len(a) > 0 { w := a[0].(map[string]interface{}) - et.OsuApiKey = &oscgo.OsuApiKey{ - ApiKeyId: pointy.String(w["api_key_id"].(string)), - SecretKey: pointy.String(w["secret_key"].(string)), - } + et.OsuApiKey.SetApiKeyId(w["api_key_id"].(string)) + et.OsuApiKey.SetSecretKey(w["secret_key"].(string)) } } request.SetOsuExport(et) diff --git a/outscale/resource_outscale_volumes_link.go b/outscale/resource_outscale_volumes_link.go index cb515ed2c..d8092afea 100644 --- a/outscale/resource_outscale_volumes_link.go +++ b/outscale/resource_outscale_volumes_link.go @@ -7,9 +7,7 @@ import ( "net/http" "time" - "github.com/openlyinc/pointy" oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -291,10 +289,7 @@ func resourceOAPIVolumeLinkDelete(d *schema.ResourceData, meta interface{}) erro iID := d.Get("vm_id").(string) opts := oscgo.UnlinkVolumeRequest{ - //VmId: iID, - //DeviceName: d.Get("device_name").(string), //Removed due oAPI Bug. - ForceUnlink: pointy.Bool(cast.ToBool(d.Get("force_unlink"))), - VolumeId: vID, + VolumeId: vID, } force, forceOk := d.GetOk("force_unlink")