PolarDB for PostgreSQL supports global IP whitelists. You can customize an IP whitelist template and then associate a cluster with the IP whitelist template. You need to configure only one set of IP whitelist templates for all associated clusters. This simplifies the process of IP whitelist configuration. This topic describes how to configure a global IP whitelist template.
Precautions
A cluster can only be associated with IP whitelist templates in the same region.
Before you delete an IP whitelist template, you must disassociate it from all associated clusters. Otherwise, when you delete an IP whitelist template, the whitelist configurations of all associated clusters are also deleted, which causes database connection errors.
One IP whitelist template supports up to 1000 IP addresses.
One cluster can be associated with multiple IP whitelist templates.
One IP whitelist template can be associated with multiple clusters.
Create an IP whitelist template
Log on to the PolarDB console.
In the upper-left corner, select the region in which the cluster is deployed.
In the left-side navigation pane, click IP Whitelist Templates.
In the upper-left corner of the page, click Create IP Whitelist Template.
In the Create IP Whitelist Template dialog box, set IP Whitelist Template Name and IP Addresses in Whitelist.
NoteThe name of the IP whitelist template must meet the following requirements:
The name can contain lowercase letters, digits, and underscores (_).
The name must start with a letter and end with a letter or a digit.
The name must be 2 to 120 characters in length.
Click OK.
Modify an IP whitelist template
Log on to the PolarDB console.
In the upper-left corner, select the region in which the cluster is deployed.
In the left-side navigation pane, click IP Whitelist Templates.
On the IP Whitelist Templates page, find the IP whitelist template to be modified and click Modify in the Actions column.
In the Modify IP Whitelist Template panel, add IP addresses to or delete IP addresses from the whitelist, and then click OK.
In the message that appears, click OK.
NoteModified IP addresses in the whitelist take effect in all associated clusters. Proceed with caution.
Delete an IP whitelist template
Log on to the PolarDB console.
In the upper-left corner, select the region in which the cluster is deployed.
In the left-side navigation pane, click IP Whitelist Templates.
On the IP Whitelist Templates page, find the IP whitelist template to be deleted and click Delete in the Actions column.
In the message that appears, click Delete.
NoteWhen you delete an IP whitelist template, the whitelist configurations of all associated clusters are also deleted. Proceed with caution.
Associate an IP whitelist template
Log on to the PolarDB console.
In the upper-left corner, select the region in which the cluster is deployed.
Find the cluster and click its ID.
In the left-side navigation pane, choose .
On the Whitelists page, click Associate IP Whitelist Template.
In the Associate IP Whitelist Template panel, select the IP whitelist template to be associated from the drop-down list and click OK.
Disassociate an IP whitelist template
Log on to the PolarDB console.
In the upper-left corner, select the region in which the cluster is deployed.
Find the cluster and click its ID.
In the left-side navigation pane, choose .
On the Whitelists page, find the IP whitelist template to be disassociated and click Disassociate.
In the message that appears, click OK.