Update SDK dependencies (#100)

* Update dependencies

* Fix tests

* Fix field assignment

* Update field assignment

* Remove unused functions

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
Henrique Santos 2023-10-24 14:54:04 +01:00 committed by GitHub
parent 9937717104
commit c3618f2b63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 249 additions and 224 deletions

52
go.mod
View file

@ -12,19 +12,19 @@ require (
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-testing v1.5.1
github.com/stackitcloud/stackit-sdk-go/core v0.3.0
github.com/stackitcloud/stackit-sdk-go/services/argus v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/dns v0.3.0
github.com/stackitcloud/stackit-sdk-go/services/logme v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.3.0
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/redis v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.3.0
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.2.0
github.com/stackitcloud/stackit-sdk-go/services/ske v0.3.0
github.com/stackitcloud/stackit-sdk-go/services/argus v0.5.0
github.com/stackitcloud/stackit-sdk-go/services/dns v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/logme v0.5.0
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.5.0
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.5.0
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.5.0
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.5.0
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.5.0
github.com/stackitcloud/stackit-sdk-go/services/redis v0.5.0
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.3.0
github.com/stackitcloud/stackit-sdk-go/services/ske v0.4.0
golang.org/x/mod v0.13.0
)
@ -34,7 +34,7 @@ require (
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/golang-jwt/jwt/v5 v5.0.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
@ -44,7 +44,7 @@ require (
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.5.1 // indirect
github.com/hashicorp/go-plugin v1.5.2 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.6.0 // indirect
@ -55,34 +55,34 @@ require (
github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.2 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // 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.0 // 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/stackitcloud/stackit-sdk-go/services/mongodbflex v0.4.0
github.com/oklog/run v1.1.0 // indirect
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.5.0
github.com/stretchr/testify v1.8.3 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.0 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.14.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/grpc v1.57.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
k8s.io/apimachinery v0.28.2 // indirect
k8s.io/apimachinery v0.28.3 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
)

56
go.sum
View file

@ -21,6 +21,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4=
github.com/go-git/go-git/v5 v5.8.1 h1:Zo79E4p7TRk0xoRgMq0RShiTHGKcKI4+DI6BfJc/Q+A=
@ -34,6 +36,7 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l
github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/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=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@ -59,6 +62,8 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k=
github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y=
github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
@ -92,6 +97,8 @@ github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S
github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
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/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
@ -106,9 +113,14 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
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-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
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=
@ -121,6 +133,8 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx
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/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.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@ -131,32 +145,60 @@ github.com/stackitcloud/stackit-sdk-go/core v0.3.0 h1:bo29K6XMgUFhnvLJZ0dd/hWAlt
github.com/stackitcloud/stackit-sdk-go/core v0.3.0/go.mod h1:gNsJT/70wQ0hNgbObqlKl8Y9SQVg8crnFLwqdzFF8Q0=
github.com/stackitcloud/stackit-sdk-go/services/argus v0.4.0 h1:2dyoRfnv151M9VUl5nHqWm99bdONnJnwmW73tNqNYxk=
github.com/stackitcloud/stackit-sdk-go/services/argus v0.4.0/go.mod h1:1jD+OlbQjscg5ReF3I0kCgbQVR4YzfR6V0Lz5SiXja8=
github.com/stackitcloud/stackit-sdk-go/services/argus v0.5.0 h1:BhmXA4W9P0/ttfX8S4msyOp5XwqKfx6m6uHFpqHvvG0=
github.com/stackitcloud/stackit-sdk-go/services/argus v0.5.0/go.mod h1:fXyRrqMy2UegCRYXBYpVHcGLU41Ms0LCeTzxoYde7OI=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.3.0 h1:XGVY9pV9qLSgoXHCjA7WpKG8zMvdPFjyeqqGmGqGVpw=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.3.0/go.mod h1:dKJZ/WKs3Wt2syz9fz58ULupa1SoXA2VH/J4PpICR+s=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.4.0 h1:UKHDM/hKTkv5rsOH+a/7osGQaWq20MvKwETpico8akE=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.4.0/go.mod h1:Eyn/LRYMRtc4BB8uBxV21QA/xMUdUTkTG5ub0Q6pLVM=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.4.0 h1:ZySWV2ZpSWY0qlV1qHAoM5/wttkD7pmticMqab+g430=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.4.0/go.mod h1:CG5G3FlJVksfnhcxb8nXYAFxn4lnUBWkDMGNW+6jq2w=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.5.0 h1:Y/AX0/yDcVvFZrK4uLJX26AdYsLxVxBlWt1mvgt/bG4=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.5.0/go.mod h1:Y0rtIUiDcfJLTSNbLX7wQ2N9nF1AC/WdAt45WZvZ1AM=
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.4.0 h1:0U8sJFEeYcp9sC9ybqOo0ZM4Rco56wFk+xD4+BltthM=
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.4.0/go.mod h1:3dOLY0zIH/o2iP/DnkM2bnQIW/Dm79XNDw3gBY5se9s=
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.5.0 h1:VFm22pao/FZRVQidPA3bg2mR76uIG8Mc2Um6EBN4rPk=
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.5.0/go.mod h1:PJfIEXZScKv18W37UO9+e2l0L9lY4Ga7gpLc9Lz+tQE=
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.4.0 h1:KCQeMLLoMW51w/FP7Wa7lNw9L9IFD68plXrPLWzKZEk=
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.4.0/go.mod h1:EKKEf0dl4uBye5iH49delEokDnXXqFsWCWRFyYW/7YM=
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.5.0 h1:gPNytPOW87hyVVBrguASZT7dV00yfEnJtOrml4fChCE=
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.5.0/go.mod h1:lVbM+WQ6JiMf0A3BA5CwSDvK8rjCgTadvpeQi6mohCY=
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.4.0 h1:cU0qGWg2mW4mRM5xeTaB5DSSFnzetyIx2J+ER3RmdIg=
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.4.0/go.mod h1:H0B0VBzyW90ksuG+Bu9iqOan80paw+J6Ik9AZuiz9M0=
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.5.0 h1:EuQpY6ewVCyKjRikr9zT1OzEqbSmxXaD0fpFFykHfKU=
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.5.0/go.mod h1:ZRei8jDSmaime4kiGZZSiO2zIFHlmWl2lC5b1XP/X9g=
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.4.0 h1:6Q+ArGyOQDir05pJLc0TbJBGrYyNZ2tKzNY8AGVA0SA=
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.4.0/go.mod h1:syCy6+8GsJu9lHyhN0Qeg66AgTv5LjlgtppbOVFIaPc=
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.5.0 h1:RuGCF+8dcLwaI7OuK1/jKDOplJxcXYhEEXOHLdf4Bd4=
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.5.0/go.mod h1:T0cUEpwLnvZ/yTeoXCjc7pfi6O3WWl3BnRPsxyhgg0o=
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.3.0 h1:ycLwGv3ILcnE3M9TYOXNtPWyxXqvpRHFeNhX8kJbB8g=
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.3.0/go.mod h1:9VdEzSqdXwUFnVVONag1mX73X3lbrQi5b0OlA7bbkLs=
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.4.0 h1:o2WncmpUDzhAIHkv2ubD/HBjbbNdNFnYPZpcfYSXwPU=
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.4.0/go.mod h1:HFq21TZSuvM8jCvgIG6wqgGAuEMMU4T/wiQXf+nBGHI=
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.4.0 h1:yAhgEbnokGH+3wUDFD06yz9qq1Lk/06dd5E3ZOG+zhg=
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.4.0/go.mod h1:GDFywqshSR/XeTFxdUaeV2HlYqVyVD9dRWr3phw94ak=
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.5.0 h1:9hkjos1SoPjaCAe5TESMqwlUR4uv53HcyYF7EoFmVyA=
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.5.0/go.mod h1:XIfKeBZWO2WL1N83H7Iq4JgpcskvCeC5hESqfvlhkxc=
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.4.0 h1:KqOMc6lPCproZEIIx2IwhVcvFdTSxHfRnVGUWC4zxTM=
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.4.0/go.mod h1:9vkwymnk8LDeIUKgtNrE6K+w3Rh/x6USvA0Tw6l+r/k=
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.5.0 h1:iiEAkxut9dBVbALPg2QRYPbFV91gvHVJadAkZAqKwQI=
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.5.0/go.mod h1:xdOjx4GhqhvB1W2+N+D/TeURoLu49107s5zPuG0OnE8=
github.com/stackitcloud/stackit-sdk-go/services/redis v0.4.0 h1:K+C+VBCNRH90aVklWUTn8sinrP6eOX9ZddolH2rerrs=
github.com/stackitcloud/stackit-sdk-go/services/redis v0.4.0/go.mod h1:OzuVC+kPkhAoGxdUkIRD+CbFGWG0Ye6kfZOv7octFN4=
github.com/stackitcloud/stackit-sdk-go/services/redis v0.5.0 h1:itVDMWbQy1+AQAsAuz5ZFR5CzDGQA/j5qrYj+N1OoYs=
github.com/stackitcloud/stackit-sdk-go/services/redis v0.5.0/go.mod h1:HhOZ5w8BTYSWMRB2cz3MBpA99sx56TAcpUvo+fNp1RI=
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.3.0 h1:VcMBLwARKFiEnc28ZCiRx9v6RAhIzofxAUah03Vxg/g=
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.3.0/go.mod h1:P9ZpI/G/LG0+enyEdr7zpsaikD5J085Np6IWK6dzBEk=
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.4.0 h1:Oty6YYtDRJ8twLPWK7R1jLXAzDmieua8tDQ7eykfRqA=
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.4.0/go.mod h1:NafGFXQCb2qpr/OaC/4923YOBoubdFWT8yC2JJH50v0=
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.2.0 h1:i8yCH0bkdQKDTyAi5Qy9/PSLruoQ/Dbh22zBjhOWmzs=
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.2.0/go.mod h1:NyKeNilgXEpo1akNUODAz5IpBRDSc3suHyDDwYLf9JY=
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.3.0 h1:qjYzBltZ4G7A79r1xbWOvBRkOg61SbuOGrL+dB3akYs=
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.3.0/go.mod h1:2n97tLGzFJo8N762/oloN31Al1RuDebthYuG8RdHidk=
github.com/stackitcloud/stackit-sdk-go/services/ske v0.3.0 h1:umS4cjV2jhtBUEYr/7QWpe95tDgANng1Wma4rF9k/Hk=
github.com/stackitcloud/stackit-sdk-go/services/ske v0.3.0/go.mod h1:pVb/CaolkqaicGbHpXWUOXk5+s731TpXbx6RMyYjV1Q=
github.com/stackitcloud/stackit-sdk-go/services/ske v0.4.0 h1:l0PIsYKwbnRHqtxERQrSyDy5jE3yWmAe2SdYIGaPuLU=
github.com/stackitcloud/stackit-sdk-go/services/ske v0.4.0/go.mod h1:0VJq6NZiW2uYOaILYRmQ34//Te2hDFQ08MqMWw7/+CI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
@ -167,6 +209,8 @@ github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaU
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU=
github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
github.com/vmihailenco/msgpack/v5 v5.4.0 h1:hRM0digJwyR6vll33NNAwCFguy5JuBD6jxDmQP3l608=
github.com/vmihailenco/msgpack/v5 v5.4.0/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
@ -197,6 +241,8 @@ 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.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4=
golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4=
golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY=
golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0=
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=
@ -211,6 +257,7 @@ 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.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@ -227,6 +274,7 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
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.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
@ -242,10 +290,16 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
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-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc=
google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw=
google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
@ -260,6 +314,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ=
k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU=
k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A=
k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8=
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=

View file

@ -9,22 +9,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)
func ToPtrInt32(source types.Int64) *int32 {
if source.IsNull() || source.IsUnknown() {
return nil
}
ttlInt64 := source.ValueInt64()
ttlInt32 := int32(ttlInt64)
return &ttlInt32
}
func ToTypeInt64(i *int32) types.Int64 {
if i == nil {
return types.Int64PointerValue(nil)
}
return types.Int64Value(int64(*i))
}
func ToString(ctx context.Context, v attr.Value) (string, error) {
if t := v.Type(ctx); t != types.StringType {
return "", fmt.Errorf("type mismatch. expected 'types.StringType' but got '%s'", t.String())

View file

@ -22,7 +22,6 @@ import (
"github.com/stackitcloud/stackit-sdk-go/core/config"
"github.com/stackitcloud/stackit-sdk-go/services/dns"
"github.com/stackitcloud/stackit-sdk-go/services/dns/wait"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
)
@ -452,7 +451,7 @@ func mapFields(recordSetResp *dns.RecordSetResponse, model *Model) error {
model.Error = types.StringPointerValue(recordSet.Error)
model.Name = types.StringPointerValue(recordSet.Name)
model.State = types.StringPointerValue(recordSet.State)
model.TTL = conversion.ToTypeInt64(recordSet.Ttl)
model.TTL = types.Int64PointerValue(recordSet.Ttl)
model.Type = types.StringPointerValue(recordSet.Type)
return nil
}
@ -477,7 +476,7 @@ func toCreatePayload(model *Model) (*dns.CreateRecordSetPayload, error) {
Comment: model.Comment.ValueStringPointer(),
Name: model.Name.ValueStringPointer(),
Records: &records,
Ttl: conversion.ToPtrInt32(model.TTL),
Ttl: model.TTL.ValueInt64Pointer(),
Type: model.Type.ValueStringPointer(),
}, nil
}
@ -502,6 +501,6 @@ func toUpdatePayload(model *Model) (*dns.UpdateRecordSetPayload, error) {
Comment: model.Comment.ValueStringPointer(),
Name: model.Name.ValueStringPointer(),
Records: &records,
Ttl: conversion.ToPtrInt32(model.TTL),
Ttl: model.TTL.ValueInt64Pointer(),
}, nil
}

View file

@ -54,7 +54,7 @@ func TestMapFields(t *testing.T) {
{Content: utils.Ptr("record_2")},
},
State: utils.Ptr("state"),
Ttl: utils.Ptr(int32(1)),
Ttl: utils.Ptr(int64(1)),
Type: utils.Ptr("type"),
},
},
@ -88,7 +88,7 @@ func TestMapFields(t *testing.T) {
Name: utils.Ptr("name"),
Records: nil,
State: utils.Ptr("state"),
Ttl: utils.Ptr(int32(2123456789)),
Ttl: utils.Ptr(int64(2123456789)),
Type: utils.Ptr("type"),
},
},
@ -178,7 +178,7 @@ func TestToCreatePayload(t *testing.T) {
{Content: utils.Ptr("record_1")},
{Content: utils.Ptr("record_2")},
},
Ttl: utils.Ptr(int32(1)),
Ttl: utils.Ptr(int64(1)),
Type: utils.Ptr("type"),
},
true,
@ -196,7 +196,7 @@ func TestToCreatePayload(t *testing.T) {
Comment: nil,
Name: utils.Ptr(""),
Records: &[]dns.RecordPayload{},
Ttl: utils.Ptr(int32(2123456789)),
Ttl: utils.Ptr(int64(2123456789)),
Type: utils.Ptr(""),
},
true,
@ -260,7 +260,7 @@ func TestToUpdatePayload(t *testing.T) {
{Content: utils.Ptr("record_1")},
{Content: utils.Ptr("record_2")},
},
Ttl: utils.Ptr(int32(1)),
Ttl: utils.Ptr(int64(1)),
},
true,
},
@ -276,7 +276,7 @@ func TestToUpdatePayload(t *testing.T) {
Comment: nil,
Name: utils.Ptr(""),
Records: &[]dns.RecordPayload{},
Ttl: utils.Ptr(int32(2123456789)),
Ttl: utils.Ptr(int64(2123456789)),
},
true,
},

