fix(deps): update stackit sdk modules (#846)

* fix(deps): update stackit sdk modules

* feat: Use new generated enums

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

---------

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Co-authored-by: Alexander Dahmen <alexander.dahmen@inovex.de>
This commit is contained in:
stackit-pipeline 2025-05-19 09:56:41 +02:00 committed by GitHub
parent 5d844a84d6
commit 7ce802769c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 222 additions and 225 deletions

34
go.mod
View file

@ -12,29 +12,29 @@ require (
github.com/hashicorp/terraform-plugin-log v0.9.0 github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-testing v1.12.0 github.com/hashicorp/terraform-plugin-testing v1.12.0
github.com/stackitcloud/stackit-sdk-go/core v0.17.1 github.com/stackitcloud/stackit-sdk-go/core v0.17.1
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.0.2 github.com/stackitcloud/stackit-sdk-go/services/cdn v1.1.0
github.com/stackitcloud/stackit-sdk-go/services/dns v0.13.3 github.com/stackitcloud/stackit-sdk-go/services/dns v0.14.0
github.com/stackitcloud/stackit-sdk-go/services/git v0.3.3 github.com/stackitcloud/stackit-sdk-go/services/git v0.3.3
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.2 github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.2
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.0.3 github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.1.0
github.com/stackitcloud/stackit-sdk-go/services/logme v0.22.2 github.com/stackitcloud/stackit-sdk-go/services/logme v0.23.0
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.22.2 github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.23.0
github.com/stackitcloud/stackit-sdk-go/services/modelserving v0.2.3 github.com/stackitcloud/stackit-sdk-go/services/modelserving v0.3.0
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v1.0.1 github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v1.1.0
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.3 github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.3
github.com/stackitcloud/stackit-sdk-go/services/observability v0.5.2 github.com/stackitcloud/stackit-sdk-go/services/observability v0.6.0
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.21.2 github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.22.0
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.4 github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.4
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.22.2 github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.23.0
github.com/stackitcloud/stackit-sdk-go/services/redis v0.22.2 github.com/stackitcloud/stackit-sdk-go/services/redis v0.23.0
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.13.3 github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.14.0
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.11.4 github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.11.4
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.0.3 github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.1.0
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.3 github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.3
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.6.3 github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.7.0
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.0.3 github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.1.0
github.com/stackitcloud/stackit-sdk-go/services/ske v0.22.4 github.com/stackitcloud/stackit-sdk-go/services/ske v0.23.0
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.0.3 github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.1.0
github.com/teambition/rrule-go v1.8.2 github.com/teambition/rrule-go v1.8.2
golang.org/x/mod v0.23.0 golang.org/x/mod v0.23.0
) )

68
go.sum
View file

@ -154,52 +154,52 @@ github.com/stackitcloud/stackit-sdk-go/core v0.17.1 h1:TTrVoB1lERd/qfWzpe6HpwCJS
github.com/stackitcloud/stackit-sdk-go/core v0.17.1/go.mod h1:8KIw3czdNJ9sdil9QQimxjR6vHjeINFrRv0iZ67wfn0= github.com/stackitcloud/stackit-sdk-go/core v0.17.1/go.mod h1:8KIw3czdNJ9sdil9QQimxjR6vHjeINFrRv0iZ67wfn0=
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.6.3 h1:aXVMNdiHCtT07bro52KjnxEBMDNK9DweJBlk+G4ElCM= github.com/stackitcloud/stackit-sdk-go/services/authorization v0.6.3 h1:aXVMNdiHCtT07bro52KjnxEBMDNK9DweJBlk+G4ElCM=
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.6.3/go.mod h1:dJ19ZwFjp2bfC5ZobXV3vUdSpE3quUw3GuoFSKLpHIo= github.com/stackitcloud/stackit-sdk-go/services/authorization v0.6.3/go.mod h1:dJ19ZwFjp2bfC5ZobXV3vUdSpE3quUw3GuoFSKLpHIo=
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.0.2 h1:1Q4D/bUtpFjE/+nr+pqgDAjfpw7IEH3q7axZDTQ1rcM= github.com/stackitcloud/stackit-sdk-go/services/cdn v1.1.0 h1:/73QGByMhsLq38b+3tXvIV4MpiPZoEPgmX1BVYPMTYQ=
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.0.2/go.mod h1:Gd+M/UZR0rIaHRXhJzkb0r7kl/nDRmpcmqnOPN5fCSQ= github.com/stackitcloud/stackit-sdk-go/services/cdn v1.1.0/go.mod h1:Gd+M/UZR0rIaHRXhJzkb0r7kl/nDRmpcmqnOPN5fCSQ=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.13.3 h1:WJnA6YTOlBxMJf9PRuxkXduxj+fyWi+wOks69PvN1qI= github.com/stackitcloud/stackit-sdk-go/services/dns v0.14.0 h1:aji1vxn1LVfM+SCfOSXUz0Pwv+ZQjyt9PmV0ejHLy5U=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.13.3/go.mod h1:PMHoavoIaRZpkI9BA0nsnRjGoHASVSBon45XB3QyhMA= github.com/stackitcloud/stackit-sdk-go/services/dns v0.14.0/go.mod h1:PMHoavoIaRZpkI9BA0nsnRjGoHASVSBon45XB3QyhMA=
github.com/stackitcloud/stackit-sdk-go/services/git v0.3.3 h1:/NXxiJf/NFpj+DFXc07vsx+0he/xufdhIskXUlSeyyw= github.com/stackitcloud/stackit-sdk-go/services/git v0.3.3 h1:/NXxiJf/NFpj+DFXc07vsx+0he/xufdhIskXUlSeyyw=
github.com/stackitcloud/stackit-sdk-go/services/git v0.3.3/go.mod h1:XhXHJpOVC9Rpwyf1G+EpMbprBafH9aZb8vWBdR+z0WM= github.com/stackitcloud/stackit-sdk-go/services/git v0.3.3/go.mod h1:XhXHJpOVC9Rpwyf1G+EpMbprBafH9aZb8vWBdR+z0WM=
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.2 h1:zh6e2eHgqex++fr6N0RK7wMMBGesC3QhBd42FdTq2Z8= github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.2 h1:zh6e2eHgqex++fr6N0RK7wMMBGesC3QhBd42FdTq2Z8=
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.2/go.mod h1:QNH50Pq0Hu21lLDOwa02PIjRjTl0LfEdHoz5snGQRn8= github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.2/go.mod h1:QNH50Pq0Hu21lLDOwa02PIjRjTl0LfEdHoz5snGQRn8=
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.0.3 h1:StQg5p4h1aLFwIHQWWe5l44aFue+ZvQMGDbypP1DMYw= github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.1.0 h1:9gUobm//GzVGYTbfa39tNRceEjQskNuNVZyUS9rOZ4Y=
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.0.3/go.mod h1:h3oM6cS23Yfynp8Df1hNr0FxtY5Alii/2g8Wqi5SIVE= github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.1.0/go.mod h1:h3oM6cS23Yfynp8Df1hNr0FxtY5Alii/2g8Wqi5SIVE=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.22.2 h1:wM/Gop6sG/fkpzsZGhrPN2AzkKxHup175WaFBGaeQ7s= github.com/stackitcloud/stackit-sdk-go/services/logme v0.23.0 h1:ksxHeILZutooun0Hy/cY8qikC9owya1UDJR+FSQSlRw=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.22.2/go.mod h1:+3jizYma6Dq3XVn6EMMdSBF9eIm0w6hCJvrStB3AIL0= github.com/stackitcloud/stackit-sdk-go/services/logme v0.23.0/go.mod h1:+3jizYma6Dq3XVn6EMMdSBF9eIm0w6hCJvrStB3AIL0=
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.22.2 h1:JoPz34UT1Gx7TV6GpOzWdNBq78co7MV12jynADI4AMc= github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.23.0 h1:vS7J/2maD1PoD2mukyqYWbzG1BvcCU5/G28ktBJ3fyA=
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.22.2/go.mod h1:qgvi3qiAzB1wKpMJ5CPnEaUToeiwgnQxGvlkjdisaLU= github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.23.0/go.mod h1:qgvi3qiAzB1wKpMJ5CPnEaUToeiwgnQxGvlkjdisaLU=
github.com/stackitcloud/stackit-sdk-go/services/modelserving v0.2.3 h1:P4zifu2P04WgwZ1VfXtQbq68cRF9YrQL6ys8jzrxoRc= github.com/stackitcloud/stackit-sdk-go/services/modelserving v0.3.0 h1:eGujHJ9L+iGK97Fd19dEL9lBMykstfW4Zvpedm9E3Wk=
github.com/stackitcloud/stackit-sdk-go/services/modelserving v0.2.3/go.mod h1:hj4/st968S6QPd1yhs4JXT6znvGtshZencQ0qDdkUM8= github.com/stackitcloud/stackit-sdk-go/services/modelserving v0.3.0/go.mod h1:hj4/st968S6QPd1yhs4JXT6znvGtshZencQ0qDdkUM8=
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v1.0.1 h1:CBGVT+5ilIFVtz5gDnQ58zNapFCLpjOftuVeATdg1qo= github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v1.1.0 h1:oy8Ng6gd7mqfYFHQ5fueMaTy3irC5I2ZlFjFT7PNfxI=
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v1.0.1/go.mod h1:+JSnz5/AvGN5ek/iH008frRc/NgjSr1EVOTIbyLwAuQ= github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v1.1.0/go.mod h1:+JSnz5/AvGN5ek/iH008frRc/NgjSr1EVOTIbyLwAuQ=
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.3 h1:RFe45uLzTSmd69yaQe5zLDY3+1hYi6/lSZUVcjbb6+c= github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.3 h1:RFe45uLzTSmd69yaQe5zLDY3+1hYi6/lSZUVcjbb6+c=
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.3/go.mod h1:iCOYS9yICXQPyMAIdUGMqJDLY8HXKiVAdiMzO/mPvtA= github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.3/go.mod h1:iCOYS9yICXQPyMAIdUGMqJDLY8HXKiVAdiMzO/mPvtA=
github.com/stackitcloud/stackit-sdk-go/services/observability v0.5.2 h1:anITBRTlQoneEawVg4hHjs4IceFJLFq9KdDU+d5y5DU= github.com/stackitcloud/stackit-sdk-go/services/observability v0.6.0 h1:QqlFcMv/TbIG95u/xHB/9aLvElplj1lKnTIyUSwEtT4=
github.com/stackitcloud/stackit-sdk-go/services/observability v0.5.2/go.mod h1:1gMNjPCqT868oIqdWGkiReS1G/qpM4bYKYBmDRi8sqg= github.com/stackitcloud/stackit-sdk-go/services/observability v0.6.0/go.mod h1:1gMNjPCqT868oIqdWGkiReS1G/qpM4bYKYBmDRi8sqg=
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.21.2 h1:p1bub8QayR+NkYtGd8DNSjxlRmoyR7Dr97LiwWVW1Ow= github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.22.0 h1:XDt4NCiWdpjbbw9UevsxLJ3SGkO1bSoJnV96RSHNNoI=
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.21.2/go.mod h1:c30J6f/fXtbzcHkH3ZcabZUek3wfy5CRnEkcW5e5yXg= github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.22.0/go.mod h1:c30J6f/fXtbzcHkH3ZcabZUek3wfy5CRnEkcW5e5yXg=
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.4 h1:AIQueG1oSdKbxK8ASZZYkmqzJ7NhKzKcR5AQsndoF18= github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.4 h1:AIQueG1oSdKbxK8ASZZYkmqzJ7NhKzKcR5AQsndoF18=
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.4/go.mod h1:4g/L5PHfz1xk3udEhvPy2nXiH4UgRO5Cj6iwUa7k5VQ= github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.4/go.mod h1:4g/L5PHfz1xk3udEhvPy2nXiH4UgRO5Cj6iwUa7k5VQ=
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.22.2 h1:++lyru25B7J8cKaEBCw9ZKgXDIJGmQvmFXR+BpAcR4g= github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.23.0 h1:oaWgVHqRzBqS3zkDm4aIvX0zVyWIwlHxvch6qy/Tino=
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.22.2/go.mod h1:9JoCgKe2IKmawcuAYIuxrAMMb6pk5XiY80Z3sU7IWy0= github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.23.0/go.mod h1:9JoCgKe2IKmawcuAYIuxrAMMb6pk5XiY80Z3sU7IWy0=
github.com/stackitcloud/stackit-sdk-go/services/redis v0.22.2 h1:KKANO+wsLVkuH8N+xuYrEx+rDcliv48zYk3I7QzdX3A= github.com/stackitcloud/stackit-sdk-go/services/redis v0.23.0 h1:arcom/1Chl3+SkDZYRNx5IemkLlqU2mnXrQmg9dsxQI=
github.com/stackitcloud/stackit-sdk-go/services/redis v0.22.2/go.mod h1:mID7cr40WzI4wdvveYhLzvkk+zPfolfo5+VcDGo5slU= github.com/stackitcloud/stackit-sdk-go/services/redis v0.23.0/go.mod h1:mID7cr40WzI4wdvveYhLzvkk+zPfolfo5+VcDGo5slU=
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.13.3 h1:4DNnEZj4uSyE+gDS+j9MCUuax9nfnttfro+JJE8QRSE= github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.14.0 h1:Rpbt83RyXS0AMw97g5L9oQdCAmVBGAyHpeCcDXesuEk=
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.13.3/go.mod h1:Picm0mP7TUBTAu+MzWtedz61LczMnWH4ghPjwB/g5DE= github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.14.0/go.mod h1:Picm0mP7TUBTAu+MzWtedz61LczMnWH4ghPjwB/g5DE=
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.11.4 h1:UCX1qy44q22bDGv7BhLtOrWCzriS9m4MQsIOX6n+lgM= github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.11.4 h1:UCX1qy44q22bDGv7BhLtOrWCzriS9m4MQsIOX6n+lgM=
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.11.4/go.mod h1:iD7R3CNdLUDUyKP+lATsQy+V4QGMMOb15zPnNq4wnbs= github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.11.4/go.mod h1:iD7R3CNdLUDUyKP+lATsQy+V4QGMMOb15zPnNq4wnbs=
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.0.3 h1:OR5CZnxZMbGXsYPOZL00En3RhXeUuEJcZVN9iSxxTs8= github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.1.0 h1:cKQAuKSihSX1Jpacub2rZ1StItiO7SIO0y+Fi2yukd4=
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.0.3/go.mod h1:j2GV/ePXEccwq0WV7DtmKpsZcJ2X45Be3D4oAlJdddo= github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.1.0/go.mod h1:j2GV/ePXEccwq0WV7DtmKpsZcJ2X45Be3D4oAlJdddo=
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.3 h1:iLyXsBF+lP7iE4rnoK3hO8l4wHcgySRXD65oeUgt6Jc= github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.3 h1:iLyXsBF+lP7iE4rnoK3hO8l4wHcgySRXD65oeUgt6Jc=
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.3/go.mod h1:5F7/2BiKhrbvHD56mj5xR9qf8P0V2yMgeitmdIpQv4s= github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.3/go.mod h1:5F7/2BiKhrbvHD56mj5xR9qf8P0V2yMgeitmdIpQv4s=
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.6.3 h1:qCn6ZS/oJEqA4PBMLMDvvctQ4eQEoCQSSWES394+AcQ= github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.7.0 h1:QiHkjmforciAfBnf/oMjGmoZWYYD38ZrgLNWK149xQQ=
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.6.3/go.mod h1:e3WMlYcUZZ5bpndWuCrxEQqIOPsYPuus9O/EG2eIfG4= github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.7.0/go.mod h1:e3WMlYcUZZ5bpndWuCrxEQqIOPsYPuus9O/EG2eIfG4=
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.0.3 h1:rDsIPzaNJ4bnKJp9XFNzna+pXylGYVHUBPl5hqBWhX8= github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.1.0 h1:Wb/eEqbnwLw+lsTlAC8qTFoLMtXOTWcZDUDSiUB7GnM=
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.0.3/go.mod h1:TYWEik7b2aJrCJrRWU3mn1p1hmShCwizRthT3xl6z0o= github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.1.0/go.mod h1:TYWEik7b2aJrCJrRWU3mn1p1hmShCwizRthT3xl6z0o=
github.com/stackitcloud/stackit-sdk-go/services/ske v0.22.4 h1:whyCGfzlLcyb23uKGJLrftjT57vqa1jS3Xz5voUHK+M= github.com/stackitcloud/stackit-sdk-go/services/ske v0.23.0 h1:kPAYBLDJC8W3GvDt+KtqDl2EZJgbU9l1tUj0JbCWA+4=
github.com/stackitcloud/stackit-sdk-go/services/ske v0.22.4/go.mod h1:nJTJ3qT2xHmOs2aqQgBPfOLp322gE9pvpRaluTlRmN8= github.com/stackitcloud/stackit-sdk-go/services/ske v0.23.0/go.mod h1:nJTJ3qT2xHmOs2aqQgBPfOLp322gE9pvpRaluTlRmN8=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.0.3 h1:MF46ffu+A8eu17N7LGFG2T50PhjDw2L0f68Uu316r8U= github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.1.0 h1:awy7JzBwAVJEKcJVt1DBZtZ0qtdT2aEuWCkgQvKky9w=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.0.3/go.mod h1:CyYJqR0tZWs2r5bGz69j4bmvhxdsd4QLCm1Uf+LouB0= github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.1.0/go.mod h1:CyYJqR0tZWs2r5bGz69j4bmvhxdsd4QLCm1Uf+LouB0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=

