Skip to content

Commit 0d665f6

Browse files
authored
Merge pull request #17722 from hakman/scw-fix-tf
scaleway: Fix failing terraform test
2 parents f04e817 + 660786a commit 0d665f6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/integration/update_cluster/minimal_scaleway/kubernetes.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ resource "scaleway_lb_backend" "lb-backend-https" {
240240
lb_id = scaleway_lb.api-scw-minimal-k8s-local.id
241241
name = "lb-backend-https"
242242
proxy_protocol = "none"
243-
server_ips = [scaleway_instance_server.control-plane-fr-par-1-0.private_ip]
243+
server_ips = [scaleway_instance_server.control-plane-fr-par-1-0.private_ips[0].address]
244244
}
245245

246246
resource "scaleway_lb_backend" "lb-backend-kops-controller" {
@@ -249,7 +249,7 @@ resource "scaleway_lb_backend" "lb-backend-kops-controller" {
249249
lb_id = scaleway_lb.api-scw-minimal-k8s-local.id
250250
name = "lb-backend-kops-controller"
251251
proxy_protocol = "none"
252-
server_ips = [scaleway_instance_server.control-plane-fr-par-1-0.private_ip]
252+
server_ips = [scaleway_instance_server.control-plane-fr-par-1-0.private_ips[0].address]
253253
}
254254

255255
resource "scaleway_lb_frontend" "lb-frontend-https" {

upup/pkg/fi/cloudup/scalewaytasks/lb_backend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ func (l *LBBackend) RenderTerraform(t *terraform.TerraformTarget, actual, expect
221221
for _, server := range servers {
222222
tfInstance := server.(terraformInstance)
223223
if role := scaleway.InstanceRoleFromTags(tfInstance.Tags); role == scaleway.TagRoleControlPlane {
224-
serverIPs = append(serverIPs, terraformWriter.LiteralProperty("scaleway_instance_server", fi.ValueOf(tfInstance.Name), "private_ip"))
224+
serverIPs = append(serverIPs, terraformWriter.LiteralProperty("scaleway_instance_server", fi.ValueOf(tfInstance.Name), "private_ips[0].address"))
225225
}
226226
}
227227

0 commit comments

Comments
 (0)