Using virtual private endpoints for VPC to privately connect to DNS Services
IBM Cloud® Virtual Private Endpoints (VPE) for VPC enables you to connect to DNS Services from your VPC network by using the IP addresses of your choosing, allocated from a subnet within your VPC.
VPEs are virtual IP interfaces that are bound to an endpoint gateway created on a per service, or service instance, basis (depending on the service operation model). The endpoint gateway is a virtualized function that scales horizontally, is redundant and highly available, and spans all availability zones of your VPC. Endpoint gateways enable communications from virtual server instances within your VPC and IBM Cloud® service on the private backbone. VPE for VPC gives you the experience of controlling all the private addressing within your cloud. For more information, see About virtual private endpoint gateways.
Before you begin
Before you target a virtual private endpoint for DNS Services you must complete the following tasks.
- Ensure that a Virtual Private Cloud is created.
- Make a plan for your virtual private endpoints.
- Ensure that correct access controls are set for your virtual private endpoint.
- Understand the limitations of having a virtual private endpoint.
- Understand how to view details about a virtual private endpoint.
Setting up a VPE for DNS Services
When you create a VPE gateway by using the CLI or API, use the following CRN information.
Location | Region | Cloud Resource Name (CRN) |
---|---|---|
Global | global |
crn:v1:bluemix:public:dns-svcs:global:::: |
Configuring an endpoint gateway
To configure a virtual private endpoint gateway, follow these steps:
- List the available services, including IBM Cloud infrastructure services available (by default) for all VPC users.
- Create an endpoint gateway for DNS Services that you want to be privately available to the VPC.
- Bind a reserved IP address to the endpoint gateway.
- View the created VPE gateways associated with the DNS Services instance. For more information, see Viewing details of an endpoint gateway.
Now your virtual server instances in the VPC can access your DNS Services instance privately through it.
Using your VPE for DNS Services
After you create an endpoint gateway for DNS Services, follow these steps:
Using the VPE from the CLI
Use the following steps to update to the latest version of the CLI and the DNS Services plug-in.
-
Update the IBM Cloud CLI to the latest version:
ibmcloud update
-
Update the DNS Services CLI plug-in:
ibmcloud plugin update cloud-dns-services
-
Log into
private.cloud.ibm.com
. For more information about logging into the private cloud, see Securing your connection when using the IBM Cloud CLI.
Using the VPE with the VPC API
After creating an endpoint gateway for the DNS Services service, use the service endpoints FQDN api.private.dns-svcs.cloud.ibm.com
in the URL to access the service. For example:
curl https://api.private.dns-svcs.cloud.ibm.com/v1/dns-svcs?version='2020-03-31' -H "Authorization: Bearer $iam_token"
Using the VPE with the SDK
After creating an endpoint gateway for DNS Services, you must use the private endpoint's FQDN when setting the service's FQDN during construction of the DNS Services gateway service object.
api.private.dns-svcs.cloud.ibm.com
For examples of setting the service's FQDN for the specific SDK language, see SDK API examples.
Using the VPE with Terraform
If you plan to access the DNS Services service using Terraform, make sure to set the IBMCLOUD_PRIVATE_DNS_API_ENDPOINT
environment variable to api.private.dns-svcs.cloud.ibm.com
. For example:
export IBMCLOUD_PRIVATE_DNS_API_ENDPOINT=api.private.dns-svcs.cloud.ibm.com
For more information, see DNS Services resources and data sources.