View file

@ -452,7 +452,7 @@ func mapFields(distribution *cdn.Distribution, model *Model) error {
model.ID = types.StringValue(id) model.ID = types.StringValue(id)
model.DistributionId = types.StringValue(*distribution.Id) model.DistributionId = types.StringValue(*distribution.Id)
model.ProjectId = types.StringValue(*distribution.ProjectId) model.ProjectId = types.StringValue(*distribution.ProjectId)
model.Status = types.StringValue(*distribution.Status) model.Status = types.StringValue(string(distribution.GetStatus()))
model.CreatedAt = types.StringValue(distribution.CreatedAt.String()) model.CreatedAt = types.StringValue(distribution.CreatedAt.String())
model.UpdatedAt = types.StringValue(distribution.UpdatedAt.String()) model.UpdatedAt = types.StringValue(distribution.UpdatedAt.String())
@ -528,7 +528,7 @@ func mapFields(distribution *cdn.Distribution, model *Model) error {
modelDomain, diags := types.ObjectValue(domainTypes, map[string]attr.Value{ modelDomain, diags := types.ObjectValue(domainTypes, map[string]attr.Value{
"name": types.StringValue(*d.Name), "name": types.StringValue(*d.Name),
"status": types.StringValue(string(*d.Status)), "status": types.StringValue(string(*d.Status)),
"type": types.StringValue(*d.Type), "type": types.StringValue(string(*d.Type)),
"errors": modelDomainErrors, "errors": modelDomainErrors,
}) })
if diags.HasError() { if diags.HasError() {

View file

@ -236,12 +236,12 @@ func TestMapFields(t *testing.T) {
{ {
Name: cdn.PtrString("test.stackit-cdn.com"), Name: cdn.PtrString("test.stackit-cdn.com"),
Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(), Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(),
Type: cdn.PtrString("managed"), Type: cdn.DOMAINTYPE_MANAGED.Ptr(),
}, },
}, },
Id: cdn.PtrString("test-distribution-id"), Id: cdn.PtrString("test-distribution-id"),
ProjectId: cdn.PtrString("test-project-id"), ProjectId: cdn.PtrString("test-project-id"),
Status: cdn.PtrString("ACTIVE"), Status: cdn.DISTRIBUTIONSTATUS_ACTIVE.Ptr(),
UpdatedAt: &updatedAt, UpdatedAt: &updatedAt,
} }
for _, mod := range mods { for _, mod := range mods {
@ -264,7 +264,7 @@ func TestMapFields(t *testing.T) {
m.Status = types.StringValue("ERROR") m.Status = types.StringValue("ERROR")
}), }),
Input: distributionFixture(func(d *cdn.Distribution) { Input: distributionFixture(func(d *cdn.Distribution) {
d.Status = cdn.PtrString("ERROR") d.Status = cdn.DISTRIBUTIONSTATUS_ERROR.Ptr()
}), }),
IsValid: true, IsValid: true,
}, },
@ -290,12 +290,12 @@ func TestMapFields(t *testing.T) {
{ {
Name: cdn.PtrString("test.stackit-cdn.com"), Name: cdn.PtrString("test.stackit-cdn.com"),
Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(), Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(),
Type: cdn.PtrString("managed"), Type: cdn.DOMAINTYPE_MANAGED.Ptr(),
}, },
{ {
Name: cdn.PtrString("mycoolapp.info"), Name: cdn.PtrString("mycoolapp.info"),
Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(), Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(),
Type: cdn.PtrString("custom"), Type: cdn.DOMAINTYPE_CUSTOM.Ptr(),
}, },
} }
}), }),

View file

@ -14,7 +14,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/stackit-sdk-go/services/dns" "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/core" "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/utils" "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/utils"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate" "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -158,7 +157,7 @@ func (d *recordSetDataSource) Read(ctx context.Context, req datasource.ReadReque
resp.State.RemoveResource(ctx) resp.State.RemoveResource(ctx)
return return
} }
if recordSetResp != nil && recordSetResp.Rrset.State != nil && *recordSetResp.Rrset.State == wait.DeleteSuccess { if recordSetResp != nil && recordSetResp.Rrset.State != nil && *recordSetResp.Rrset.State == dns.RECORDSETSTATE_DELETE_SUCCEEDED {
resp.State.RemoveResource(ctx) resp.State.RemoveResource(ctx)
core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading record set", "Record set was deleted successfully") core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading record set", "Record set was deleted successfully")
return return

View file

@ -262,7 +262,7 @@ func (r *recordSetResource) Read(ctx context.Context, req resource.ReadRequest,
core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading record set", fmt.Sprintf("Calling API: %v", err)) core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading record set", fmt.Sprintf("Calling API: %v", err))
return return
} }
if recordSetResp != nil && recordSetResp.Rrset.State != nil && *recordSetResp.Rrset.State == wait.DeleteSuccess { if recordSetResp != nil && recordSetResp.Rrset.State != nil && *recordSetResp.Rrset.State == dns.RECORDSETSTATE_DELETE_SUCCEEDED {
resp.State.RemoveResource(ctx) resp.State.RemoveResource(ctx)
return return
} }
@ -436,9 +436,9 @@ func mapFields(ctx context.Context, recordSetResp *dns.RecordSetResponse, model
model.Name = types.StringPointerValue(recordSet.Name) model.Name = types.StringPointerValue(recordSet.Name)
} }
model.FQDN = types.StringPointerValue(recordSet.Name) model.FQDN = types.StringPointerValue(recordSet.Name)
model.State = types.StringPointerValue(recordSet.State) model.State = types.StringValue(string(recordSet.GetState()))
model.TTL = types.Int64PointerValue(recordSet.Ttl) model.TTL = types.Int64PointerValue(recordSet.Ttl)
model.Type = types.StringPointerValue(recordSet.Type) model.Type = types.StringValue(string(recordSet.GetType()))
return nil return nil
} }
@ -463,7 +463,7 @@ func toCreatePayload(model *Model) (*dns.CreateRecordSetPayload, error) {
Name: conversion.StringValueToPointer(model.Name), Name: conversion.StringValueToPointer(model.Name),
Records: &records, Records: &records,
Ttl: conversion.Int64ValueToPointer(model.TTL), Ttl: conversion.Int64ValueToPointer(model.TTL),
Type: conversion.StringValueToPointer(model.Type), Type: dns.CreateRecordSetPayloadGetTypeAttributeType(conversion.StringValueToPointer(model.Type)),
}, nil }, nil
} }

View file

@ -41,9 +41,9 @@ func TestMapFields(t *testing.T) {
Name: types.StringNull(), Name: types.StringNull(),
FQDN: types.StringNull(), FQDN: types.StringNull(),
Records: types.ListNull(types.StringType), Records: types.ListNull(types.StringType),
State: types.StringNull(), State: types.StringValue(""),
TTL: types.Int64Null(), TTL: types.Int64Null(),
Type: types.StringNull(), Type: types.StringValue(""),
}, },
true, true,
}, },
@ -64,9 +64,9 @@ func TestMapFields(t *testing.T) {
{Content: utils.Ptr("record_1")}, {Content: utils.Ptr("record_1")},
{Content: utils.Ptr("record_2")}, {Content: utils.Ptr("record_2")},
}, },
State: utils.Ptr("state"), State: dns.RECORDSETSTATE_CREATING.Ptr(),
Ttl: utils.Ptr(int64(1)), Ttl: utils.Ptr(int64(1)),
Type: utils.Ptr("type"), Type: dns.RECORDSETTYPE_A.Ptr(),
}, },
}, },
Model{ Model{
@ -83,9 +83,9 @@ func TestMapFields(t *testing.T) {
types.StringValue("record_1"), types.StringValue("record_1"),
types.StringValue("record_2"), types.StringValue("record_2"),
}), }),
State: types.StringValue("state"), State: types.StringValue(string(dns.RECORDSETSTATE_CREATING)),
TTL: types.Int64Value(1), TTL: types.Int64Value(1),
Type: types.StringValue("type"), Type: types.StringValue(string(dns.RECORDSETTYPE_A)),
}, },
true, true,
}, },
@ -110,9 +110,9 @@ func TestMapFields(t *testing.T) {
{Content: utils.Ptr("record_1")}, {Content: utils.Ptr("record_1")},
{Content: utils.Ptr("record_2")}, {Content: utils.Ptr("record_2")},
}, },
State: utils.Ptr("state"), State: dns.RECORDSETSTATE_CREATING.Ptr(),
Ttl: utils.Ptr(int64(1)), Ttl: utils.Ptr(int64(1)),
Type: utils.Ptr("type"), Type: dns.RECORDSETTYPE_A.Ptr(),
}, },
}, },
Model{ Model{
@ -129,9 +129,9 @@ func TestMapFields(t *testing.T) {
types.StringValue("record_2"), types.StringValue("record_2"),
types.StringValue("record_1"), types.StringValue("record_1"),
}), }),
State: types.StringValue("state"), State: types.StringValue(string(dns.RECORDSETSTATE_CREATING)),
TTL: types.Int64Value(1), TTL: types.Int64Value(1),
Type: types.StringValue("type"), Type: types.StringValue(string(dns.RECORDSETTYPE_A)),
}, },
true, true,
}, },
@ -150,9 +150,9 @@ func TestMapFields(t *testing.T) {
Error: nil, Error: nil,
Name: utils.Ptr("name"), Name: utils.Ptr("name"),
Records: nil, Records: nil,
State: utils.Ptr("state"), State: dns.RECORDSETSTATE_CREATING.Ptr(),
Ttl: utils.Ptr(int64(2123456789)), Ttl: utils.Ptr(int64(2123456789)),
Type: utils.Ptr("type"), Type: dns.RECORDSETTYPE_A.Ptr(),
}, },
}, },
Model{ Model{
@ -166,9 +166,9 @@ func TestMapFields(t *testing.T) {
Name: types.StringValue("other-name"), Name: types.StringValue("other-name"),
FQDN: types.StringValue("name"), FQDN: types.StringValue("name"),
Records: types.ListNull(types.StringType), Records: types.ListNull(types.StringType),
State: types.StringValue("state"), State: types.StringValue(string(dns.RECORDSETSTATE_CREATING)),
TTL: types.Int64Value(2123456789), TTL: types.Int64Value(2123456789),
Type: types.StringValue("type"), Type: types.StringValue(string(dns.RECORDSETTYPE_A)),
}, },
true, true,
}, },
@ -237,7 +237,7 @@ func TestToCreatePayload(t *testing.T) {
types.StringValue("record_2"), types.StringValue("record_2"),
}), }),
TTL: types.Int64Value(1), TTL: types.Int64Value(1),
Type: types.StringValue("type"), Type: types.StringValue(string(dns.RECORDSETTYPE_A)),
}, },
&dns.CreateRecordSetPayload{ &dns.CreateRecordSetPayload{
Comment: utils.Ptr("comment"), Comment: utils.Ptr("comment"),
@ -247,7 +247,7 @@ func TestToCreatePayload(t *testing.T) {
{Content: utils.Ptr("record_2")}, {Content: utils.Ptr("record_2")},
}, },
Ttl: utils.Ptr(int64(1)), Ttl: utils.Ptr(int64(1)),
Type: utils.Ptr("type"), Type: dns.CREATERECORDSETPAYLOADTYPE_A.Ptr(),
}, },
true, true,
}, },
@ -258,14 +258,14 @@ func TestToCreatePayload(t *testing.T) {
Name: types.StringValue(""), Name: types.StringValue(""),
Records: types.ListValueMust(types.StringType, nil), Records: types.ListValueMust(types.StringType, nil),
TTL: types.Int64Value(2123456789), TTL: types.Int64Value(2123456789),
Type: types.StringValue(""), Type: types.StringValue(string(dns.RECORDSETTYPE_A)),
}, },
&dns.CreateRecordSetPayload{ &dns.CreateRecordSetPayload{
Comment: nil, Comment: nil,
Name: utils.Ptr(""), Name: utils.Ptr(""),
Records: &[]dns.RecordPayload{}, Records: &[]dns.RecordPayload{},
Ttl: utils.Ptr(int64(2123456789)), Ttl: utils.Ptr(int64(2123456789)),
Type: utils.Ptr(""), Type: dns.CREATERECORDSETPAYLOADTYPE_A.Ptr(),
}, },
true, true,
}, },