View file

@ -25,7 +25,6 @@ import (
"github.com/stackitcloud/stackit-sdk-go/core/config"
"github.com/stackitcloud/stackit-sdk-go/services/dns"
"github.com/stackitcloud/stackit-sdk-go/services/dns/wait"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
)
@ -543,17 +542,17 @@ func mapFields(zoneResp *dns.ZoneResponse, model *Model) error {
model.Acl = types.StringPointerValue(z.Acl)
model.Active = types.BoolPointerValue(z.Active)
model.ContactEmail = types.StringPointerValue(z.ContactEmail)
model.DefaultTTL = conversion.ToTypeInt64(z.DefaultTTL)
model.DefaultTTL = types.Int64PointerValue(z.DefaultTTL)
model.DnsName = types.StringPointerValue(z.DnsName)
model.ExpireTime = conversion.ToTypeInt64(z.ExpireTime)
model.ExpireTime = types.Int64PointerValue(z.ExpireTime)
model.IsReverseZone = types.BoolPointerValue(z.IsReverseZone)
model.Name = types.StringPointerValue(z.Name)
model.NegativeCache = conversion.ToTypeInt64(z.NegativeCache)
model.NegativeCache = types.Int64PointerValue(z.NegativeCache)
model.PrimaryNameServer = types.StringPointerValue(z.PrimaryNameServer)
model.RecordCount = types.Int64PointerValue(rc)
model.RefreshTime = conversion.ToTypeInt64(z.RefreshTime)
model.RetryTime = conversion.ToTypeInt64(z.RetryTime)
model.SerialNumber = conversion.ToTypeInt64(z.SerialNumber)
model.RefreshTime = types.Int64PointerValue(z.RefreshTime)
model.RetryTime = types.Int64PointerValue(z.RetryTime)
model.SerialNumber = types.Int64PointerValue(z.SerialNumber)
model.State = types.StringPointerValue(z.State)
model.Type = types.StringPointerValue(z.Type)
model.Visibility = types.StringPointerValue(z.Visibility)
@ -580,11 +579,11 @@ func toCreatePayload(model *Model) (*dns.CreateZonePayload, error) {
Description: model.Description.ValueStringPointer(),
Acl: model.Acl.ValueStringPointer(),
Type: model.Type.ValueStringPointer(),
DefaultTTL: conversion.ToPtrInt32(model.DefaultTTL),
ExpireTime: conversion.ToPtrInt32(model.ExpireTime),
RefreshTime: conversion.ToPtrInt32(model.RefreshTime),
RetryTime: conversion.ToPtrInt32(model.RetryTime),
NegativeCache: conversion.ToPtrInt32(model.NegativeCache),
DefaultTTL: model.DefaultTTL.ValueInt64Pointer(),
ExpireTime: model.ExpireTime.ValueInt64Pointer(),
RefreshTime: model.RefreshTime.ValueInt64Pointer(),
RetryTime: model.RetryTime.ValueInt64Pointer(),
NegativeCache: model.NegativeCache.ValueInt64Pointer(),
IsReverseZone: model.IsReverseZone.ValueBoolPointer(),
Primaries: &modelPrimaries,
}, nil
@ -600,11 +599,11 @@ func toUpdatePayload(model *Model) (*dns.UpdateZonePayload, error) {
ContactEmail: model.ContactEmail.ValueStringPointer(),
Description: model.Description.ValueStringPointer(),
Acl: model.Acl.ValueStringPointer(),
DefaultTTL: conversion.ToPtrInt32(model.DefaultTTL),
ExpireTime: conversion.ToPtrInt32(model.ExpireTime),
RefreshTime: conversion.ToPtrInt32(model.RefreshTime),
RetryTime: conversion.ToPtrInt32(model.RetryTime),
NegativeCache: conversion.ToPtrInt32(model.NegativeCache),
DefaultTTL: model.DefaultTTL.ValueInt64Pointer(),
ExpireTime: model.ExpireTime.ValueInt64Pointer(),
RefreshTime: model.RefreshTime.ValueInt64Pointer(),
RetryTime: model.RetryTime.ValueInt64Pointer(),
NegativeCache: model.NegativeCache.ValueInt64Pointer(),
Primaries: nil, // API returns error if this field is set, even if nothing changes
}, nil
}

