Skip to content

Conversation

@maathor
Copy link
Contributor

@maathor maathor commented Sep 4, 2025

Summary

This PR fixes an issue where the scaleway_instance_private_nic data source was missing the zone parameter, which could cause problems when deploying instances across multiple availability zones.

Changes

  • Fix: Added zone = var.zone parameter to the scaleway_instance_private_nic data source in ipv4.tf
  • Example: Added examples/multi-zones/ demonstrating multi-zone instance deployment

Problem

When deploying instances with private networks across different zones, the scaleway_instance_private_nic data source would not specify which zone to query, potentially causing:

  • Deployment failures in multi-zone scenarios
  • Inconsistent behavior when private networks span multiple zones
  • Resource lookup errors

Solution

The fix ensures the private NIC data source uses the same zone as the instance it belongs to, maintaining consistency across all zone-aware resources in the module.

Testing

The included example in examples/multi-zones/ demonstrates:

  • Two instances deployed in different zones (fr-par-1 and fr-par-2)
  • Proper zone-aware security group configuration
  • Successful deployment without zone-related errors

Files Changed

  • ipv4.tf: Added zone parameter to data source
  • examples/multi-zones/: New example with README, main.tf, and versions.tf

The scaleway_instance_private_nic data source was missing the zone parameter,
which could cause issues when deploying instances across multiple zones.
This fix ensures the private NIC data source uses the same zone as the instance.
Add example demonstrating how to deploy instances across multiple zones.
This example showcases the fixed scaleway_instance_private_nic data source
that now properly includes the zone parameter for multi-zone deployments.
Signed-off-by: marc <marc@agorapulse.com>
Signed-off-by: marc <marc@agorapulse.com>
Signed-off-by: marc <marc@agorapulse.com>
Updated the README to reflect changes in instance configuration and security group naming.

Signed-off-by: marc <marc@agorapulse.com>
Signed-off-by: marc <marc@agorapulse.com>
Copy link
Member

@benoit-garcia benoit-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @maathor !
There's a small error in the example's readme file. Can you fix it before merging?

Co-authored-by: Benoit Garcia <72207524+benoit-garcia@users.noreply.github.com>
Signed-off-by: marc <marc@agorapulse.com>
@benoit-garcia benoit-garcia merged commit 6944441 into scaleway-terraform-modules:main Sep 5, 2025
5 checks passed
@benoit-garcia benoit-garcia added bug Something isn't working documentation Improvements or additions to documentation labels Sep 5, 2025
@benoit-garcia
Copy link
Member

@maathor Approved, merged and released!
Thanks again for your contribution 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Development

Successfully merging this pull request may close these issues.

2 participants