View file

@ -14,7 +14,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/stackit-sdk-go/services/dns" "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/core" "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/utils" "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/utils"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate" "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -188,7 +187,7 @@ func (d *zoneDataSource) Read(ctx context.Context, req datasource.ReadRequest, r
resp.State.RemoveResource(ctx) resp.State.RemoveResource(ctx)
return return
} }
if zoneResp != nil && zoneResp.Zone.State != nil && *zoneResp.Zone.State == wait.DeleteSuccess { if zoneResp != nil && zoneResp.Zone.State != nil && *zoneResp.Zone.State == dns.ZONESTATE_DELETE_SUCCEEDED {
resp.State.RemoveResource(ctx) resp.State.RemoveResource(ctx)
core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading zone", "Zone was deleted successfully") core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading zone", "Zone was deleted successfully")
return return

View file

@ -343,7 +343,7 @@ func (r *zoneResource) Read(ctx context.Context, req resource.ReadRequest, resp
core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading zone", fmt.Sprintf("Calling API: %v", err)) core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading zone", fmt.Sprintf("Calling API: %v", err))
return return
} }
if zoneResp != nil && zoneResp.Zone.State != nil && *zoneResp.Zone.State == wait.DeleteSuccess { if zoneResp != nil && zoneResp.Zone.State != nil && *zoneResp.Zone.State == dns.ZONESTATE_DELETE_SUCCEEDED {
resp.State.RemoveResource(ctx) resp.State.RemoveResource(ctx)
return return
} }
@ -529,9 +529,9 @@ func mapFields(ctx context.Context, zoneResp *dns.ZoneResponse, model *Model) er
model.RefreshTime = types.Int64PointerValue(z.RefreshTime) model.RefreshTime = types.Int64PointerValue(z.RefreshTime)
model.RetryTime = types.Int64PointerValue(z.RetryTime) model.RetryTime = types.Int64PointerValue(z.RetryTime)
model.SerialNumber = types.Int64PointerValue(z.SerialNumber) model.SerialNumber = types.Int64PointerValue(z.SerialNumber)
model.State = types.StringPointerValue(z.State) model.State = types.StringValue(string(z.GetState()))
model.Type = types.StringPointerValue(z.Type) model.Type = types.StringValue(string(z.GetType()))
model.Visibility = types.StringPointerValue(z.Visibility) model.Visibility = types.StringValue(string(z.GetVisibility()))
return nil return nil
} }
@ -554,7 +554,7 @@ func toCreatePayload(model *Model) (*dns.CreateZonePayload, error) {
ContactEmail: conversion.StringValueToPointer(model.ContactEmail), ContactEmail: conversion.StringValueToPointer(model.ContactEmail),
Description: conversion.StringValueToPointer(model.Description), Description: conversion.StringValueToPointer(model.Description),
Acl: conversion.StringValueToPointer(model.Acl), Acl: conversion.StringValueToPointer(model.Acl),
Type: conversion.StringValueToPointer(model.Type), Type: dns.CreateZonePayloadGetTypeAttributeType(conversion.StringValueToPointer(model.Type)),
DefaultTTL: conversion.Int64ValueToPointer(model.DefaultTTL), DefaultTTL: conversion.Int64ValueToPointer(model.DefaultTTL),
ExpireTime: conversion.Int64ValueToPointer(model.ExpireTime), ExpireTime: conversion.Int64ValueToPointer(model.ExpireTime),
RefreshTime: conversion.Int64ValueToPointer(model.RefreshTime), RefreshTime: conversion.Int64ValueToPointer(model.RefreshTime),

View file

@ -43,11 +43,11 @@ func TestMapFields(t *testing.T) {
RetryTime: types.Int64Null(), RetryTime: types.Int64Null(),
SerialNumber: types.Int64Null(), SerialNumber: types.Int64Null(),
NegativeCache: types.Int64Null(), NegativeCache: types.Int64Null(),
Type: types.StringNull(), Type: types.StringValue(""),
State: types.StringNull(), State: types.StringValue(""),
PrimaryNameServer: types.StringNull(), PrimaryNameServer: types.StringNull(),
Primaries: types.ListNull(types.StringType), Primaries: types.ListNull(types.StringType),
Visibility: types.StringNull(), Visibility: types.StringValue(""),
}, },
true, true,
}, },
@ -72,13 +72,13 @@ func TestMapFields(t *testing.T) {
RetryTime: utils.Ptr(int64(4)), RetryTime: utils.Ptr(int64(4)),
SerialNumber: utils.Ptr(int64(5)), SerialNumber: utils.Ptr(int64(5)),
NegativeCache: utils.Ptr(int64(6)), NegativeCache: utils.Ptr(int64(6)),
State: utils.Ptr("state"), State: dns.ZONESTATE_CREATING.Ptr(),
Type: utils.Ptr("type"), Type: dns.ZONETYPE_PRIMARY.Ptr(),
Primaries: &[]string{"primary"}, Primaries: &[]string{"primary"},
PrimaryNameServer: utils.Ptr("pns"), PrimaryNameServer: utils.Ptr("pns"),
UpdateStarted: utils.Ptr("ufoo"), UpdateStarted: utils.Ptr("ufoo"),
UpdateFinished: utils.Ptr("ubar"), UpdateFinished: utils.Ptr("ubar"),
Visibility: utils.Ptr("visibility"), Visibility: dns.ZONEVISIBILITY_PUBLIC.Ptr(),
Error: utils.Ptr("error"), Error: utils.Ptr("error"),
ContactEmail: utils.Ptr("a@b.cd"), ContactEmail: utils.Ptr("a@b.cd"),
Description: utils.Ptr("description"), Description: utils.Ptr("description"),
@ -100,13 +100,13 @@ func TestMapFields(t *testing.T) {
RetryTime: types.Int64Value(4), RetryTime: types.Int64Value(4),
SerialNumber: types.Int64Value(5), SerialNumber: types.Int64Value(5),
NegativeCache: types.Int64Value(6), NegativeCache: types.Int64Value(6),
Type: types.StringValue("type"), Type: types.StringValue(string(dns.ZONETYPE_PRIMARY)),
State: types.StringValue("state"), State: types.StringValue(string(dns.ZONESTATE_CREATING)),
PrimaryNameServer: types.StringValue("pns"), PrimaryNameServer: types.StringValue("pns"),
Primaries: types.ListValueMust(types.StringType, []attr.Value{ Primaries: types.ListValueMust(types.StringType, []attr.Value{
types.StringValue("primary"), types.StringValue("primary"),
}), }),
Visibility: types.StringValue("visibility"), Visibility: types.StringValue(string(dns.ZONEVISIBILITY_PUBLIC)),
ContactEmail: types.StringValue("a@b.cd"), ContactEmail: types.StringValue("a@b.cd"),
Description: types.StringValue("description"), Description: types.StringValue("description"),
IsReverseZone: types.BoolValue(false), IsReverseZone: types.BoolValue(false),
@ -139,8 +139,8 @@ func TestMapFields(t *testing.T) {
RetryTime: utils.Ptr(int64(4)), RetryTime: utils.Ptr(int64(4)),
SerialNumber: utils.Ptr(int64(5)), SerialNumber: utils.Ptr(int64(5)),
NegativeCache: utils.Ptr(int64(6)), NegativeCache: utils.Ptr(int64(6)),
State: utils.Ptr("state"), State: dns.ZONESTATE_CREATING.Ptr(),
Type: utils.Ptr("type"), Type: dns.ZONETYPE_PRIMARY.Ptr(),
Primaries: &[]string{ Primaries: &[]string{
"primary1", "primary1",
"primary2", "primary2",
@ -148,7 +148,7 @@ func TestMapFields(t *testing.T) {
PrimaryNameServer: utils.Ptr("pns"), PrimaryNameServer: utils.Ptr("pns"),
UpdateStarted: utils.Ptr("ufoo"), UpdateStarted: utils.Ptr("ufoo"),
UpdateFinished: utils.Ptr("ubar"), UpdateFinished: utils.Ptr("ubar"),
Visibility: utils.Ptr("visibility"), Visibility: dns.ZONEVISIBILITY_PUBLIC.Ptr(),
Error: utils.Ptr("error"), Error: utils.Ptr("error"),
ContactEmail: utils.Ptr("a@b.cd"), ContactEmail: utils.Ptr("a@b.cd"),
Description: utils.Ptr("description"), Description: utils.Ptr("description"),
@ -170,14 +170,14 @@ func TestMapFields(t *testing.T) {
RetryTime: types.Int64Value(4), RetryTime: types.Int64Value(4),
SerialNumber: types.Int64Value(5), SerialNumber: types.Int64Value(5),
NegativeCache: types.Int64Value(6), NegativeCache: types.Int64Value(6),
Type: types.StringValue("type"), Type: types.StringValue(string(dns.ZONETYPE_PRIMARY)),
State: types.StringValue("state"), State: types.StringValue(string(dns.ZONESTATE_CREATING)),
PrimaryNameServer: types.StringValue("pns"), PrimaryNameServer: types.StringValue("pns"),
Primaries: types.ListValueMust(types.StringType, []attr.Value{ Primaries: types.ListValueMust(types.StringType, []attr.Value{
types.StringValue("primary2"), types.StringValue("primary2"),
types.StringValue("primary1"), types.StringValue("primary1"),
}), }),
Visibility: types.StringValue("visibility"), Visibility: types.StringValue(string(dns.ZONEVISIBILITY_PUBLIC)),
ContactEmail: types.StringValue("a@b.cd"), ContactEmail: types.StringValue("a@b.cd"),
Description: types.StringValue("description"), Description: types.StringValue("description"),
IsReverseZone: types.BoolValue(false), IsReverseZone: types.BoolValue(false),
@ -207,13 +207,13 @@ func TestMapFields(t *testing.T) {
RetryTime: utils.Ptr(int64(4)), RetryTime: utils.Ptr(int64(4)),
SerialNumber: utils.Ptr(int64(5)), SerialNumber: utils.Ptr(int64(5)),
NegativeCache: utils.Ptr(int64(0)), NegativeCache: utils.Ptr(int64(0)),
State: utils.Ptr("state"), State: dns.ZONESTATE_CREATING.Ptr(),
Type: utils.Ptr("type"), Type: dns.ZONETYPE_PRIMARY.Ptr(),
Primaries: nil, Primaries: nil,
PrimaryNameServer: utils.Ptr("pns"), PrimaryNameServer: utils.Ptr("pns"),
UpdateStarted: utils.Ptr("ufoo"), UpdateStarted: utils.Ptr("ufoo"),
UpdateFinished: utils.Ptr("ubar"), UpdateFinished: utils.Ptr("ubar"),
Visibility: utils.Ptr("visibility"), Visibility: dns.ZONEVISIBILITY_PUBLIC.Ptr(),
ContactEmail: nil, ContactEmail: nil,
Description: nil, Description: nil,
IsReverseZone: nil, IsReverseZone: nil,
@ -234,11 +234,11 @@ func TestMapFields(t *testing.T) {
RetryTime: types.Int64Value(4), RetryTime: types.Int64Value(4),
SerialNumber: types.Int64Value(5), SerialNumber: types.Int64Value(5),
NegativeCache: types.Int64Value(0), NegativeCache: types.Int64Value(0),
Type: types.StringValue("type"), Type: types.StringValue(string(dns.ZONETYPE_PRIMARY)),
Primaries: types.ListNull(types.StringType), Primaries: types.ListNull(types.StringType),
State: types.StringValue("state"), State: types.StringValue(string(dns.ZONESTATE_CREATING)),
PrimaryNameServer: types.StringValue("pns"), PrimaryNameServer: types.StringValue("pns"),
Visibility: types.StringValue("visibility"), Visibility: types.StringValue(string(dns.ZONEVISIBILITY_PUBLIC)),
ContactEmail: types.StringNull(), ContactEmail: types.StringNull(),
Description: types.StringNull(), Description: types.StringNull(),
IsReverseZone: types.BoolNull(), IsReverseZone: types.BoolNull(),
@ -310,7 +310,7 @@ func TestToCreatePayload(t *testing.T) {
DnsName: types.StringValue("DnsName"), DnsName: types.StringValue("DnsName"),
Acl: types.StringValue("Acl"), Acl: types.StringValue("Acl"),
Description: types.StringValue("Description"), Description: types.StringValue("Description"),
Type: types.StringValue("Type"), Type: types.StringValue(string(dns.CREATEZONEPAYLOADTYPE_PRIMARY)),
ContactEmail: types.StringValue("ContactEmail"), ContactEmail: types.StringValue("ContactEmail"),
RetryTime: types.Int64Value(3), RetryTime: types.Int64Value(3),
RefreshTime: types.Int64Value(4), RefreshTime: types.Int64Value(4),
@ -327,7 +327,7 @@ func TestToCreatePayload(t *testing.T) {
DnsName: utils.Ptr("DnsName"), DnsName: utils.Ptr("DnsName"),
Acl: utils.Ptr("Acl"), Acl: utils.Ptr("Acl"),
Description: utils.Ptr("Description"), Description: utils.Ptr("Description"),
Type: utils.Ptr("Type"), Type: dns.CREATEZONEPAYLOADTYPE_PRIMARY.Ptr(),
ContactEmail: utils.Ptr("ContactEmail"), ContactEmail: utils.Ptr("ContactEmail"),
Primaries: &[]string{"primary"}, Primaries: &[]string{"primary"},
RetryTime: utils.Ptr(int64(3)), RetryTime: utils.Ptr(int64(3)),
@ -390,7 +390,7 @@ func TestToPayloadUpdate(t *testing.T) {
Acl: types.StringValue("Acl"), Acl: types.StringValue("Acl"),
Active: types.BoolValue(true), Active: types.BoolValue(true),
Description: types.StringValue("Description"), Description: types.StringValue("Description"),
Type: types.StringValue("Type"), Type: types.StringValue(string(dns.ZONETYPE_PRIMARY)),
ContactEmail: types.StringValue("ContactEmail"), ContactEmail: types.StringValue("ContactEmail"),
PrimaryNameServer: types.StringValue("PrimaryNameServer"), PrimaryNameServer: types.StringValue("PrimaryNameServer"),
Primaries: types.ListValueMust(types.StringType, []attr.Value{ Primaries: types.ListValueMust(types.StringType, []attr.Value{

View file

@ -895,7 +895,7 @@ func toListenersPayload(ctx context.Context, model *Model) (*[]loadbalancer.List
payload = append(payload, loadbalancer.Listener{ payload = append(payload, loadbalancer.Listener{
DisplayName: conversion.StringValueToPointer(listenerModel.DisplayName), DisplayName: conversion.StringValueToPointer(listenerModel.DisplayName),
Port: conversion.Int64ValueToPointer(listenerModel.Port), Port: conversion.Int64ValueToPointer(listenerModel.Port),
Protocol: conversion.StringValueToPointer(listenerModel.Protocol), Protocol: loadbalancer.ListenerGetProtocolAttributeType(conversion.StringValueToPointer(listenerModel.Protocol)),
ServerNameIndicators: serverNameIndicatorsPayload, ServerNameIndicators: serverNameIndicatorsPayload,
TargetPool: conversion.StringValueToPointer(listenerModel.TargetPool), TargetPool: conversion.StringValueToPointer(listenerModel.TargetPool),
}) })
@ -946,7 +946,7 @@ func toNetworksPayload(ctx context.Context, model *Model) (*[]loadbalancer.Netwo
networkModel := networksModel[i] networkModel := networksModel[i]
payload = append(payload, loadbalancer.Network{ payload = append(payload, loadbalancer.Network{
NetworkId: conversion.StringValueToPointer(networkModel.NetworkId), NetworkId: conversion.StringValueToPointer(networkModel.NetworkId),
Role: conversion.StringValueToPointer(networkModel.Role), Role: loadbalancer.NetworkGetRoleAttributeType(conversion.StringValueToPointer(networkModel.Role)),
}) })
} }
@ -1212,7 +1212,7 @@ func mapListeners(loadBalancerResp *loadbalancer.LoadBalancer, m *Model) error {
listenerMap := map[string]attr.Value{ listenerMap := map[string]attr.Value{
"display_name": types.StringPointerValue(listenerResp.DisplayName), "display_name": types.StringPointerValue(listenerResp.DisplayName),
"port": types.Int64PointerValue(listenerResp.Port), "port": types.Int64PointerValue(listenerResp.Port),
"protocol": types.StringPointerValue(listenerResp.Protocol), "protocol": types.StringValue(string(listenerResp.GetProtocol())),
"target_pool": types.StringPointerValue(listenerResp.TargetPool), "target_pool": types.StringPointerValue(listenerResp.TargetPool),
} }
@ -1283,7 +1283,7 @@ func mapNetworks(loadBalancerResp *loadbalancer.LoadBalancer, m *Model) error {
for i, networkResp := range *loadBalancerResp.Networks { for i, networkResp := range *loadBalancerResp.Networks {
networkMap := map[string]attr.Value{ networkMap := map[string]attr.Value{
"network_id": types.StringPointerValue(networkResp.NetworkId), "network_id": types.StringPointerValue(networkResp.NetworkId),
"role": types.StringPointerValue(networkResp.Role), "role": types.StringValue(string(networkResp.GetRole())),
} }
networkTF, diags := types.ObjectValue(networkTypes, networkMap) networkTF, diags := types.ObjectValue(networkTypes, networkMap)

View file

@ -46,7 +46,7 @@ func TestToCreatePayload(t *testing.T) {
types.ObjectValueMust(listenerTypes, map[string]attr.Value{ types.ObjectValueMust(listenerTypes, map[string]attr.Value{
"display_name": types.StringValue("display_name"), "display_name": types.StringValue("display_name"),
"port": types.Int64Value(80), "port": types.Int64Value(80),
"protocol": types.StringValue("protocol"), "protocol": types.StringValue(string(loadbalancer.LISTENERPROTOCOL_TCP)),
"server_name_indicators": types.ListValueMust(types.ObjectType{AttrTypes: serverNameIndicatorTypes}, []attr.Value{ "server_name_indicators": types.ListValueMust(types.ObjectType{AttrTypes: serverNameIndicatorTypes}, []attr.Value{
types.ObjectValueMust( types.ObjectValueMust(
serverNameIndicatorTypes, serverNameIndicatorTypes,
@ -63,11 +63,11 @@ func TestToCreatePayload(t *testing.T) {
Networks: types.ListValueMust(types.ObjectType{AttrTypes: networkTypes}, []attr.Value{ Networks: types.ListValueMust(types.ObjectType{AttrTypes: networkTypes}, []attr.Value{
types.ObjectValueMust(networkTypes, map[string]attr.Value{ types.ObjectValueMust(networkTypes, map[string]attr.Value{
"network_id": types.StringValue("network_id"), "network_id": types.StringValue("network_id"),
"role": types.StringValue("role"), "role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
}), }),
types.ObjectValueMust(networkTypes, map[string]attr.Value{ types.ObjectValueMust(networkTypes, map[string]attr.Value{
"network_id": types.StringValue("network_id_2"), "network_id": types.StringValue("network_id_2"),
"role": types.StringValue("role_2"), "role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
}), }),
}), }),
Options: types.ObjectValueMust( Options: types.ObjectValueMust(
@ -118,7 +118,7 @@ func TestToCreatePayload(t *testing.T) {
{ {
DisplayName: utils.Ptr("display_name"), DisplayName: utils.Ptr("display_name"),
Port: utils.Ptr(int64(80)), Port: utils.Ptr(int64(80)),
Protocol: utils.Ptr("protocol"), Protocol: loadbalancer.LISTENERPROTOCOL_TCP.Ptr(),
ServerNameIndicators: &[]loadbalancer.ServerNameIndicator{ ServerNameIndicators: &[]loadbalancer.ServerNameIndicator{
{ {
Name: utils.Ptr("domain.com"), Name: utils.Ptr("domain.com"),
@ -131,11 +131,11 @@ func TestToCreatePayload(t *testing.T) {
Networks: &[]loadbalancer.Network{ Networks: &[]loadbalancer.Network{
{ {
NetworkId: utils.Ptr("network_id"), NetworkId: utils.Ptr("network_id"),
Role: utils.Ptr("role"), Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
}, },
{ {
NetworkId: utils.Ptr("network_id_2"), NetworkId: utils.Ptr("network_id_2"),
Role: utils.Ptr("role_2"), Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
}, },
}, },
Options: &loadbalancer.LoadBalancerOptions{ Options: &loadbalancer.LoadBalancerOptions{
@ -355,7 +355,7 @@ func TestMapFields(t *testing.T) {
{ {
DisplayName: utils.Ptr("display_name"), DisplayName: utils.Ptr("display_name"),
Port: utils.Ptr(int64(80)), Port: utils.Ptr(int64(80)),
Protocol: utils.Ptr("protocol"), Protocol: loadbalancer.LISTENERPROTOCOL_TCP.Ptr(),
ServerNameIndicators: &[]loadbalancer.ServerNameIndicator{ ServerNameIndicators: &[]loadbalancer.ServerNameIndicator{
{ {
Name: utils.Ptr("domain.com"), Name: utils.Ptr("domain.com"),
@ -368,11 +368,11 @@ func TestMapFields(t *testing.T) {
Networks: utils.Ptr([]loadbalancer.Network{ Networks: utils.Ptr([]loadbalancer.Network{
{ {
NetworkId: utils.Ptr("network_id"), NetworkId: utils.Ptr("network_id"),
Role: utils.Ptr("role"), Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
}, },
{ {
NetworkId: utils.Ptr("network_id_2"), NetworkId: utils.Ptr("network_id_2"),
Role: utils.Ptr("role_2"), Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
}, },
}), }),
Options: utils.Ptr(loadbalancer.LoadBalancerOptions{ Options: utils.Ptr(loadbalancer.LoadBalancerOptions{
@ -421,7 +421,7 @@ func TestMapFields(t *testing.T) {
types.ObjectValueMust(listenerTypes, map[string]attr.Value{ types.ObjectValueMust(listenerTypes, map[string]attr.Value{
"display_name": types.StringValue("display_name"), "display_name": types.StringValue("display_name"),
"port": types.Int64Value(80), "port": types.Int64Value(80),
"protocol": types.StringValue("protocol"), "protocol": types.StringValue(string(loadbalancer.LISTENERPROTOCOL_TCP)),
"server_name_indicators": types.ListValueMust(types.ObjectType{AttrTypes: serverNameIndicatorTypes}, []attr.Value{ "server_name_indicators": types.ListValueMust(types.ObjectType{AttrTypes: serverNameIndicatorTypes}, []attr.Value{
types.ObjectValueMust( types.ObjectValueMust(
serverNameIndicatorTypes, serverNameIndicatorTypes,
@ -438,11 +438,11 @@ func TestMapFields(t *testing.T) {
Networks: types.ListValueMust(types.ObjectType{AttrTypes: networkTypes}, []attr.Value{ Networks: types.ListValueMust(types.ObjectType{AttrTypes: networkTypes}, []attr.Value{
types.ObjectValueMust(networkTypes, map[string]attr.Value{ types.ObjectValueMust(networkTypes, map[string]attr.Value{
"network_id": types.StringValue("network_id"), "network_id": types.StringValue("network_id"),
"role": types.StringValue("role"), "role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
}), }),
types.ObjectValueMust(networkTypes, map[string]attr.Value{ types.ObjectValueMust(networkTypes, map[string]attr.Value{
"network_id": types.StringValue("network_id_2"), "network_id": types.StringValue("network_id_2"),
"role": types.StringValue("role_2"), "role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
}), }),
}), }),
Options: types.ObjectValueMust( Options: types.ObjectValueMust(
@ -496,7 +496,7 @@ func TestMapFields(t *testing.T) {
{ {
DisplayName: utils.Ptr("display_name"), DisplayName: utils.Ptr("display_name"),
Port: utils.Ptr(int64(80)), Port: utils.Ptr(int64(80)),
Protocol: utils.Ptr("protocol"), Protocol: loadbalancer.LISTENERPROTOCOL_TCP.Ptr(),
ServerNameIndicators: &[]loadbalancer.ServerNameIndicator{ ServerNameIndicators: &[]loadbalancer.ServerNameIndicator{
{ {
Name: utils.Ptr("domain.com"), Name: utils.Ptr("domain.com"),
@ -509,11 +509,11 @@ func TestMapFields(t *testing.T) {
Networks: utils.Ptr([]loadbalancer.Network{ Networks: utils.Ptr([]loadbalancer.Network{
{ {
NetworkId: utils.Ptr("network_id"), NetworkId: utils.Ptr("network_id"),
Role: utils.Ptr("role"), Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
}, },
{ {
NetworkId: utils.Ptr("network_id_2"), NetworkId: utils.Ptr("network_id_2"),
Role: utils.Ptr("role_2"), Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
}, },
}), }),
Options: utils.Ptr(loadbalancer.LoadBalancerOptions{ Options: utils.Ptr(loadbalancer.LoadBalancerOptions{
@ -565,7 +565,7 @@ func TestMapFields(t *testing.T) {
types.ObjectValueMust(listenerTypes, map[string]attr.Value{ types.ObjectValueMust(listenerTypes, map[string]attr.Value{
"display_name": types.StringValue("display_name"), "display_name": types.StringValue("display_name"),
"port": types.Int64Value(80), "port": types.Int64Value(80),
"protocol": types.StringValue("protocol"), "protocol": types.StringValue(string(loadbalancer.LISTENERPROTOCOL_TCP)),
"server_name_indicators": types.ListValueMust(types.ObjectType{AttrTypes: serverNameIndicatorTypes}, []attr.Value{ "server_name_indicators": types.ListValueMust(types.ObjectType{AttrTypes: serverNameIndicatorTypes}, []attr.Value{
types.ObjectValueMust( types.ObjectValueMust(
serverNameIndicatorTypes, serverNameIndicatorTypes,
@ -582,11 +582,11 @@ func TestMapFields(t *testing.T) {
Networks: types.ListValueMust(types.ObjectType{AttrTypes: networkTypes}, []attr.Value{ Networks: types.ListValueMust(types.ObjectType{AttrTypes: networkTypes}, []attr.Value{
types.ObjectValueMust(networkTypes, map[string]attr.Value{ types.ObjectValueMust(networkTypes, map[string]attr.Value{
"network_id": types.StringValue("network_id"), "network_id": types.StringValue("network_id"),
"role": types.StringValue("role"), "role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
}), }),
types.ObjectValueMust(networkTypes, map[string]attr.Value{ types.ObjectValueMust(networkTypes, map[string]attr.Value{
"network_id": types.StringValue("network_id_2"), "network_id": types.StringValue("network_id_2"),
"role": types.StringValue("role_2"), "role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
}), }),
}), }),
Options: types.ObjectValueMust( Options: types.ObjectValueMust(

View file

@ -474,12 +474,12 @@ func testAccCheckLogMeDestroy(s *terraform.State) error {
} }
func checkInstanceDeleteSuccess(i *logme.Instance) bool { func checkInstanceDeleteSuccess(i *logme.Instance) bool {
if *i.LastOperation.Type != wait.InstanceOperationTypeDelete { if *i.LastOperation.Type != logme.INSTANCELASTOPERATIONTYPE_DELETE {
return false return false
} }
if *i.LastOperation.Type == wait.InstanceOperationTypeDelete { if *i.LastOperation.Type == logme.INSTANCELASTOPERATIONTYPE_DELETE {
if *i.LastOperation.State != wait.InstanceOperationStateSucceeded { if *i.LastOperation.State != logme.INSTANCELASTOPERATIONSTATE_SUCCEEDED {
return false return false
} else if strings.Contains(*i.LastOperation.Description, "DeleteFailed") || strings.Contains(*i.LastOperation.Description, "failed") { } else if strings.Contains(*i.LastOperation.Description, "DeleteFailed") || strings.Contains(*i.LastOperation.Description, "failed") {
return false return false

View file

@ -461,12 +461,12 @@ func testAccCheckMariaDBDestroy(s *terraform.State) error {
} }
func checkInstanceDeleteSuccess(i *mariadb.Instance) bool { func checkInstanceDeleteSuccess(i *mariadb.Instance) bool {
if *i.LastOperation.Type != wait.InstanceOperationTypeDelete { if *i.LastOperation.Type != mariadb.INSTANCELASTOPERATIONTYPE_DELETE {
return false return false
} }
if *i.LastOperation.Type == wait.InstanceOperationTypeDelete { if *i.LastOperation.Type == mariadb.INSTANCELASTOPERATIONTYPE_DELETE {
if *i.LastOperation.State != wait.InstanceOperationStateSucceeded { if *i.LastOperation.State != mariadb.INSTANCELASTOPERATIONSTATE_SUCCEEDED {
return false return false
} else if strings.Contains(*i.LastOperation.Description, "DeleteFailed") || strings.Contains(*i.LastOperation.Description, "failed") { } else if strings.Contains(*i.LastOperation.Description, "DeleteFailed") || strings.Contains(*i.LastOperation.Description, "failed") {
return false return false

View file

@ -565,7 +565,7 @@ func mapCreateResponse(tokenCreateResp *modelserving.CreateTokenResponse, waitRe
) )
model.TokenId = types.StringPointerValue(token.Id) model.TokenId = types.StringPointerValue(token.Id)
model.Name = types.StringPointerValue(token.Name) model.Name = types.StringPointerValue(token.Name)
model.State = types.StringPointerValue(waitResp.Token.State) model.State = types.StringValue(string(waitResp.Token.GetState()))
model.ValidUntil = validUntil model.ValidUntil = validUntil
model.Token = types.StringPointerValue(token.Content) model.Token = types.StringPointerValue(token.Content)
model.Description = types.StringPointerValue(token.Description) model.Description = types.StringPointerValue(token.Description)
@ -595,7 +595,7 @@ func mapGetResponse(tokenGetResp *modelserving.GetTokenResponse, model *Model) e
model.Id = types.StringValue(strings.Join(idParts, core.Separator)) model.Id = types.StringValue(strings.Join(idParts, core.Separator))
model.TokenId = types.StringPointerValue(tokenGetResp.Token.Id) model.TokenId = types.StringPointerValue(tokenGetResp.Token.Id)
model.Name = types.StringPointerValue(tokenGetResp.Token.Name) model.Name = types.StringPointerValue(tokenGetResp.Token.Name)
model.State = types.StringPointerValue(tokenGetResp.Token.State) model.State = types.StringValue(string(tokenGetResp.Token.GetState()))
model.ValidUntil = validUntil model.ValidUntil = validUntil
model.Description = types.StringPointerValue(tokenGetResp.Token.Description) model.Description = types.StringPointerValue(tokenGetResp.Token.Description)

View file

@ -58,7 +58,7 @@ func TestMapGetTokenFields(t *testing.T) {
ValidUntil: utils.Ptr( ValidUntil: utils.Ptr(
time.Date(2099, 1, 1, 0, 0, 0, 0, time.UTC), time.Date(2099, 1, 1, 0, 0, 0, 0, time.UTC),
), ),
State: utils.Ptr("active"), State: modelserving.TOKENSTATE_ACTIVE.Ptr(),
Name: utils.Ptr("name"), Name: utils.Ptr("name"),
Description: utils.Ptr("desc"), Description: utils.Ptr("desc"),
Region: utils.Ptr("eu01"), Region: utils.Ptr("eu01"),
@ -71,7 +71,7 @@ func TestMapGetTokenFields(t *testing.T) {
TokenId: types.StringValue("tid"), TokenId: types.StringValue("tid"),
Name: types.StringValue("name"), Name: types.StringValue("name"),
Description: types.StringValue("desc"), Description: types.StringValue("desc"),
State: types.StringValue("active"), State: types.StringValue(string(modelserving.TOKENSTATE_ACTIVE)),
ValidUntil: types.StringValue("2099-01-01T00:00:00Z"), ValidUntil: types.StringValue("2099-01-01T00:00:00Z"),
RotateWhenChanged: types.MapNull(types.StringType), RotateWhenChanged: types.MapNull(types.StringType),
}, },
@ -153,7 +153,7 @@ func TestMapCreateTokenFields(t *testing.T) {
ValidUntil: utils.Ptr( ValidUntil: utils.Ptr(
time.Date(2099, 1, 1, 0, 0, 0, 0, time.UTC), time.Date(2099, 1, 1, 0, 0, 0, 0, time.UTC),
), ),
State: utils.Ptr("active"), State: modelserving.TOKENCREATEDSTATE_ACTIVE.Ptr(),
Name: utils.Ptr("name"), Name: utils.Ptr("name"),
Description: utils.Ptr("desc"), Description: utils.Ptr("desc"),
Region: utils.Ptr("eu01"), Region: utils.Ptr("eu01"),
@ -178,7 +178,7 @@ func TestMapCreateTokenFields(t *testing.T) {
ValidUntil: utils.Ptr( ValidUntil: utils.Ptr(
time.Date(2099, 1, 1, 0, 0, 0, 0, time.UTC), time.Date(2099, 1, 1, 0, 0, 0, 0, time.UTC),
), ),
State: utils.Ptr("active"), State: modelserving.TOKENCREATEDSTATE_ACTIVE.Ptr(),
Name: utils.Ptr("name"), Name: utils.Ptr("name"),
Description: utils.Ptr("desc"), Description: utils.Ptr("desc"),
Region: utils.Ptr("eu01"), Region: utils.Ptr("eu01"),
@ -187,7 +187,7 @@ func TestMapCreateTokenFields(t *testing.T) {
}, },
inputGetTokenResponse: &modelserving.GetTokenResponse{ inputGetTokenResponse: &modelserving.GetTokenResponse{
Token: &modelserving.Token{ Token: &modelserving.Token{
State: utils.Ptr("active"), State: modelserving.TOKENSTATE_ACTIVE.Ptr(),
}, },
}, },
expected: Model{ expected: Model{
@ -197,7 +197,7 @@ func TestMapCreateTokenFields(t *testing.T) {
TokenId: types.StringValue("tid"), TokenId: types.StringValue("tid"),
Name: types.StringValue("name"), Name: types.StringValue("name"),
Description: types.StringValue("desc"), Description: types.StringValue("desc"),
State: types.StringValue("active"), State: types.StringValue(string(modelserving.TOKENSTATE_ACTIVE)),
ValidUntil: types.StringValue("2099-01-01T00:00:00Z"), ValidUntil: types.StringValue("2099-01-01T00:00:00Z"),
Token: types.StringValue("content"), Token: types.StringValue("content"),
RotateWhenChanged: types.MapNull(types.StringType), RotateWhenChanged: types.MapNull(types.StringType),

View file

@ -104,7 +104,7 @@ func TestMapFields(t *testing.T) {
Id: utils.Ptr("iid"), Id: utils.Ptr("iid"),
Name: utils.Ptr("name"), Name: utils.Ptr("name"),
Replicas: utils.Ptr(int64(56)), Replicas: utils.Ptr(int64(56)),
Status: utils.Ptr("status"), Status: mongodbflex.INSTANCESTATUS_READY.Ptr(),
Storage: &mongodbflex.Storage{ Storage: &mongodbflex.Storage{
Class: utils.Ptr("class"), Class: utils.Ptr("class"),
Size: utils.Ptr(int64(78)), Size: utils.Ptr(int64(78)),
@ -177,7 +177,7 @@ func TestMapFields(t *testing.T) {
Id: utils.Ptr("iid"), Id: utils.Ptr("iid"),
Name: utils.Ptr("name"), Name: utils.Ptr("name"),
Replicas: utils.Ptr(int64(56)), Replicas: utils.Ptr(int64(56)),
Status: utils.Ptr("status"), Status: mongodbflex.INSTANCESTATUS_READY.Ptr(),
Storage: nil, Storage: nil,
Options: &map[string]string{ Options: &map[string]string{
"type": "type", "type": "type",
@ -260,7 +260,7 @@ func TestMapFields(t *testing.T) {
Id: utils.Ptr("iid"), Id: utils.Ptr("iid"),
Name: utils.Ptr("name"), Name: utils.Ptr("name"),
Replicas: utils.Ptr(int64(56)), Replicas: utils.Ptr(int64(56)),
Status: utils.Ptr("status"), Status: mongodbflex.INSTANCESTATUS_READY.Ptr(),
Storage: nil, Storage: nil,
Options: &map[string]string{ Options: &map[string]string{
"type": "type", "type": "type",

View file

@ -15,7 +15,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/stackitcloud/stackit-sdk-go/services/observability" "github.com/stackitcloud/stackit-sdk-go/services/observability"
"github.com/stackitcloud/stackit-sdk-go/services/observability/wait"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core" "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/utils" "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/utils"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate" "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
@ -379,7 +378,7 @@ func (d *instanceDataSource) Read(ctx context.Context, req datasource.ReadReques
resp.State.RemoveResource(ctx) resp.State.RemoveResource(ctx)
return return
} }
if instanceResp != nil && instanceResp.Status != nil && *instanceResp.Status == wait.DeleteSuccess { if instanceResp != nil && instanceResp.Status != nil && *instanceResp.Status == observability.GETINSTANCERESPONSESTATUS_DELETE_SUCCEEDED {
resp.State.RemoveResource(ctx) resp.State.RemoveResource(ctx)
core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading instance", "Instance was deleted successfully") core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading instance", "Instance was deleted successfully")
return return

View file

@ -964,7 +964,7 @@ func (r *instanceResource) Read(ctx context.Context, req resource.ReadRequest, r
core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading instance", fmt.Sprintf("Calling API: %v", err)) core.LogAndAddError(ctx, &resp.Diagnostics, "Error reading instance", fmt.Sprintf("Calling API: %v", err))
return return
} }
if instanceResp != nil && instanceResp.Status != nil && *instanceResp.Status == wait.DeleteSuccess { if instanceResp != nil && instanceResp.Status != nil && *instanceResp.Status == observability.GETINSTANCERESPONSESTATUS_DELETE_SUCCEEDED {
resp.State.RemoveResource(ctx) resp.State.RemoveResource(ctx)
return return
} }

View file

@ -1018,7 +1018,7 @@ func testAccCheckObservabilityDestroy(s *terraform.State) error {
instances := *instancesResp.Instances instances := *instancesResp.Instances
for i := range instances { for i := range instances {
if utils.Contains(instancesToDestroy, *instances[i].Id) { if utils.Contains(instancesToDestroy, *instances[i].Id) {
if *instances[i].Status != wait.DeleteSuccess { if *instances[i].Status != observability.PROJECTINSTANCEFULLSTATUS_DELETE_SUCCEEDED {
_, err := client.DeleteInstanceExecute(ctx, testutil.ProjectId, *instances[i].Id) _, err := client.DeleteInstanceExecute(ctx, testutil.ProjectId, *instances[i].Id)
if err != nil { if err != nil {
return fmt.Errorf("destroying instance %s during CheckDestroy: %w", *instances[i].Id, err) return fmt.Errorf("destroying instance %s during CheckDestroy: %w", *instances[i].Id, err)

View file

@ -37,7 +37,7 @@ import (
) )
const ( const (
DefaultScheme = "https" // API default is "http" DefaultScheme = observability.CREATESCRAPECONFIGPAYLOADSCHEME_HTTP // API default is "http"
DefaultScrapeInterval = "5m" DefaultScrapeInterval = "5m"
DefaultScrapeTimeout = "2m" DefaultScrapeTimeout = "2m"
DefaultSampleLimit = int64(5000) DefaultSampleLimit = int64(5000)
@ -187,7 +187,7 @@ func (r *scrapeConfigResource) Schema(_ context.Context, _ resource.SchemaReques
Description: "Specifies the http scheme. Defaults to `https`.", Description: "Specifies the http scheme. Defaults to `https`.",
Optional: true, Optional: true,
Computed: true, Computed: true,
Default: stringdefault.StaticString(DefaultScheme), Default: stringdefault.StaticString(string(DefaultScheme)),
}, },
"scrape_interval": schema.StringAttribute{ "scrape_interval": schema.StringAttribute{
Description: "Specifies the scrape interval as duration string. Defaults to `5m`.", Description: "Specifies the scrape interval as duration string. Defaults to `5m`.",
@ -556,7 +556,7 @@ func mapFields(ctx context.Context, sc *observability.Job, model *Model) error {
model.Name = types.StringValue(scName) model.Name = types.StringValue(scName)
model.MetricsPath = types.StringPointerValue(sc.MetricsPath) model.MetricsPath = types.StringPointerValue(sc.MetricsPath)
model.Scheme = types.StringPointerValue(sc.Scheme) model.Scheme = types.StringValue(string(sc.GetScheme()))
model.ScrapeInterval = types.StringPointerValue(sc.ScrapeInterval) model.ScrapeInterval = types.StringPointerValue(sc.ScrapeInterval)
model.ScrapeTimeout = types.StringPointerValue(sc.ScrapeTimeout) model.ScrapeTimeout = types.StringPointerValue(sc.ScrapeTimeout)
model.SampleLimit = types.Int64PointerValue(sc.SampleLimit) model.SampleLimit = types.Int64PointerValue(sc.SampleLimit)
@ -695,7 +695,7 @@ func toCreatePayload(ctx context.Context, model *Model, saml2Model *saml2Model,
ScrapeTimeout: conversion.StringValueToPointer(model.ScrapeTimeout), ScrapeTimeout: conversion.StringValueToPointer(model.ScrapeTimeout),
// potentially lossy conversion, depending on the allowed range for sample_limit // potentially lossy conversion, depending on the allowed range for sample_limit
SampleLimit: utils.Ptr(float64(model.SampleLimit.ValueInt64())), SampleLimit: utils.Ptr(float64(model.SampleLimit.ValueInt64())),
Scheme: conversion.StringValueToPointer(model.Scheme), Scheme: observability.CreateScrapeConfigPayloadGetSchemeAttributeType(conversion.StringValueToPointer(model.Scheme)),
} }
setDefaultsCreateScrapeConfig(&sc, model, saml2Model) setDefaultsCreateScrapeConfig(&sc, model, saml2Model)
@ -747,7 +747,7 @@ func setDefaultsCreateScrapeConfig(sc *observability.CreateScrapeConfigPayload,
return return
} }
if model.Scheme.IsNull() || model.Scheme.IsUnknown() { if model.Scheme.IsNull() || model.Scheme.IsUnknown() {
sc.Scheme = utils.Ptr(DefaultScheme) sc.Scheme = DefaultScheme.Ptr()
} }
if model.ScrapeInterval.IsNull() || model.ScrapeInterval.IsUnknown() { if model.ScrapeInterval.IsNull() || model.ScrapeInterval.IsUnknown() {
sc.ScrapeInterval = utils.Ptr(DefaultScrapeInterval) sc.ScrapeInterval = utils.Ptr(DefaultScrapeInterval)
@ -784,7 +784,7 @@ func toUpdatePayload(ctx context.Context, model *Model, saml2Model *saml2Model,
ScrapeTimeout: conversion.StringValueToPointer(model.ScrapeTimeout), ScrapeTimeout: conversion.StringValueToPointer(model.ScrapeTimeout),
// potentially lossy conversion, depending on the allowed range for sample_limit // potentially lossy conversion, depending on the allowed range for sample_limit
SampleLimit: utils.Ptr(float64(model.SampleLimit.ValueInt64())), SampleLimit: utils.Ptr(float64(model.SampleLimit.ValueInt64())),
Scheme: conversion.StringValueToPointer(model.Scheme), Scheme: observability.UpdateScrapeConfigPayloadGetSchemeAttributeType(conversion.StringValueToPointer(model.Scheme)),
} }
setDefaultsUpdateScrapeConfig(&sc, model) setDefaultsUpdateScrapeConfig(&sc, model)
@ -836,7 +836,7 @@ func setDefaultsUpdateScrapeConfig(sc *observability.UpdateScrapeConfigPayload,
return return
} }
if model.Scheme.IsNull() || model.Scheme.IsUnknown() { if model.Scheme.IsNull() || model.Scheme.IsUnknown() {
sc.Scheme = utils.Ptr(DefaultScheme) sc.Scheme = observability.UpdateScrapeConfigPayloadGetSchemeAttributeType(DefaultScheme.Ptr())
} }
if model.ScrapeInterval.IsNull() || model.ScrapeInterval.IsUnknown() { if model.ScrapeInterval.IsNull() || model.ScrapeInterval.IsUnknown() {
sc.ScrapeInterval = utils.Ptr(DefaultScrapeInterval) sc.ScrapeInterval = utils.Ptr(DefaultScrapeInterval)

View file

@ -29,7 +29,7 @@ func TestMapFields(t *testing.T) {
InstanceId: types.StringValue("iid"), InstanceId: types.StringValue("iid"),
Name: types.StringValue("name"), Name: types.StringValue("name"),
MetricsPath: types.StringNull(), MetricsPath: types.StringNull(),
Scheme: types.StringNull(), Scheme: types.StringValue(""),
ScrapeInterval: types.StringNull(), ScrapeInterval: types.StringNull(),
ScrapeTimeout: types.StringNull(), ScrapeTimeout: types.StringNull(),
SAML2: types.ObjectNull(saml2Types), SAML2: types.ObjectNull(saml2Types),
@ -48,7 +48,7 @@ func TestMapFields(t *testing.T) {
Username: utils.Ptr("u"), Username: utils.Ptr("u"),
}, },
Params: &map[string][]string{"saml2": {"disabled"}, "x": {"y", "z"}}, Params: &map[string][]string{"saml2": {"disabled"}, "x": {"y", "z"}},
Scheme: utils.Ptr("scheme"), Scheme: observability.JOBSCHEME_HTTP.Ptr(),
ScrapeInterval: utils.Ptr("1"), ScrapeInterval: utils.Ptr("1"),
ScrapeTimeout: utils.Ptr("2"), ScrapeTimeout: utils.Ptr("2"),
SampleLimit: utils.Ptr(int64(17)), SampleLimit: utils.Ptr(int64(17)),
@ -73,7 +73,7 @@ func TestMapFields(t *testing.T) {
InstanceId: types.StringValue("iid"), InstanceId: types.StringValue("iid"),
Name: types.StringValue("name"), Name: types.StringValue("name"),
MetricsPath: types.StringValue("/m"), MetricsPath: types.StringValue("/m"),
Scheme: types.StringValue("scheme"), Scheme: types.StringValue(string(observability.JOBSCHEME_HTTP)),
ScrapeInterval: types.StringValue("1"), ScrapeInterval: types.StringValue("1"),
ScrapeTimeout: types.StringValue("2"), ScrapeTimeout: types.StringValue("2"),
SampleLimit: types.Int64Value(17), SampleLimit: types.Int64Value(17),
@ -163,7 +163,7 @@ func TestToCreatePayload(t *testing.T) {
&observability.CreateScrapeConfigPayload{ &observability.CreateScrapeConfigPayload{
MetricsPath: utils.Ptr("/metrics"), MetricsPath: utils.Ptr("/metrics"),
// Defaults // Defaults
Scheme: utils.Ptr("https"), Scheme: observability.CREATESCRAPECONFIGPAYLOADSCHEME_HTTP.Ptr(),
ScrapeInterval: utils.Ptr("5m"), ScrapeInterval: utils.Ptr("5m"),
ScrapeTimeout: utils.Ptr("2m"), ScrapeTimeout: utils.Ptr("2m"),
SampleLimit: utils.Ptr(float64(5000)), SampleLimit: utils.Ptr(float64(5000)),
@ -188,7 +188,7 @@ func TestToCreatePayload(t *testing.T) {
JobName: utils.Ptr("Name"), JobName: utils.Ptr("Name"),
Params: &map[string]any{"saml2": []string{"disabled"}}, Params: &map[string]any{"saml2": []string{"disabled"}},
// Defaults // Defaults
Scheme: utils.Ptr("https"), Scheme: observability.CREATESCRAPECONFIGPAYLOADSCHEME_HTTP.Ptr(),
ScrapeInterval: utils.Ptr("5m"), ScrapeInterval: utils.Ptr("5m"),
ScrapeTimeout: utils.Ptr("2m"), ScrapeTimeout: utils.Ptr("2m"),
SampleLimit: utils.Ptr(float64(5000)), SampleLimit: utils.Ptr(float64(5000)),
@ -212,7 +212,7 @@ func TestToCreatePayload(t *testing.T) {
JobName: utils.Ptr("Name"), JobName: utils.Ptr("Name"),
Params: &map[string]any{"saml2": []string{"enabled"}}, Params: &map[string]any{"saml2": []string{"enabled"}},
// Defaults // Defaults
Scheme: utils.Ptr("https"), Scheme: observability.CREATESCRAPECONFIGPAYLOADSCHEME_HTTP.Ptr(),
ScrapeInterval: utils.Ptr("5m"), ScrapeInterval: utils.Ptr("5m"),
ScrapeTimeout: utils.Ptr("2m"), ScrapeTimeout: utils.Ptr("2m"),
SampleLimit: utils.Ptr(float64(5000)), SampleLimit: utils.Ptr(float64(5000)),
@ -240,7 +240,7 @@ func TestToCreatePayload(t *testing.T) {
Password: utils.Ptr("p"), Password: utils.Ptr("p"),
}, },
// Defaults // Defaults
Scheme: utils.Ptr("https"), Scheme: observability.CREATESCRAPECONFIGPAYLOADSCHEME_HTTP.Ptr(),
ScrapeInterval: utils.Ptr("5m"), ScrapeInterval: utils.Ptr("5m"),
ScrapeTimeout: utils.Ptr("2m"), ScrapeTimeout: utils.Ptr("2m"),
SampleLimit: utils.Ptr(float64(5000)), SampleLimit: utils.Ptr(float64(5000)),
@ -289,7 +289,7 @@ func TestToCreatePayload(t *testing.T) {
}, },
}, },
// Defaults // Defaults
Scheme: utils.Ptr("https"), Scheme: observability.CREATESCRAPECONFIGPAYLOADSCHEME_HTTP.Ptr(),
ScrapeInterval: utils.Ptr("5m"), ScrapeInterval: utils.Ptr("5m"),
ScrapeTimeout: utils.Ptr("2m"), ScrapeTimeout: utils.Ptr("2m"),
SampleLimit: utils.Ptr(float64(5000)), SampleLimit: utils.Ptr(float64(5000)),
@ -347,7 +347,7 @@ func TestToUpdatePayload(t *testing.T) {
&observability.UpdateScrapeConfigPayload{ &observability.UpdateScrapeConfigPayload{
MetricsPath: utils.Ptr("/metrics"), MetricsPath: utils.Ptr("/metrics"),
// Defaults // Defaults
Scheme: utils.Ptr("https"), Scheme: observability.UPDATESCRAPECONFIGPAYLOADSCHEME_HTTP.Ptr(),
ScrapeInterval: utils.Ptr("5m"), ScrapeInterval: utils.Ptr("5m"),
ScrapeTimeout: utils.Ptr("2m"), ScrapeTimeout: utils.Ptr("2m"),
SampleLimit: utils.Ptr(float64(5000)), SampleLimit: utils.Ptr(float64(5000)),
@ -369,7 +369,7 @@ func TestToUpdatePayload(t *testing.T) {
&observability.UpdateScrapeConfigPayload{ &observability.UpdateScrapeConfigPayload{
MetricsPath: utils.Ptr("/metrics"), MetricsPath: utils.Ptr("/metrics"),
// Defaults // Defaults
Scheme: utils.Ptr("http"), Scheme: observability.UPDATESCRAPECONFIGPAYLOADSCHEME_HTTP.Ptr(),
ScrapeInterval: utils.Ptr("5m"), ScrapeInterval: utils.Ptr("5m"),
ScrapeTimeout: utils.Ptr("2m"), ScrapeTimeout: utils.Ptr("2m"),
SampleLimit: utils.Ptr(float64(5000)), SampleLimit: utils.Ptr(float64(5000)),
@ -392,7 +392,7 @@ func TestToUpdatePayload(t *testing.T) {
&observability.UpdateScrapeConfigPayload{ &observability.UpdateScrapeConfigPayload{
MetricsPath: utils.Ptr("/metrics"), MetricsPath: utils.Ptr("/metrics"),
// Defaults // Defaults
Scheme: utils.Ptr("http"), Scheme: observability.UPDATESCRAPECONFIGPAYLOADSCHEME_HTTP.Ptr(),
ScrapeInterval: utils.Ptr("5m"), ScrapeInterval: utils.Ptr("5m"),
ScrapeTimeout: utils.Ptr("2m"), ScrapeTimeout: utils.Ptr("2m"),
SampleLimit: utils.Ptr(float64(5000)), SampleLimit: utils.Ptr(float64(5000)),
@ -420,7 +420,7 @@ func TestToUpdatePayload(t *testing.T) {
Password: utils.Ptr("p"), Password: utils.Ptr("p"),
}, },
// Defaults // Defaults
Scheme: utils.Ptr("https"), Scheme: observability.UPDATESCRAPECONFIGPAYLOADSCHEME_HTTP.Ptr(),
ScrapeInterval: utils.Ptr("5m"), ScrapeInterval: utils.Ptr("5m"),
ScrapeTimeout: utils.Ptr("2m"), ScrapeTimeout: utils.Ptr("2m"),
SampleLimit: utils.Ptr(float64(5000)), SampleLimit: utils.Ptr(float64(5000)),
@ -467,7 +467,7 @@ func TestToUpdatePayload(t *testing.T) {
}, },
}, },
// Defaults // Defaults
Scheme: utils.Ptr("https"), Scheme: observability.UPDATESCRAPECONFIGPAYLOADSCHEME_HTTP.Ptr(),
ScrapeInterval: utils.Ptr("5m"), ScrapeInterval: utils.Ptr("5m"),
ScrapeTimeout: utils.Ptr("2m"), ScrapeTimeout: utils.Ptr("2m"),
SampleLimit: utils.Ptr(float64(5000)), SampleLimit: utils.Ptr(float64(5000)),

View file

@ -730,14 +730,14 @@ func toInstanceParams(parameters *parametersModel) (*opensearch.InstanceParamete
payloadParams.SgwAcl = conversion.StringValueToPointer(parameters.SgwAcl) payloadParams.SgwAcl = conversion.StringValueToPointer(parameters.SgwAcl)
payloadParams.EnableMonitoring = conversion.BoolValueToPointer(parameters.EnableMonitoring) payloadParams.EnableMonitoring = conversion.BoolValueToPointer(parameters.EnableMonitoring)
payloadParams.Graphite = conversion.StringValueToPointer(parameters.Graphite) payloadParams.Graphite = conversion.StringValueToPointer(parameters.Graphite)
payloadParams.JavaGarbageCollector = conversion.StringValueToPointer(parameters.JavaGarbageCollector) payloadParams.JavaGarbageCollector = opensearch.InstanceParametersGetJavaGarbageCollectorAttributeType(conversion.StringValueToPointer(parameters.JavaGarbageCollector))
payloadParams.JavaHeapspace = conversion.Int64ValueToPointer(parameters.JavaHeapspace) payloadParams.JavaHeapspace = conversion.Int64ValueToPointer(parameters.JavaHeapspace)
payloadParams.JavaMaxmetaspace = conversion.Int64ValueToPointer(parameters.JavaMaxmetaspace) payloadParams.JavaMaxmetaspace = conversion.Int64ValueToPointer(parameters.JavaMaxmetaspace)
payloadParams.MaxDiskThreshold = conversion.Int64ValueToPointer(parameters.MaxDiskThreshold) payloadParams.MaxDiskThreshold = conversion.Int64ValueToPointer(parameters.MaxDiskThreshold)
payloadParams.MetricsFrequency = conversion.Int64ValueToPointer(parameters.MetricsFrequency) payloadParams.MetricsFrequency = conversion.Int64ValueToPointer(parameters.MetricsFrequency)
payloadParams.MetricsPrefix = conversion.StringValueToPointer(parameters.MetricsPrefix) payloadParams.MetricsPrefix = conversion.StringValueToPointer(parameters.MetricsPrefix)
payloadParams.MonitoringInstanceId = conversion.StringValueToPointer(parameters.MonitoringInstanceId) payloadParams.MonitoringInstanceId = conversion.StringValueToPointer(parameters.MonitoringInstanceId)
payloadParams.TlsProtocols = conversion.StringValueToPointer(parameters.TlsProtocols) payloadParams.TlsProtocols = opensearch.InstanceParametersGetTlsProtocolsAttributeType(conversion.StringValueToPointer(parameters.TlsProtocols))
var err error var err error
payloadParams.Plugins, err = conversion.StringListToPointer(parameters.Plugins) payloadParams.Plugins, err = conversion.StringListToPointer(parameters.Plugins)

View file

@ -16,7 +16,7 @@ var fixtureModelParameters = types.ObjectValueMust(parametersTypes, map[string]a
"sgw_acl": types.StringValue("acl"), "sgw_acl": types.StringValue("acl"),
"enable_monitoring": types.BoolValue(true), "enable_monitoring": types.BoolValue(true),
"graphite": types.StringValue("graphite"), "graphite": types.StringValue("graphite"),
"java_garbage_collector": types.StringValue("gc"), "java_garbage_collector": types.StringValue(string(opensearch.INSTANCEPARAMETERSJAVA_GARBAGE_COLLECTOR_USE_G1_GC)),
"java_heapspace": types.Int64Value(10), "java_heapspace": types.Int64Value(10),
"java_maxmetaspace": types.Int64Value(10), "java_maxmetaspace": types.Int64Value(10),
"max_disk_threshold": types.Int64Value(10), "max_disk_threshold": types.Int64Value(10),
@ -35,7 +35,7 @@ var fixtureModelParameters = types.ObjectValueMust(parametersTypes, map[string]a
types.StringValue("cipher"), types.StringValue("cipher"),
types.StringValue("cipher2"), types.StringValue("cipher2"),
}), }),
"tls_protocols": types.StringValue("protocol"), "tls_protocols": types.StringValue(string(opensearch.INSTANCEPARAMETERSTLS_PROTOCOLS__2)),
}) })
var fixtureNullModelParameters = types.ObjectValueMust(parametersTypes, map[string]attr.Value{ var fixtureNullModelParameters = types.ObjectValueMust(parametersTypes, map[string]attr.Value{
@ -59,7 +59,7 @@ var fixtureInstanceParameters = opensearch.InstanceParameters{
SgwAcl: utils.Ptr("acl"), SgwAcl: utils.Ptr("acl"),
EnableMonitoring: utils.Ptr(true), EnableMonitoring: utils.Ptr(true),
Graphite: utils.Ptr("graphite"), Graphite: utils.Ptr("graphite"),
JavaGarbageCollector: utils.Ptr("gc"), JavaGarbageCollector: opensearch.INSTANCEPARAMETERSJAVA_GARBAGE_COLLECTOR_USE_G1_GC.Ptr(),
JavaHeapspace: utils.Ptr(int64(10)), JavaHeapspace: utils.Ptr(int64(10)),
JavaMaxmetaspace: utils.Ptr(int64(10)), JavaMaxmetaspace: utils.Ptr(int64(10)),
MaxDiskThreshold: utils.Ptr(int64(10)), MaxDiskThreshold: utils.Ptr(int64(10)),
@ -69,7 +69,7 @@ var fixtureInstanceParameters = opensearch.InstanceParameters{
Plugins: &[]string{"plugin", "plugin2"}, Plugins: &[]string{"plugin", "plugin2"},
Syslog: &[]string{"syslog", "syslog2"}, Syslog: &[]string{"syslog", "syslog2"},
TlsCiphers: &[]string{"cipher", "cipher2"}, TlsCiphers: &[]string{"cipher", "cipher2"},
TlsProtocols: utils.Ptr("protocol"), TlsProtocols: opensearch.INSTANCEPARAMETERSTLS_PROTOCOLS__2.Ptr(),
} }
func TestMapFields(t *testing.T) { func TestMapFields(t *testing.T) {
@ -113,7 +113,7 @@ func TestMapFields(t *testing.T) {
"sgw_acl": "acl", "sgw_acl": "acl",
"enable_monitoring": true, "enable_monitoring": true,
"graphite": "graphite", "graphite": "graphite",
"java_garbage_collector": "gc", "java_garbage_collector": string(opensearch.INSTANCEPARAMETERSJAVA_GARBAGE_COLLECTOR_USE_G1_GC),
"java_heapspace": int64(10), "java_heapspace": int64(10),
"java_maxmetaspace": int64(10), "java_maxmetaspace": int64(10),
"max_disk_threshold": int64(10), "max_disk_threshold": int64(10),
@ -123,7 +123,7 @@ func TestMapFields(t *testing.T) {
"plugins": []string{"plugin", "plugin2"}, "plugins": []string{"plugin", "plugin2"},
"syslog": []string{"syslog", "syslog2"}, "syslog": []string{"syslog", "syslog2"},
"tls-ciphers": []string{"cipher", "cipher2"}, "tls-ciphers": []string{"cipher", "cipher2"},
"tls-protocols": "protocol", "tls-protocols": string(opensearch.INSTANCEPARAMETERSTLS_PROTOCOLS__2),
}, },
}, },
Model{ Model{

View file

@ -289,12 +289,12 @@ func testAccCheckOpenSearchDestroy(s *terraform.State) error {
} }
func checkInstanceDeleteSuccess(i *opensearch.Instance) bool { func checkInstanceDeleteSuccess(i *opensearch.Instance) bool {
if *i.LastOperation.Type != wait.InstanceOperationTypeDelete { if *i.LastOperation.Type != opensearch.INSTANCELASTOPERATIONTYPE_DELETE {
return false return false
} }
if *i.LastOperation.Type == wait.InstanceOperationTypeDelete { if *i.LastOperation.Type == opensearch.INSTANCELASTOPERATIONTYPE_DELETE {
if *i.LastOperation.State != wait.InstanceOperationStateSucceeded { if *i.LastOperation.State != opensearch.INSTANCELASTOPERATIONSTATE_SUCCEEDED {
return false return false
} else if strings.Contains(*i.LastOperation.Description, "DeleteFailed") || strings.Contains(*i.LastOperation.Description, "failed") { } else if strings.Contains(*i.LastOperation.Description, "DeleteFailed") || strings.Contains(*i.LastOperation.Description, "failed") {
return false return false

View file

@ -730,7 +730,7 @@ func toInstanceParams(parameters *parametersModel) (*rabbitmq.InstanceParameters
payloadParams.MetricsFrequency = conversion.Int64ValueToPointer(parameters.MetricsFrequency) payloadParams.MetricsFrequency = conversion.Int64ValueToPointer(parameters.MetricsFrequency)
payloadParams.MetricsPrefix = conversion.StringValueToPointer(parameters.MetricsPrefix) payloadParams.MetricsPrefix = conversion.StringValueToPointer(parameters.MetricsPrefix)
payloadParams.MonitoringInstanceId = conversion.StringValueToPointer(parameters.MonitoringInstanceId) payloadParams.MonitoringInstanceId = conversion.StringValueToPointer(parameters.MonitoringInstanceId)
payloadParams.TlsProtocols = conversion.StringValueToPointer(parameters.TlsProtocols) payloadParams.TlsProtocols = rabbitmq.InstanceParametersGetTlsProtocolsAttributeType(conversion.StringValueToPointer(parameters.TlsProtocols))
var err error var err error
payloadParams.Plugins, err = conversion.StringListToPointer(parameters.Plugins) payloadParams.Plugins, err = conversion.StringListToPointer(parameters.Plugins)

View file

@ -37,7 +37,7 @@ var fixtureModelParameters = types.ObjectValueMust(parametersTypes, map[string]a
types.StringValue("ciphers1"), types.StringValue("ciphers1"),
types.StringValue("ciphers2"), types.StringValue("ciphers2"),
}), }),
"tls_protocols": types.StringValue("protocol1"), "tls_protocols": types.StringValue(string(rabbitmq.INSTANCEPARAMETERSTLS_PROTOCOLS__2)),
}) })
var fixtureInstanceParameters = rabbitmq.InstanceParameters{ var fixtureInstanceParameters = rabbitmq.InstanceParameters{
@ -53,7 +53,7 @@ var fixtureInstanceParameters = rabbitmq.InstanceParameters{
Roles: &[]string{"role1", "role2"}, Roles: &[]string{"role1", "role2"},
Syslog: &[]string{"syslog", "syslog2"}, Syslog: &[]string{"syslog", "syslog2"},
TlsCiphers: &[]string{"ciphers1", "ciphers2"}, TlsCiphers: &[]string{"ciphers1", "ciphers2"},
TlsProtocols: utils.Ptr("protocol1"), TlsProtocols: rabbitmq.INSTANCEPARAMETERSTLS_PROTOCOLS__2.Ptr(),
} }
func TestMapFields(t *testing.T) { func TestMapFields(t *testing.T) {
@ -105,7 +105,7 @@ func TestMapFields(t *testing.T) {
"roles": []string{"role1", "role2"}, "roles": []string{"role1", "role2"},
"syslog": []string{"syslog", "syslog2"}, "syslog": []string{"syslog", "syslog2"},
"tls-ciphers": []string{"ciphers1", "ciphers2"}, "tls-ciphers": []string{"ciphers1", "ciphers2"},
"tls-protocols": "protocol1", "tls-protocols": string(rabbitmq.INSTANCEPARAMETERSTLS_PROTOCOLS__2),
}, },
}, },
Model{ Model{

View file

@ -297,12 +297,12 @@ func testAccCheckRabbitMQDestroy(s *terraform.State) error {
} }
func checkInstanceDeleteSuccess(i *rabbitmq.Instance) bool { func checkInstanceDeleteSuccess(i *rabbitmq.Instance) bool {
if *i.LastOperation.Type != wait.InstanceOperationTypeDelete { if *i.LastOperation.Type != rabbitmq.INSTANCELASTOPERATIONTYPE_DELETE {
return false return false
} }
if *i.LastOperation.Type == wait.InstanceOperationTypeDelete { if *i.LastOperation.Type == rabbitmq.INSTANCELASTOPERATIONTYPE_DELETE {
if *i.LastOperation.State != wait.InstanceOperationStateSucceeded { if *i.LastOperation.State != rabbitmq.INSTANCELASTOPERATIONSTATE_SUCCEEDED {
return false return false
} else if strings.Contains(*i.LastOperation.Description, "DeleteFailed") || strings.Contains(*i.LastOperation.Description, "failed") { } else if strings.Contains(*i.LastOperation.Description, "DeleteFailed") || strings.Contains(*i.LastOperation.Description, "failed") {
return false return false

View file

@ -812,12 +812,12 @@ func toInstanceParams(parameters *parametersModel) (*redis.InstanceParameters, e
payloadParams.EnableMonitoring = conversion.BoolValueToPointer(parameters.EnableMonitoring) payloadParams.EnableMonitoring = conversion.BoolValueToPointer(parameters.EnableMonitoring)
payloadParams.FailoverTimeout = conversion.Int64ValueToPointer(parameters.FailoverTimeout) payloadParams.FailoverTimeout = conversion.Int64ValueToPointer(parameters.FailoverTimeout)
payloadParams.Graphite = conversion.StringValueToPointer(parameters.Graphite) payloadParams.Graphite = conversion.StringValueToPointer(parameters.Graphite)
payloadParams.LazyfreeLazyEviction = conversion.StringValueToPointer(parameters.LazyfreeLazyEviction) payloadParams.LazyfreeLazyEviction = redis.InstanceParametersGetLazyfreeLazyEvictionAttributeType(conversion.StringValueToPointer(parameters.LazyfreeLazyEviction))
payloadParams.LazyfreeLazyExpire = conversion.StringValueToPointer(parameters.LazyfreeLazyExpire) payloadParams.LazyfreeLazyExpire = redis.InstanceParametersGetLazyfreeLazyExpireAttributeType(conversion.StringValueToPointer(parameters.LazyfreeLazyExpire))
payloadParams.LuaTimeLimit = conversion.Int64ValueToPointer(parameters.LuaTimeLimit) payloadParams.LuaTimeLimit = conversion.Int64ValueToPointer(parameters.LuaTimeLimit)
payloadParams.MaxDiskThreshold = conversion.Int64ValueToPointer(parameters.MaxDiskThreshold) payloadParams.MaxDiskThreshold = conversion.Int64ValueToPointer(parameters.MaxDiskThreshold)
payloadParams.Maxclients = conversion.Int64ValueToPointer(parameters.Maxclients) payloadParams.Maxclients = conversion.Int64ValueToPointer(parameters.Maxclients)
payloadParams.MaxmemoryPolicy = conversion.StringValueToPointer(parameters.MaxmemoryPolicy) payloadParams.MaxmemoryPolicy = redis.InstanceParametersGetMaxmemoryPolicyAttributeType(conversion.StringValueToPointer(parameters.MaxmemoryPolicy))
payloadParams.MaxmemorySamples = conversion.Int64ValueToPointer(parameters.MaxmemorySamples) payloadParams.MaxmemorySamples = conversion.Int64ValueToPointer(parameters.MaxmemorySamples)
payloadParams.MetricsFrequency = conversion.Int64ValueToPointer(parameters.MetricsFrequency) payloadParams.MetricsFrequency = conversion.Int64ValueToPointer(parameters.MetricsFrequency)
payloadParams.MetricsPrefix = conversion.StringValueToPointer(parameters.MetricsPrefix) payloadParams.MetricsPrefix = conversion.StringValueToPointer(parameters.MetricsPrefix)
@ -826,7 +826,7 @@ func toInstanceParams(parameters *parametersModel) (*redis.InstanceParameters, e
payloadParams.NotifyKeyspaceEvents = conversion.StringValueToPointer(parameters.NotifyKeyspaceEvents) payloadParams.NotifyKeyspaceEvents = conversion.StringValueToPointer(parameters.NotifyKeyspaceEvents)
payloadParams.Snapshot = conversion.StringValueToPointer(parameters.Snapshot) payloadParams.Snapshot = conversion.StringValueToPointer(parameters.Snapshot)
payloadParams.TlsCiphersuites = conversion.StringValueToPointer(parameters.TlsCiphersuites) payloadParams.TlsCiphersuites = conversion.StringValueToPointer(parameters.TlsCiphersuites)
payloadParams.TlsProtocols = conversion.StringValueToPointer(parameters.TlsProtocols) payloadParams.TlsProtocols = redis.InstanceParametersGetTlsProtocolsAttributeType(conversion.StringValueToPointer(parameters.TlsProtocols))
var err error var err error
payloadParams.Syslog, err = conversion.StringListToPointer(parameters.Syslog) payloadParams.Syslog, err = conversion.StringListToPointer(parameters.Syslog)

View file

@ -18,12 +18,12 @@ var fixtureModelParameters = types.ObjectValueMust(parametersTypes, map[string]a
"enable_monitoring": types.BoolValue(true), "enable_monitoring": types.BoolValue(true),
"failover_timeout": types.Int64Value(10), "failover_timeout": types.Int64Value(10),
"graphite": types.StringValue("1.1.1.1:91"), "graphite": types.StringValue("1.1.1.1:91"),
"lazyfree_lazy_eviction": types.StringValue("lazy_eviction"), "lazyfree_lazy_eviction": types.StringValue(string(redis.INSTANCEPARAMETERSLAZYFREE_LAZY_EVICTION_NO)),
"lazyfree_lazy_expire": types.StringValue("lazy_expire"), "lazyfree_lazy_expire": types.StringValue(string(redis.INSTANCEPARAMETERSLAZYFREE_LAZY_EXPIRE_NO)),
"lua_time_limit": types.Int64Value(10), "lua_time_limit": types.Int64Value(10),
"max_disk_threshold": types.Int64Value(100), "max_disk_threshold": types.Int64Value(100),
"maxclients": types.Int64Value(10), "maxclients": types.Int64Value(10),
"maxmemory_policy": types.StringValue("policy"), "maxmemory_policy": types.StringValue(string(redis.INSTANCEPARAMETERSMAXMEMORY_POLICY_ALLKEYS_LRU)),
"maxmemory_samples": types.Int64Value(10), "maxmemory_samples": types.Int64Value(10),
"metrics_frequency": types.Int64Value(10), "metrics_frequency": types.Int64Value(10),
"metrics_prefix": types.StringValue("prefix"), "metrics_prefix": types.StringValue("prefix"),
@ -40,7 +40,7 @@ var fixtureModelParameters = types.ObjectValueMust(parametersTypes, map[string]a
types.StringValue("ciphers2"), types.StringValue("ciphers2"),
}), }),
"tls_ciphersuites": types.StringValue("ciphersuites"), "tls_ciphersuites": types.StringValue("ciphersuites"),
"tls_protocols": types.StringValue("protocol1"), "tls_protocols": types.StringValue(string(redis.INSTANCEPARAMETERSTLS_PROTOCOLS__2)),
}) })
var fixtureInstanceParameters = redis.InstanceParameters{ var fixtureInstanceParameters = redis.InstanceParameters{
@ -49,12 +49,12 @@ var fixtureInstanceParameters = redis.InstanceParameters{
EnableMonitoring: utils.Ptr(true), EnableMonitoring: utils.Ptr(true),
FailoverTimeout: utils.Ptr(int64(10)), FailoverTimeout: utils.Ptr(int64(10)),
Graphite: utils.Ptr("1.1.1.1:91"), Graphite: utils.Ptr("1.1.1.1:91"),
LazyfreeLazyEviction: utils.Ptr("lazy_eviction"), LazyfreeLazyEviction: redis.INSTANCEPARAMETERSLAZYFREE_LAZY_EVICTION_NO.Ptr(),
LazyfreeLazyExpire: utils.Ptr("lazy_expire"), LazyfreeLazyExpire: redis.INSTANCEPARAMETERSLAZYFREE_LAZY_EXPIRE_NO.Ptr(),
LuaTimeLimit: utils.Ptr(int64(10)), LuaTimeLimit: utils.Ptr(int64(10)),
MaxDiskThreshold: utils.Ptr(int64(100)), MaxDiskThreshold: utils.Ptr(int64(100)),
Maxclients: utils.Ptr(int64(10)), Maxclients: utils.Ptr(int64(10)),
MaxmemoryPolicy: utils.Ptr("policy"), MaxmemoryPolicy: redis.INSTANCEPARAMETERSMAXMEMORY_POLICY_ALLKEYS_LRU.Ptr(),
MaxmemorySamples: utils.Ptr(int64(10)), MaxmemorySamples: utils.Ptr(int64(10)),
MetricsFrequency: utils.Ptr(int64(10)), MetricsFrequency: utils.Ptr(int64(10)),
MetricsPrefix: utils.Ptr("prefix"), MetricsPrefix: utils.Ptr("prefix"),
@ -65,7 +65,7 @@ var fixtureInstanceParameters = redis.InstanceParameters{
Syslog: &[]string{"syslog", "syslog2"}, Syslog: &[]string{"syslog", "syslog2"},
TlsCiphers: &[]string{"ciphers1", "ciphers2"}, TlsCiphers: &[]string{"ciphers1", "ciphers2"},
TlsCiphersuites: utils.Ptr("ciphersuites"), TlsCiphersuites: utils.Ptr("ciphersuites"),
TlsProtocols: utils.Ptr("protocol1"), TlsProtocols: redis.INSTANCEPARAMETERSTLS_PROTOCOLS__2.Ptr(),
} }
func TestMapFields(t *testing.T) { func TestMapFields(t *testing.T) {
@ -110,12 +110,12 @@ func TestMapFields(t *testing.T) {
"enable_monitoring": true, "enable_monitoring": true,
"failover-timeout": int64(10), "failover-timeout": int64(10),
"graphite": "1.1.1.1:91", "graphite": "1.1.1.1:91",
"lazyfree-lazy-eviction": "lazy_eviction", "lazyfree-lazy-eviction": string(redis.INSTANCEPARAMETERSLAZYFREE_LAZY_EVICTION_NO),
"lazyfree-lazy-expire": "lazy_expire", "lazyfree-lazy-expire": string(redis.INSTANCEPARAMETERSLAZYFREE_LAZY_EXPIRE_NO),
"lua-time-limit": int64(10), "lua-time-limit": int64(10),
"max_disk_threshold": int64(100), "max_disk_threshold": int64(100),
"maxclients": int64(10), "maxclients": int64(10),
"maxmemory-policy": "policy", "maxmemory-policy": string(redis.INSTANCEPARAMETERSMAXMEMORY_POLICY_ALLKEYS_LRU),
"maxmemory-samples": int64(10), "maxmemory-samples": int64(10),
"metrics_frequency": int64(10), "metrics_frequency": int64(10),
"metrics_prefix": "prefix", "metrics_prefix": "prefix",
@ -126,7 +126,7 @@ func TestMapFields(t *testing.T) {
"syslog": []string{"syslog", "syslog2"}, "syslog": []string{"syslog", "syslog2"},
"tls-ciphers": []string{"ciphers1", "ciphers2"}, "tls-ciphers": []string{"ciphers1", "ciphers2"},
"tls-ciphersuites": "ciphersuites", "tls-ciphersuites": "ciphersuites",
"tls-protocols": "protocol1", "tls-protocols": string(redis.INSTANCEPARAMETERSTLS_PROTOCOLS__2),
}, },
}, },
Model{ Model{

View file

@ -257,12 +257,12 @@ func TestAccRedisResource(t *testing.T) {
} }
func checkInstanceDeleteSuccess(i *redis.Instance) bool { func checkInstanceDeleteSuccess(i *redis.Instance) bool {
if *i.LastOperation.Type != wait.InstanceOperationTypeDelete { if *i.LastOperation.Type != redis.INSTANCELASTOPERATIONTYPE_DELETE {
return false return false
} }
if *i.LastOperation.Type == wait.InstanceOperationTypeDelete { if *i.LastOperation.Type == redis.INSTANCELASTOPERATIONTYPE_DELETE {
if *i.LastOperation.State != wait.InstanceOperationStateSucceeded { if *i.LastOperation.State != redis.INSTANCELASTOPERATIONSTATE_SUCCEEDED {
return false return false
} else if strings.Contains(*i.LastOperation.Description, "DeleteFailed") || strings.Contains(*i.LastOperation.Description, "failed") { } else if strings.Contains(*i.LastOperation.Description, "DeleteFailed") || strings.Contains(*i.LastOperation.Description, "failed") {
return false return false

View file

@ -896,7 +896,7 @@ func (r *clusterResource) createOrUpdateCluster(ctx context.Context, diags *diag
core.LogAndAddError(ctx, diags, "Error creating/updating cluster", fmt.Sprintf("Cluster creation waiting: %v", err)) core.LogAndAddError(ctx, diags, "Error creating/updating cluster", fmt.Sprintf("Cluster creation waiting: %v", err))
return return
} }
if waitResp.Status.Error != nil && waitResp.Status.Error.Message != nil && *waitResp.Status.Error.Code == skeWait.InvalidArgusInstanceErrorCode { if waitResp.Status.Error != nil && waitResp.Status.Error.Message != nil && *waitResp.Status.Error.Code == ske.RUNTIMEERRORCODE_ARGUS_INSTANCE_NOT_FOUND {
core.LogAndAddWarning(ctx, diags, "Warning during creating/updating cluster", fmt.Sprintf("Cluster is in Impaired state due to an invalid argus instance id, the cluster is usable but metrics won't be forwarded: %s", *waitResp.Status.Error.Message)) core.LogAndAddWarning(ctx, diags, "Warning during creating/updating cluster", fmt.Sprintf("Cluster is in Impaired state due to an invalid argus instance id, the cluster is usable but metrics won't be forwarded: %s", *waitResp.Status.Error.Message))
} }
@ -934,7 +934,7 @@ func toNodepoolsPayload(ctx context.Context, m *Model, availableMachineVersions
ts := []ske.Taint{} ts := []ske.Taint{}
for _, v := range taintsModel { for _, v := range taintsModel {
t := ske.Taint{ t := ske.Taint{
Effect: conversion.StringValueToPointer(v.Effect), Effect: ske.TaintGetEffectAttributeType(conversion.StringValueToPointer(v.Effect)),
Key: conversion.StringValueToPointer(v.Key), Key: conversion.StringValueToPointer(v.Key),
Value: conversion.StringValueToPointer(v.Value), Value: conversion.StringValueToPointer(v.Value),
} }
@ -972,7 +972,7 @@ func toNodepoolsPayload(ctx context.Context, m *Model, availableMachineVersions
} }
cn := ske.CRI{ cn := ske.CRI{
Name: conversion.StringValueToPointer(nodePool.CRI), Name: ske.CRIGetNameAttributeType(conversion.StringValueToPointer(nodePool.CRI)),
} }
providedVersionMin := conversion.StringValueToPointer(nodePool.OSVersionMin) providedVersionMin := conversion.StringValueToPointer(nodePool.OSVersionMin)
@ -1462,7 +1462,7 @@ func mapNodePools(ctx context.Context, cl *ske.Cluster, m *Model) error {
} }
if nodePoolResp.Cri != nil { if nodePoolResp.Cri != nil {
nodePool["cri"] = types.StringPointerValue(nodePoolResp.Cri.Name) nodePool["cri"] = types.StringValue(string(nodePoolResp.Cri.GetName()))
} }
taintsInModel := false taintsInModel := false
@ -1526,7 +1526,7 @@ func mapTaints(t *[]ske.Taint, nodePool map[string]attr.Value, existInModel bool
for i, taintResp := range *t { for i, taintResp := range *t {
taint := map[string]attr.Value{ taint := map[string]attr.Value{
"effect": types.StringPointerValue(taintResp.Effect), "effect": types.StringValue(string(taintResp.GetEffect())),
"key": types.StringPointerValue(taintResp.Key), "key": types.StringPointerValue(taintResp.Key),
"value": types.StringPointerValue(taintResp.Value), "value": types.StringPointerValue(taintResp.Value),
} }

View file

@ -118,7 +118,7 @@ func TestMapFields(t *testing.T) {
AllowSystemComponents: utils.Ptr(true), AllowSystemComponents: utils.Ptr(true),
AvailabilityZones: &[]string{"z1", "z2"}, AvailabilityZones: &[]string{"z1", "z2"},
Cri: &ske.CRI{ Cri: &ske.CRI{
Name: utils.Ptr("cri"), Name: ske.CRINAME_DOCKER.Ptr(),
}, },
Labels: &map[string]string{"k": "v"}, Labels: &map[string]string{"k": "v"},
Machine: &ske.Machine{ Machine: &ske.Machine{
@ -135,7 +135,7 @@ func TestMapFields(t *testing.T) {
Name: utils.Ptr("node"), Name: utils.Ptr("node"),
Taints: &[]ske.Taint{ Taints: &[]ske.Taint{
{ {
Effect: utils.Ptr("effect"), Effect: ske.TAINTEFFECT_NO_EXECUTE.Ptr(),
Key: utils.Ptr("key"), Key: utils.Ptr("key"),
Value: utils.Ptr("value"), Value: utils.Ptr("value"),
}, },
@ -198,14 +198,14 @@ func TestMapFields(t *testing.T) {
types.ObjectValueMust( types.ObjectValueMust(
taintTypes, taintTypes,
map[string]attr.Value{ map[string]attr.Value{
"effect": types.StringValue("effect"), "effect": types.StringValue(string(ske.TAINTEFFECT_NO_EXECUTE)),
"key": types.StringValue("key"), "key": types.StringValue("key"),
"value": types.StringValue("value"), "value": types.StringValue("value"),
}, },
), ),
}, },
), ),
"cri": types.StringValue("cri"), "cri": types.StringValue(string(ske.CRINAME_DOCKER)),
"availability_zones": types.ListValueMust( "availability_zones": types.ListValueMust(
types.StringType, types.StringType,
[]attr.Value{ []attr.Value{
@ -502,7 +502,7 @@ func TestMapFields(t *testing.T) {
}, },
), ),
"taints": types.ListValueMust(types.ObjectType{AttrTypes: taintTypes}, []attr.Value{}), "taints": types.ListValueMust(types.ObjectType{AttrTypes: taintTypes}, []attr.Value{}),
"cri": types.StringValue("cri"), "cri": types.StringValue(string(ske.CRINAME_DOCKER)),
"availability_zones": types.ListValueMust( "availability_zones": types.ListValueMust(
types.StringType, types.StringType,
[]attr.Value{ []attr.Value{
@ -561,7 +561,7 @@ func TestMapFields(t *testing.T) {
{ {
AvailabilityZones: &[]string{"z1", "z2"}, AvailabilityZones: &[]string{"z1", "z2"},
Cri: &ske.CRI{ Cri: &ske.CRI{
Name: utils.Ptr("cri"), Name: ske.CRINAME_DOCKER.Ptr(),
}, },
Labels: &map[string]string{"k": "v"}, Labels: &map[string]string{"k": "v"},
Machine: &ske.Machine{ Machine: &ske.Machine{
@ -623,7 +623,7 @@ func TestMapFields(t *testing.T) {
}, },
), ),
"taints": types.ListValueMust(types.ObjectType{AttrTypes: taintTypes}, []attr.Value{}), "taints": types.ListValueMust(types.ObjectType{AttrTypes: taintTypes}, []attr.Value{}),
"cri": types.StringValue("cri"), "cri": types.StringValue(string(ske.CRINAME_DOCKER)),
"availability_zones": types.ListValueMust( "availability_zones": types.ListValueMust(
types.StringType, types.StringType,
[]attr.Value{ []attr.Value{