View file

@ -56,12 +56,12 @@ func TestMapFields(t *testing.T) {
Active: utils.Ptr(false),
CreationStarted: utils.Ptr("bar"),
CreationFinished: utils.Ptr("foo"),
DefaultTTL: utils.Ptr(int32(1)),
ExpireTime: utils.Ptr(int32(2)),
RefreshTime: utils.Ptr(int32(3)),
RetryTime: utils.Ptr(int32(4)),
SerialNumber: utils.Ptr(int32(5)),
NegativeCache: utils.Ptr(int32(6)),
DefaultTTL: utils.Ptr(int64(1)),
ExpireTime: utils.Ptr(int64(2)),
RefreshTime: utils.Ptr(int64(3)),
RetryTime: utils.Ptr(int64(4)),
SerialNumber: utils.Ptr(int64(5)),
NegativeCache: utils.Ptr(int64(6)),
State: utils.Ptr("state"),
Type: utils.Ptr("type"),
Primaries: &[]string{"primary"},
@ -73,7 +73,7 @@ func TestMapFields(t *testing.T) {
ContactEmail: utils.Ptr("a@b.cd"),
Description: utils.Ptr("description"),
IsReverseZone: utils.Ptr(false),
RecordCount: utils.Ptr(int32(3)),
RecordCount: utils.Ptr(int64(3)),
},
},
Model{
@ -115,12 +115,12 @@ func TestMapFields(t *testing.T) {
Active: nil,
CreationStarted: utils.Ptr("bar"),
CreationFinished: utils.Ptr("foo"),
DefaultTTL: utils.Ptr(int32(2123456789)),
ExpireTime: utils.Ptr(int32(-2)),
RefreshTime: utils.Ptr(int32(3)),
RetryTime: utils.Ptr(int32(4)),
SerialNumber: utils.Ptr(int32(5)),
NegativeCache: utils.Ptr(int32(0)),
DefaultTTL: utils.Ptr(int64(2123456789)),
ExpireTime: utils.Ptr(int64(-2)),
RefreshTime: utils.Ptr(int64(3)),
RetryTime: utils.Ptr(int64(4)),
SerialNumber: utils.Ptr(int64(5)),
NegativeCache: utils.Ptr(int64(0)),
State: utils.Ptr("state"),
Type: utils.Ptr("type"),
Primaries: nil,
@ -131,7 +131,7 @@ func TestMapFields(t *testing.T) {
ContactEmail: nil,
Description: nil,
IsReverseZone: nil,
RecordCount: utils.Ptr(int32(-2123456789)),
RecordCount: utils.Ptr(int64(-2123456789)),
},
},
Model{
@ -242,11 +242,11 @@ func TestToCreatePayload(t *testing.T) {
Type: utils.Ptr("Type"),
ContactEmail: utils.Ptr("ContactEmail"),
Primaries: &[]string{"primary"},
RetryTime: utils.Ptr(int32(3)),
RefreshTime: utils.Ptr(int32(4)),
ExpireTime: utils.Ptr(int32(5)),
DefaultTTL: utils.Ptr(int32(4534534)),
NegativeCache: utils.Ptr(int32(-4534534)),
RetryTime: utils.Ptr(int64(3)),
RefreshTime: utils.Ptr(int64(4)),
ExpireTime: utils.Ptr(int64(5)),
DefaultTTL: utils.Ptr(int64(4534534)),
NegativeCache: utils.Ptr(int64(-4534534)),
IsReverseZone: utils.Ptr(true),
},
true,
@ -320,11 +320,11 @@ func TestToPayloadUpdate(t *testing.T) {
Acl: utils.Ptr("Acl"),
Description: utils.Ptr("Description"),
ContactEmail: utils.Ptr("ContactEmail"),
RetryTime: utils.Ptr(int32(3)),
RefreshTime: utils.Ptr(int32(4)),
ExpireTime: utils.Ptr(int32(5)),
DefaultTTL: utils.Ptr(int32(4534534)),
NegativeCache: utils.Ptr(int32(-4534534)),
RetryTime: utils.Ptr(int64(3)),
RefreshTime: utils.Ptr(int64(4)),
ExpireTime: utils.Ptr(int64(5)),
DefaultTTL: utils.Ptr(int64(4534534)),
NegativeCache: utils.Ptr(int64(-4534534)),
},
true,
},

View file

@ -8,7 +8,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -370,7 +369,7 @@ func mapFields(credentialsResp *logme.CredentialsResponse, model *Model) error {
model.HttpAPIURI = types.StringPointerValue(credentials.HttpApiUri)
model.Name = types.StringPointerValue(credentials.Name)
model.Password = types.StringPointerValue(credentials.Password)
model.Port = conversion.ToTypeInt64(credentials.Port)
model.Port = types.Int64PointerValue(credentials.Port)
model.Uri = types.StringPointerValue(credentials.Uri)
model.Username = types.StringPointerValue(credentials.Username)
}

View file

@ -53,7 +53,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: utils.Ptr("http"),
Name: utils.Ptr("name"),
Password: utils.Ptr("password"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
Uri: utils.Ptr("uri"),
Username: utils.Ptr("username"),
},
@ -89,7 +89,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: nil,
Name: nil,
Password: utils.Ptr(""),
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
Uri: nil,
Username: utils.Ptr(""),
},

