Skip to content

fix(rdb): update endpoints handling #2308

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
merged 4 commits into from
Dec 18, 2023

Conversation

Mia-Cross
Copy link
Contributor

@Mia-Cross Mia-Cross commented Dec 15, 2023

This PR changes the way endpoints are handled to integrate the latest changes in the RDB API: if a private network is defined, there is no more default public endpoint. So if the user wants both a private and a public endpoint, they must explicitly declare a load_balancer {} empty block alongside the private_network. This also means there is no need for the disable_public_endpoint field anymore.
Closes #2281

Also there was a problem with the updates of private network endpoints, that did not always use IPAM as they should.
Closes #2299

The PR should also fix the nightly tests.

@Mia-Cross
Copy link
Contributor Author

Examples :

scaleway_rdb_instance example {
    private_network {
        pn_id = xxx
        (enable_ipam = true)
    }
}

--> Defines an IPAM configured private network endpoint

scaleway_rdb_instance example {
    private_network {
        pn_id = xxx
        enable_ipam = false
    }
    load_balancer {}
}

--> Defines a static private network endpoint and a load_balancer public endpoint

scaleway_rdb_instance example {
}

--> Defines a default load_balancer public endpoint

@Mia-Cross Mia-Cross force-pushed the rdb_update_endpoints branch from 0b27797 to f8a65c8 Compare December 18, 2023 10:15
@Mia-Cross Mia-Cross self-assigned this Dec 18, 2023
@Mia-Cross Mia-Cross added bug enhancement rdb Managed MySQL and PostgreSQL issues, bugs and feature requests labels Dec 18, 2023
@Mia-Cross Mia-Cross force-pushed the rdb_update_endpoints branch from 5ad7942 to e3c51a2 Compare December 18, 2023 13:24
@Mia-Cross Mia-Cross marked this pull request as ready for review December 18, 2023 13:34
@Mia-Cross Mia-Cross force-pushed the rdb_update_endpoints branch from e3c51a2 to 903ab5a Compare December 18, 2023 14:04
@Mia-Cross Mia-Cross added the priority:highest Bugs filled by customers, security issues label Dec 18, 2023
@Mia-Cross Mia-Cross force-pushed the rdb_update_endpoints branch from 9438fe0 to ce3a02f Compare December 18, 2023 16:44
@codecov-commenter
Copy link

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (0ccefa7) 73.64% compared to head (ccab632) 73.62%.

Files Patch % Lines
scaleway/resource_rdb_instance.go 68.08% 11 Missing and 4 partials ⚠️
scaleway/helpers_rdb.go 74.19% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2308      +/-   ##
==========================================
- Coverage   73.64%   73.62%   -0.02%     
==========================================
  Files         218      218              
  Lines       33848    33866      +18     
==========================================
+ Hits        24928    24935       +7     
- Misses       6787     6797      +10     
- Partials     2133     2134       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@remyleone remyleone added this pull request to the merge queue Dec 18, 2023
Merged via the queue into scaleway:master with commit 45658de Dec 18, 2023
@Mia-Cross Mia-Cross deleted the rdb_update_endpoints branch December 18, 2023 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement priority:highest Bugs filled by customers, security issues rdb Managed MySQL and PostgreSQL issues, bugs and feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RDB update PN doesn't use IPAM Integrate changes to endpoints in RDB instance
3 participants