Skip to content

fix(all): private_ip(s) should only be set when no error occurred #3094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Mia-Cross
Copy link
Contributor

This PR makes the private_ip or private_ips attributes optional as not every resource has private IPs.

It also adds the project ID as query parameter for fetching IPs from IPAM in order to force permissions checks. If unauthorized, the field will not be set (and a warning will be displayed).

This PR also prevents the Read functions to exit early if errors occur while reading private IPs. Warnings will be collected and displayed afterwards, but the feature should be non-blocking.

@Mia-Cross Mia-Cross self-assigned this May 19, 2025
@Mia-Cross Mia-Cross added rdb Managed MySQL and PostgreSQL issues, bugs and feature requests k8s Kubernetes Kapsule issues, bugs and feature requests instance Instance issues, bugs and feature requests redis Managed Redis issues, bugs and feature requests priority:highest Bugs filled by customers, security issues baremetal vpcgw labels May 19, 2025
@github-actions github-actions bot added the vpc Virtual Private Cloud (VPC) issues, bugs and feature requests label May 19, 2025
@Mia-Cross Mia-Cross force-pushed the fix_read_private_ips_when_unauthorized branch from e416c5f to 1ec573b Compare May 20, 2025 08:13
@Mia-Cross Mia-Cross marked this pull request as ready for review May 20, 2025 08:13
@Mia-Cross Mia-Cross requested review from a team as code owners May 20, 2025 08:13
@Mia-Cross Mia-Cross marked this pull request as draft May 21, 2025 13:29
@Mia-Cross Mia-Cross marked this pull request as ready for review May 21, 2025 14:52
@remyleone remyleone added this pull request to the merge queue May 22, 2025
Merged via the queue into scaleway:master with commit 0900ae6 May 22, 2025
42 checks passed
@Mia-Cross Mia-Cross deleted the fix_read_private_ips_when_unauthorized branch May 22, 2025 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
baremetal instance Instance issues, bugs and feature requests k8s Kubernetes Kapsule issues, bugs and feature requests priority:highest Bugs filled by customers, security issues rdb Managed MySQL and PostgreSQL issues, bugs and feature requests redis Managed Redis issues, bugs and feature requests vpc Virtual Private Cloud (VPC) issues, bugs and feature requests vpcgw
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants