11package ipam_test
22
33import (
4+ "fmt"
45 "testing"
56
67 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
@@ -123,13 +124,16 @@ func TestAccDataSourceIPAMIP_InstanceLB(t *testing.T) {
123124func TestAccDataSourceIPAMIP_RDB (t * testing.T ) {
124125 tt := acctest .NewTestTools (t )
125126 defer tt .Cleanup ()
127+
128+ latestEngineVersion := rdbchecks .GetLatestEngineVersion (tt , "PostgreSQL" )
129+
126130 resource .ParallelTest (t , resource.TestCase {
127131 PreCheck : func () { acctest .PreCheck (t ) },
128132 ProviderFactories : tt .ProviderFactories ,
129133 CheckDestroy : rdbchecks .IsInstanceDestroyed (tt ),
130134 Steps : []resource.TestStep {
131135 {
132- Config : `
136+ Config : fmt . Sprintf ( `
133137 resource "scaleway_vpc" "main" {
134138 name = "tf-tests-ipam-ip-datasource-rdb"
135139 }
@@ -145,13 +149,13 @@ func TestAccDataSourceIPAMIP_RDB(t *testing.T) {
145149 resource scaleway_rdb_instance main {
146150 name = "test-ipam-ip-rdb"
147151 node_type = "db-dev-s"
148- engine = "PostgreSQL-14"
152+ engine = %q
149153 is_ha_cluster = false
150154 disable_backup = true
151155 user_name = "my_initial_user"
152156 password = "thiZ_is_v&ry_s3cret"
153157 tags = [ "terraform-test", "scaleway_rdb_instance", "volume", "rdb_pn" ]
154- volume_type = "bssd "
158+ volume_type = "sbs_5k "
155159 volume_size_in_gb = 10
156160 private_network {
157161 pn_id = "${scaleway_vpc_private_network.main.id}"
@@ -166,7 +170,7 @@ func TestAccDataSourceIPAMIP_RDB(t *testing.T) {
166170 }
167171 type = "ipv4"
168172 }
169- ` ,
173+ ` , latestEngineVersion ),
170174 Check : resource .ComposeTestCheckFunc (
171175 resource .TestCheckResourceAttrSet ("data.scaleway_ipam_ip.main" , "address" ),
172176 ),
0 commit comments