View file

@ -8,7 +8,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -370,7 +369,7 @@ func mapFields(credentialsResp *mariadb.CredentialsResponse, model *Model) error
model.HttpAPIURI = types.StringPointerValue(credentials.HttpApiUri)
model.Name = types.StringPointerValue(credentials.Name)
model.Password = types.StringPointerValue(credentials.Password)
model.Port = conversion.ToTypeInt64(credentials.Port)
model.Port = types.Int64PointerValue(credentials.Port)
model.Uri = types.StringPointerValue(credentials.Uri)
model.Username = types.StringPointerValue(credentials.Username)
}

View file

@ -53,7 +53,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: utils.Ptr("http"),
Name: utils.Ptr("name"),
Password: utils.Ptr("password"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
Uri: utils.Ptr("uri"),
Username: utils.Ptr("username"),
},
@ -89,7 +89,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: nil,
Name: nil,
Password: utils.Ptr(""),
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
Uri: nil,
Username: utils.Ptr(""),
},

View file

@ -14,7 +14,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -591,8 +590,8 @@ func mapFields(resp *mongodbflex.GetInstanceResponse, model *Model, flavor *flav
flavorValues = map[string]attr.Value{
"id": types.StringValue(*instance.Flavor.Id),
"description": types.StringValue(*instance.Flavor.Description),
"cpu": conversion.ToTypeInt64(instance.Flavor.Cpu),
"ram": conversion.ToTypeInt64(instance.Flavor.Memory),
"cpu": types.Int64PointerValue(instance.Flavor.Cpu),
"ram": types.Int64PointerValue(instance.Flavor.Memory),
}
}
flavorObject, diags := types.ObjectValue(flavorTypes, flavorValues)
@ -609,7 +608,7 @@ func mapFields(resp *mongodbflex.GetInstanceResponse, model *Model, flavor *flav
} else {
storageValues = map[string]attr.Value{
"class": types.StringValue(*instance.Storage.Class),
"size": conversion.ToTypeInt64(instance.Storage.Size),
"size": types.Int64PointerValue(instance.Storage.Size),
}
}
storageObject, diags := types.ObjectValue(storageTypes, storageValues)
@ -650,7 +649,7 @@ func mapFields(resp *mongodbflex.GetInstanceResponse, model *Model, flavor *flav
model.Name = types.StringPointerValue(instance.Name)
model.ACL = aclList
model.Flavor = flavorObject
model.Replicas = conversion.ToTypeInt64(instance.Replicas)
model.Replicas = types.Int64PointerValue(instance.Replicas)
model.Storage = storageObject
model.Version = types.StringPointerValue(instance.Version)
model.Options = optionsObject
@ -686,10 +685,10 @@ func toCreatePayload(model *Model, acl []string, flavor *flavorModel, storage *s
BackupSchedule: model.BackupSchedule.ValueStringPointer(),
FlavorId: flavor.Id.ValueStringPointer(),
Name: model.Name.ValueStringPointer(),
Replicas: conversion.ToPtrInt32(model.Replicas),
Replicas: model.Replicas.ValueInt64Pointer(),
Storage: &mongodbflex.InstanceStorage{
Class: storage.Class.ValueStringPointer(),
Size: conversion.ToPtrInt32(storage.Size),
Size: storage.Size.ValueInt64Pointer(),
},
Version: model.Version.ValueStringPointer(),
Options: &payloadOptions,
@ -725,10 +724,10 @@ func toUpdatePayload(model *Model, acl []string, flavor *flavorModel, storage *s
BackupSchedule: model.BackupSchedule.ValueStringPointer(),
FlavorId: flavor.Id.ValueStringPointer(),
Name: model.Name.ValueStringPointer(),
Replicas: conversion.ToPtrInt32(model.Replicas),
Replicas: model.Replicas.ValueInt64Pointer(),
Storage: &mongodbflex.InstanceStorage{
Class: storage.Class.ValueStringPointer(),
Size: conversion.ToPtrInt32(storage.Size),
Size: storage.Size.ValueInt64Pointer(),
},
Version: model.Version.ValueStringPointer(),
Options: &payloadOptions,
@ -746,11 +745,11 @@ func loadFlavorId(ctx context.Context, client mongoDBFlexClient, model *Model, f
if flavor == nil {
return fmt.Errorf("nil flavor")
}
cpu := conversion.ToPtrInt32(flavor.CPU)
cpu := flavor.CPU.ValueInt64Pointer()
if cpu == nil {
return fmt.Errorf("nil CPU")
}
ram := conversion.ToPtrInt32(flavor.RAM)
ram := flavor.RAM.ValueInt64Pointer()
if ram == nil {
return fmt.Errorf("nil RAM")
}

View file

@ -81,18 +81,18 @@ func TestMapFields(t *testing.T) {
},
BackupSchedule: utils.Ptr("schedule"),
Flavor: &mongodbflex.InstanceFlavor{
Cpu: utils.Ptr(int32(12)),
Cpu: utils.Ptr(int64(12)),
Description: utils.Ptr("description"),
Id: utils.Ptr("flavor_id"),
Memory: utils.Ptr(int32(34)),
Memory: utils.Ptr(int64(34)),
},
Id: utils.Ptr("iid"),
Name: utils.Ptr("name"),
Replicas: utils.Ptr(int32(56)),
Replicas: utils.Ptr(int64(56)),
Status: utils.Ptr("status"),
Storage: &mongodbflex.InstanceStorage{
Class: utils.Ptr("class"),
Size: utils.Ptr(int32(78)),
Size: utils.Ptr(int64(78)),
},
Options: &map[string]string{
"type": "type",
@ -147,7 +147,7 @@ func TestMapFields(t *testing.T) {
Flavor: nil,
Id: utils.Ptr("iid"),
Name: utils.Ptr("name"),
Replicas: utils.Ptr(int32(56)),
Replicas: utils.Ptr(int64(56)),
Status: utils.Ptr("status"),
Storage: nil,
Options: &map[string]string{
@ -297,10 +297,10 @@ func TestToCreatePayload(t *testing.T) {
BackupSchedule: utils.Ptr("schedule"),
FlavorId: utils.Ptr("flavor_id"),
Name: utils.Ptr("name"),
Replicas: utils.Ptr(int32(12)),
Replicas: utils.Ptr(int64(12)),
Storage: &mongodbflex.InstanceStorage{
Class: utils.Ptr("class"),
Size: utils.Ptr(int32(34)),
Size: utils.Ptr(int64(34)),
},
Options: &map[string]string{"type": "type"},
Version: utils.Ptr("version"),
@ -337,7 +337,7 @@ func TestToCreatePayload(t *testing.T) {
BackupSchedule: nil,
FlavorId: nil,
Name: nil,
Replicas: utils.Ptr(int32(2123456789)),
Replicas: utils.Ptr(int64(2123456789)),
Storage: &mongodbflex.InstanceStorage{
Class: nil,
Size: nil,
@ -476,10 +476,10 @@ func TestToUpdatePayload(t *testing.T) {
BackupSchedule: utils.Ptr("schedule"),
FlavorId: utils.Ptr("flavor_id"),
Name: utils.Ptr("name"),
Replicas: utils.Ptr(int32(12)),
Replicas: utils.Ptr(int64(12)),
Storage: &mongodbflex.InstanceStorage{
Class: utils.Ptr("class"),
Size: utils.Ptr(int32(34)),
Size: utils.Ptr(int64(34)),
},
Options: &map[string]string{"type": "type"},
Version: utils.Ptr("version"),
@ -516,7 +516,7 @@ func TestToUpdatePayload(t *testing.T) {
BackupSchedule: nil,
FlavorId: nil,
Name: nil,
Replicas: utils.Ptr(int32(2123456789)),
Replicas: utils.Ptr(int64(2123456789)),
Storage: &mongodbflex.InstanceStorage{
Class: nil,
Size: nil,
@ -615,9 +615,9 @@ func TestLoadFlavorId(t *testing.T) {
Flavors: &[]mongodbflex.HandlersInfraFlavor{
{
Id: utils.Ptr("fid-1"),
Cpu: utils.Ptr(int32(2)),
Cpu: utils.Ptr(int64(2)),
Description: utils.Ptr("description"),
Memory: utils.Ptr(int32(8)),
Memory: utils.Ptr(int64(8)),
},
},
},
@ -640,15 +640,15 @@ func TestLoadFlavorId(t *testing.T) {
Flavors: &[]mongodbflex.HandlersInfraFlavor{
{
Id: utils.Ptr("fid-1"),
Cpu: utils.Ptr(int32(2)),
Cpu: utils.Ptr(int64(2)),
Description: utils.Ptr("description"),
Memory: utils.Ptr(int32(8)),
Memory: utils.Ptr(int64(8)),
},
{
Id: utils.Ptr("fid-2"),
Cpu: utils.Ptr(int32(1)),
Cpu: utils.Ptr(int64(1)),
Description: utils.Ptr("description"),
Memory: utils.Ptr(int32(4)),
Memory: utils.Ptr(int64(4)),
},
},
},
@ -671,15 +671,15 @@ func TestLoadFlavorId(t *testing.T) {
Flavors: &[]mongodbflex.HandlersInfraFlavor{
{
Id: utils.Ptr("fid-1"),
Cpu: utils.Ptr(int32(1)),
Cpu: utils.Ptr(int64(1)),
Description: utils.Ptr("description"),
Memory: utils.Ptr(int32(8)),
Memory: utils.Ptr(int64(8)),
},
{
Id: utils.Ptr("fid-2"),
Cpu: utils.Ptr(int32(1)),
Cpu: utils.Ptr(int64(1)),
Description: utils.Ptr("description"),
Memory: utils.Ptr(int32(4)),
Memory: utils.Ptr(int64(4)),
},
},
},

View file

@ -9,7 +9,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -227,6 +226,6 @@ func mapDataSourceFields(userResp *mongodbflex.GetUserResponse, model *DataSourc
model.Roles = rolesSet
}
model.Host = types.StringPointerValue(user.Host)
model.Port = conversion.ToTypeInt64(user.Port)
model.Port = types.Int64PointerValue(user.Port)
return nil
}

View file

@ -47,7 +47,7 @@ func TestMapDataSourceFields(t *testing.T) {
Username: utils.Ptr("username"),
Database: utils.Ptr("database"),
Host: utils.Ptr("host"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
},
},
DataSourceModel{
@ -76,7 +76,7 @@ func TestMapDataSourceFields(t *testing.T) {
Username: nil,
Database: nil,
Host: nil,
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
},
},
DataSourceModel{

View file

@ -9,7 +9,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -378,7 +377,7 @@ func mapFieldsCreate(userResp *mongodbflex.CreateUserResponse, model *Model) err
model.Roles = rolesSet
}
model.Host = types.StringPointerValue(user.Host)
model.Port = conversion.ToTypeInt64(user.Port)
model.Port = types.Int64PointerValue(user.Port)
return nil
}
@ -425,7 +424,7 @@ func mapFields(userResp *mongodbflex.GetUserResponse, model *Model) error {
model.Roles = rolesSet
}
model.Host = types.StringPointerValue(user.Host)
model.Port = conversion.ToTypeInt64(user.Port)
model.Port = types.Int64PointerValue(user.Port)
return nil
}

View file

@ -53,7 +53,7 @@ func TestMapFieldsCreate(t *testing.T) {
Database: utils.Ptr("database"),
Password: utils.Ptr("password"),
Host: utils.Ptr("host"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
},
},
Model{
@ -84,7 +84,7 @@ func TestMapFieldsCreate(t *testing.T) {
Database: nil,
Password: utils.Ptr(""),
Host: nil,
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
},
},
Model{
@ -192,7 +192,7 @@ func TestMapFields(t *testing.T) {
Username: utils.Ptr("username"),
Database: utils.Ptr("database"),
Host: utils.Ptr("host"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
},
},
Model{
@ -221,7 +221,7 @@ func TestMapFields(t *testing.T) {
Username: nil,
Database: nil,
Host: nil,
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
},
},
Model{

View file

@ -8,7 +8,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -370,7 +369,7 @@ func mapFields(credentialsResp *opensearch.CredentialsResponse, model *Model) er
model.HttpAPIURI = types.StringPointerValue(credentials.HttpApiUri)
model.Name = types.StringPointerValue(credentials.Name)
model.Password = types.StringPointerValue(credentials.Password)
model.Port = conversion.ToTypeInt64(credentials.Port)
model.Port = types.Int64PointerValue(credentials.Port)
model.Uri = types.StringPointerValue(credentials.Uri)
model.Username = types.StringPointerValue(credentials.Username)
}

View file

@ -53,7 +53,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: utils.Ptr("http"),
Name: utils.Ptr("name"),
Password: utils.Ptr("password"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
Uri: utils.Ptr("uri"),
Username: utils.Ptr("username"),
},
@ -89,7 +89,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: nil,
Name: nil,
Password: utils.Ptr(""),
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
Uri: nil,
Username: utils.Ptr(""),
},

View file

@ -13,7 +13,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -542,8 +541,8 @@ func mapFields(resp *postgresflex.InstanceResponse, model *Model, flavor *flavor
flavorValues = map[string]attr.Value{
"id": types.StringValue(*instance.Flavor.Id),
"description": types.StringValue(*instance.Flavor.Description),
"cpu": conversion.ToTypeInt64(instance.Flavor.Cpu),
"ram": conversion.ToTypeInt64(instance.Flavor.Memory),
"cpu": types.Int64PointerValue(instance.Flavor.Cpu),
"ram": types.Int64PointerValue(instance.Flavor.Memory),
}
}
flavorObject, diags := types.ObjectValue(flavorTypes, flavorValues)
@ -560,7 +559,7 @@ func mapFields(resp *postgresflex.InstanceResponse, model *Model, flavor *flavor
} else {
storageValues = map[string]attr.Value{
"class": types.StringValue(*instance.Storage.Class),
"size": conversion.ToTypeInt64(instance.Storage.Size),
"size": types.Int64PointerValue(instance.Storage.Size),
}
}
storageObject, diags := types.ObjectValue(storageTypes, storageValues)
@ -580,7 +579,7 @@ func mapFields(resp *postgresflex.InstanceResponse, model *Model, flavor *flavor
model.ACL = aclList
model.BackupSchedule = types.StringPointerValue(instance.BackupSchedule)
model.Flavor = flavorObject
model.Replicas = conversion.ToTypeInt64(instance.Replicas)
model.Replicas = types.Int64PointerValue(instance.Replicas)
model.Storage = storageObject
model.Version = types.StringPointerValue(instance.Version)
return nil
@ -607,10 +606,10 @@ func toCreatePayload(model *Model, acl []string, flavor *flavorModel, storage *s
BackupSchedule: model.BackupSchedule.ValueStringPointer(),
FlavorId: flavor.Id.ValueStringPointer(),
Name: model.Name.ValueStringPointer(),
Replicas: conversion.ToPtrInt32(model.Replicas),
Replicas: model.Replicas.ValueInt64Pointer(),
Storage: &postgresflex.InstanceStorage{
Class: storage.Class.ValueStringPointer(),
Size: conversion.ToPtrInt32(storage.Size),
Size: storage.Size.ValueInt64Pointer(),
},
Version: model.Version.ValueStringPointer(),
}, nil
@ -637,10 +636,10 @@ func toUpdatePayload(model *Model, acl []string, flavor *flavorModel, storage *s
BackupSchedule: model.BackupSchedule.ValueStringPointer(),
FlavorId: flavor.Id.ValueStringPointer(),
Name: model.Name.ValueStringPointer(),
Replicas: conversion.ToPtrInt32(model.Replicas),
Replicas: model.Replicas.ValueInt64Pointer(),
Storage: &postgresflex.InstanceStorage{
Class: storage.Class.ValueStringPointer(),
Size: conversion.ToPtrInt32(storage.Size),
Size: storage.Size.ValueInt64Pointer(),
},
Version: model.Version.ValueStringPointer(),
}, nil
@ -657,11 +656,11 @@ func loadFlavorId(ctx context.Context, client postgresFlexClient, model *Model,
if flavor == nil {
return fmt.Errorf("nil flavor")
}
cpu := conversion.ToPtrInt32(flavor.CPU)
cpu := flavor.CPU.ValueInt64Pointer()
if cpu == nil {
return fmt.Errorf("nil CPU")
}
ram := conversion.ToPtrInt32(flavor.RAM)
ram := flavor.RAM.ValueInt64Pointer()
if ram == nil {
return fmt.Errorf("nil RAM")
}

View file

@ -76,18 +76,18 @@ func TestMapFields(t *testing.T) {
},
BackupSchedule: utils.Ptr("schedule"),
Flavor: &postgresflex.InstanceFlavor{
Cpu: utils.Ptr(int32(12)),
Cpu: utils.Ptr(int64(12)),
Description: utils.Ptr("description"),
Id: utils.Ptr("flavor_id"),
Memory: utils.Ptr(int32(34)),
Memory: utils.Ptr(int64(34)),
},
Id: utils.Ptr("iid"),
Name: utils.Ptr("name"),
Replicas: utils.Ptr(int32(56)),
Replicas: utils.Ptr(int64(56)),
Status: utils.Ptr("status"),
Storage: &postgresflex.InstanceStorage{
Class: utils.Ptr("class"),
Size: utils.Ptr(int32(78)),
Size: utils.Ptr(int64(78)),
},
Version: utils.Ptr("version"),
},
@ -135,7 +135,7 @@ func TestMapFields(t *testing.T) {
Flavor: nil,
Id: utils.Ptr("iid"),
Name: utils.Ptr("name"),
Replicas: utils.Ptr(int32(56)),
Replicas: utils.Ptr(int64(56)),
Status: utils.Ptr("status"),
Storage: nil,
Version: utils.Ptr("version"),
@ -268,10 +268,10 @@ func TestToCreatePayload(t *testing.T) {
BackupSchedule: utils.Ptr("schedule"),
FlavorId: utils.Ptr("flavor_id"),
Name: utils.Ptr("name"),
Replicas: utils.Ptr(int32(12)),
Replicas: utils.Ptr(int64(12)),
Storage: &postgresflex.InstanceStorage{
Class: utils.Ptr("class"),
Size: utils.Ptr(int32(34)),
Size: utils.Ptr(int64(34)),
},
Version: utils.Ptr("version"),
},
@ -304,7 +304,7 @@ func TestToCreatePayload(t *testing.T) {
BackupSchedule: nil,
FlavorId: nil,
Name: nil,
Replicas: utils.Ptr(int32(2123456789)),
Replicas: utils.Ptr(int64(2123456789)),
Storage: &postgresflex.InstanceStorage{
Class: nil,
Size: nil,
@ -422,10 +422,10 @@ func TestToUpdatePayload(t *testing.T) {
BackupSchedule: utils.Ptr("schedule"),
FlavorId: utils.Ptr("flavor_id"),
Name: utils.Ptr("name"),
Replicas: utils.Ptr(int32(12)),
Replicas: utils.Ptr(int64(12)),
Storage: &postgresflex.InstanceStorage{
Class: utils.Ptr("class"),
Size: utils.Ptr(int32(34)),
Size: utils.Ptr(int64(34)),
},
Version: utils.Ptr("version"),
},
@ -458,7 +458,7 @@ func TestToUpdatePayload(t *testing.T) {
BackupSchedule: nil,
FlavorId: nil,
Name: nil,
Replicas: utils.Ptr(int32(2123456789)),
Replicas: utils.Ptr(int64(2123456789)),
Storage: &postgresflex.InstanceStorage{
Class: nil,
Size: nil,
@ -542,9 +542,9 @@ func TestLoadFlavorId(t *testing.T) {
Flavors: &[]postgresflex.InstanceFlavor{
{
Id: utils.Ptr("fid-1"),
Cpu: utils.Ptr(int32(2)),
Cpu: utils.Ptr(int64(2)),
Description: utils.Ptr("description"),
Memory: utils.Ptr(int32(8)),
Memory: utils.Ptr(int64(8)),
},
},
},
@ -567,15 +567,15 @@ func TestLoadFlavorId(t *testing.T) {
Flavors: &[]postgresflex.InstanceFlavor{
{
Id: utils.Ptr("fid-1"),
Cpu: utils.Ptr(int32(2)),
Cpu: utils.Ptr(int64(2)),
Description: utils.Ptr("description"),
Memory: utils.Ptr(int32(8)),
Memory: utils.Ptr(int64(8)),
},
{
Id: utils.Ptr("fid-2"),
Cpu: utils.Ptr(int32(1)),
Cpu: utils.Ptr(int64(1)),
Description: utils.Ptr("description"),
Memory: utils.Ptr(int32(4)),
Memory: utils.Ptr(int64(4)),
},
},
},
@ -598,15 +598,15 @@ func TestLoadFlavorId(t *testing.T) {
Flavors: &[]postgresflex.InstanceFlavor{
{
Id: utils.Ptr("fid-1"),
Cpu: utils.Ptr(int32(1)),
Cpu: utils.Ptr(int64(1)),
Description: utils.Ptr("description"),
Memory: utils.Ptr(int32(8)),
Memory: utils.Ptr(int64(8)),
},
{
Id: utils.Ptr("fid-2"),
Cpu: utils.Ptr(int32(1)),
Cpu: utils.Ptr(int64(1)),
Description: utils.Ptr("description"),
Memory: utils.Ptr(int32(4)),
Memory: utils.Ptr(int64(4)),
},
},
},

View file

@ -9,7 +9,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -222,6 +221,6 @@ func mapDataSourceFields(userResp *postgresflex.UserResponse, model *DataSourceM
model.Roles = rolesSet
}
model.Host = types.StringPointerValue(user.Host)
model.Port = conversion.ToTypeInt64(user.Port)
model.Port = types.Int64PointerValue(user.Port)
return nil
}

View file

@ -45,7 +45,7 @@ func TestMapDataSourceFields(t *testing.T) {
},
Username: utils.Ptr("username"),
Host: utils.Ptr("host"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
},
},
DataSourceModel{
@ -72,7 +72,7 @@ func TestMapDataSourceFields(t *testing.T) {
Roles: &[]string{},
Username: nil,
Host: nil,
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
},
},
DataSourceModel{

View file

@ -10,7 +10,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -377,7 +376,7 @@ func mapFieldsCreate(userResp *postgresflex.CreateUserResponse, model *Model) er
model.Roles = rolesSet
}
model.Host = types.StringPointerValue(user.Host)
model.Port = conversion.ToTypeInt64(user.Port)
model.Port = types.Int64PointerValue(user.Port)
return nil
}
@ -423,7 +422,7 @@ func mapFields(userResp *postgresflex.UserResponse, model *Model) error {
model.Roles = rolesSet
}
model.Host = types.StringPointerValue(user.Host)
model.Port = conversion.ToTypeInt64(user.Port)
model.Port = types.Int64PointerValue(user.Port)
return nil
}

View file

@ -51,7 +51,7 @@ func TestMapFieldsCreate(t *testing.T) {
Username: utils.Ptr("username"),
Password: utils.Ptr("password"),
Host: utils.Ptr("host"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
},
},
Model{
@ -80,7 +80,7 @@ func TestMapFieldsCreate(t *testing.T) {
Username: nil,
Password: utils.Ptr(""),
Host: nil,
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
},
},
Model{
@ -185,7 +185,7 @@ func TestMapFields(t *testing.T) {
},
Username: utils.Ptr("username"),
Host: utils.Ptr("host"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
},
},
Model{
@ -212,7 +212,7 @@ func TestMapFields(t *testing.T) {
Roles: &[]string{},
Username: nil,
Host: nil,
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
},
},
Model{

View file

@ -8,7 +8,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -370,7 +369,7 @@ func mapFields(credentialsResp *postgresql.CredentialsResponse, model *Model) er
model.HttpAPIURI = types.StringPointerValue(credentials.HttpApiUri)
model.Name = types.StringPointerValue(credentials.Name)
model.Password = types.StringPointerValue(credentials.Password)
model.Port = conversion.ToTypeInt64(credentials.Port)
model.Port = types.Int64PointerValue(credentials.Port)
model.Uri = types.StringPointerValue(credentials.Uri)
model.Username = types.StringPointerValue(credentials.Username)
}

View file

@ -53,7 +53,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: utils.Ptr("http"),
Name: utils.Ptr("name"),
Password: utils.Ptr("password"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
Uri: utils.Ptr("uri"),
Username: utils.Ptr("username"),
},
@ -89,7 +89,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: nil,
Name: nil,
Password: nil,
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
Uri: nil,
Username: nil,
},

View file

@ -11,7 +11,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -345,7 +344,7 @@ func toCreatePayload(model *Model, parameters *parametersModel, parametersPlugin
InstanceName: model.Name.ValueStringPointer(),
Parameters: &postgresql.InstanceParameters{
EnableMonitoring: parameters.EnableMonitoring.ValueBoolPointer(),
MetricsFrequency: conversion.ToPtrInt32(parameters.MetricsFrequency),
MetricsFrequency: parameters.MetricsFrequency.ValueInt64Pointer(),
MetricsPrefix: parameters.MetricsPrefix.ValueStringPointer(),
MonitoringInstanceId: parameters.MonitoringInstanceId.ValueStringPointer(),
Plugins: parametersPlugins,
@ -487,7 +486,7 @@ func toUpdatePayload(model *Model, parameters *parametersModel, parametersPlugin
return &postgresql.UpdateInstancePayload{
Parameters: &postgresql.InstanceParameters{
EnableMonitoring: parameters.EnableMonitoring.ValueBoolPointer(),
MetricsFrequency: conversion.ToPtrInt32(parameters.MetricsFrequency),
MetricsFrequency: parameters.MetricsFrequency.ValueInt64Pointer(),
MetricsPrefix: parameters.MetricsPrefix.ValueStringPointer(),
MonitoringInstanceId: parameters.MonitoringInstanceId.ValueStringPointer(),
Plugins: parametersPlugins,

View file

@ -224,7 +224,7 @@ func TestToCreatePayload(t *testing.T) {
InstanceName: utils.Ptr("name"),
Parameters: &postgresql.InstanceParameters{
EnableMonitoring: utils.Ptr(true),
MetricsFrequency: utils.Ptr(int32(123)),
MetricsFrequency: utils.Ptr(int64(123)),
MetricsPrefix: utils.Ptr("prefix"),
MonitoringInstanceId: utils.Ptr("monitoring"),
Plugins: &[]string{
@ -257,7 +257,7 @@ func TestToCreatePayload(t *testing.T) {
InstanceName: utils.Ptr(""),
Parameters: &postgresql.InstanceParameters{
EnableMonitoring: nil,
MetricsFrequency: utils.Ptr(int32(2123456789)),
MetricsFrequency: utils.Ptr(int64(2123456789)),
MetricsPrefix: nil,
MonitoringInstanceId: nil,
Plugins: &[]string{
@ -351,7 +351,7 @@ func TestToUpdatePayload(t *testing.T) {
&postgresql.UpdateInstancePayload{
Parameters: &postgresql.InstanceParameters{
EnableMonitoring: utils.Ptr(true),
MetricsFrequency: utils.Ptr(int32(123)),
MetricsFrequency: utils.Ptr(int64(123)),
MetricsPrefix: utils.Ptr("prefix"),
MonitoringInstanceId: utils.Ptr("monitoring"),
Plugins: &[]string{
@ -382,7 +382,7 @@ func TestToUpdatePayload(t *testing.T) {
&postgresql.UpdateInstancePayload{
Parameters: &postgresql.InstanceParameters{
EnableMonitoring: nil,
MetricsFrequency: utils.Ptr(int32(2123456789)),
MetricsFrequency: utils.Ptr(int64(2123456789)),
MetricsPrefix: nil,
MonitoringInstanceId: nil,
Plugins: &[]string{

View file

@ -8,7 +8,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -370,7 +369,7 @@ func mapFields(credentialsResp *rabbitmq.CredentialsResponse, model *Model) erro
model.HttpAPIURI = types.StringPointerValue(credentials.HttpApiUri)
model.Name = types.StringPointerValue(credentials.Name)
model.Password = types.StringPointerValue(credentials.Password)
model.Port = conversion.ToTypeInt64(credentials.Port)
model.Port = types.Int64PointerValue(credentials.Port)
model.Uri = types.StringPointerValue(credentials.Uri)
model.Username = types.StringPointerValue(credentials.Username)
}

View file

@ -53,7 +53,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: utils.Ptr("http"),
Name: utils.Ptr("name"),
Password: utils.Ptr("password"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
Uri: utils.Ptr("uri"),
Username: utils.Ptr("username"),
},
@ -89,7 +89,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: nil,
Name: nil,
Password: utils.Ptr(""),
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
Uri: nil,
Username: utils.Ptr(""),
},

View file

@ -8,7 +8,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -370,7 +369,7 @@ func mapFields(credentialsResp *redis.CredentialsResponse, model *Model) error {
model.HttpAPIURI = types.StringPointerValue(credentials.HttpApiUri)
model.Name = types.StringPointerValue(credentials.Name)
model.Password = types.StringPointerValue(credentials.Password)
model.Port = conversion.ToTypeInt64(credentials.Port)
model.Port = types.Int64PointerValue(credentials.Port)
model.Uri = types.StringPointerValue(credentials.Uri)
model.Username = types.StringPointerValue(credentials.Username)
}

View file

@ -53,7 +53,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: utils.Ptr("http"),
Name: utils.Ptr("name"),
Password: utils.Ptr("password"),
Port: utils.Ptr(int32(1234)),
Port: utils.Ptr(int64(1234)),
Uri: utils.Ptr("uri"),
Username: utils.Ptr("username"),
},
@ -89,7 +89,7 @@ func TestMapFields(t *testing.T) {
HttpApiUri: nil,
Name: nil,
Password: utils.Ptr(""),
Port: utils.Ptr(int32(2123456789)),
Port: utils.Ptr(int64(2123456789)),
Uri: nil,
Username: utils.Ptr(""),
},

View file

@ -663,10 +663,10 @@ func toNodepoolsPayload(ctx context.Context, m *Cluster) []ske.Nodepool {
}
cnp := ske.Nodepool{
Name: nodePool.Name.ValueStringPointer(),
Minimum: conversion.ToPtrInt32(nodePool.Minimum),
Maximum: conversion.ToPtrInt32(nodePool.Maximum),
MaxSurge: conversion.ToPtrInt32(nodePool.MaxSurge),
MaxUnavailable: conversion.ToPtrInt32(nodePool.MaxUnavailable),
Minimum: nodePool.Minimum.ValueInt64Pointer(),
Maximum: nodePool.Maximum.ValueInt64Pointer(),
MaxSurge: nodePool.MaxSurge.ValueInt64Pointer(),
MaxUnavailable: nodePool.MaxUnavailable.ValueInt64Pointer(),
Machine: &ske.Machine{
Type: nodePool.MachineType.ValueStringPointer(),
Image: &ske.Image{
@ -676,7 +676,7 @@ func toNodepoolsPayload(ctx context.Context, m *Cluster) []ske.Nodepool {
},
Volume: &ske.Volume{
Type: nodePool.VolumeType.ValueStringPointer(),
Size: conversion.ToPtrInt32(nodePool.VolumeSize),
Size: nodePool.VolumeSize.ValueInt64Pointer(),
},
Taints: &ts,
Cri: &cn,
@ -837,12 +837,12 @@ func mapFields(ctx context.Context, cl *ske.ClusterResponse, m *Cluster) error {
MachineType: types.StringPointerValue(np.Machine.Type),
OSName: maimna,
OSVersion: maimver,
Minimum: conversion.ToTypeInt64(np.Minimum),
Maximum: conversion.ToTypeInt64(np.Maximum),
MaxSurge: conversion.ToTypeInt64(np.MaxSurge),
MaxUnavailable: conversion.ToTypeInt64(np.MaxUnavailable),
Minimum: types.Int64PointerValue(np.Minimum),
Maximum: types.Int64PointerValue(np.Maximum),
MaxSurge: types.Int64PointerValue(np.MaxSurge),
MaxUnavailable: types.Int64PointerValue(np.MaxUnavailable),
VolumeType: vt,
VolumeSize: conversion.ToTypeInt64(np.Volume.Size),
VolumeSize: types.Int64PointerValue(np.Volume.Size),
Labels: types.MapNull(types.StringType),
Taints: nil,
CRI: crin,

View file

@ -90,10 +90,10 @@ func TestMapFields(t *testing.T) {
},
Type: utils.Ptr("B"),
},
MaxSurge: utils.Ptr(int32(3)),
MaxSurge: utils.Ptr(int64(3)),
MaxUnavailable: nil,
Maximum: utils.Ptr(int32(5)),
Minimum: utils.Ptr(int32(1)),
Maximum: utils.Ptr(int64(5)),
Minimum: utils.Ptr(int64(1)),
Name: utils.Ptr("node"),
Taints: &[]ske.Taint{
{
@ -103,7 +103,7 @@ func TestMapFields(t *testing.T) {
},
},
Volume: &ske.Volume{
Size: utils.Ptr(int32(3)),
Size: utils.Ptr(int64(3)),
Type: utils.Ptr("type"),
},
},