IBM Cloud Docs
Integrating with Virtual Private Endpoint for VPC

Integrating with Virtual Private Endpoint for VPC

You can integrate with Virtual Private Endpoint for VPC by using the CLI, API, SDK, or Terraform.

IBM Cloud® Virtual Private Endpoint (VPE) for VPC enables you to connect to supported IBM Cloud services from your VPC network by using IP addresses of your choosing, allocated from a subnet within your VPC. A DNS Services VPE allows you to communicate with the control plane of DNS Services.

Setting up a VPE gateway for the DNS Services service

Follow instructions in Getting started for VPE for VPC to create and configure a VPE gateway for the DNS Services service offering.

Integrating with Virtual Private Endpoint for VPC from the CLI

After creating an endpoint gateway for DNS Services, follow these steps:

  1. Update the IBM Cloud CLI to the latest version:

    ibmcloud update
    
  2. Update the DNS Services CLI plug-in:

    ibmcloud plugin update dns-svcs-cli
    
  3. Log in to the CLI using a private endpoint.

For more information on VPEs using the CLI, see Virtual private endpoint gateways.

Integrating with Virtual Private Endpoint for VPC with the API

After creating an endpoint gateway for the DNS Services instance, use the service endpoint's 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/instance/<instance-id>/dnszones -H "Authorization: Bearer $iam_token"

Integrating with Virtual Private Endpoint for VPC with the SDK

After creating an endpoint gateway for the DNS Services service, you must use the private endpoint's FQDN when setting the service's FQDN during construction of the DNS Services service object. For example:

api.private.dns-svcs.cloud.ibm.com

For more examples of setting the service's FQDN for the specific SDK language, see SDK API examples.

Integrating with Virtual Private Endpoint for VPC 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 https://api.private.dns-svcs.cloud.ibm.com/v1. For example:

export IBMCLOUD_PRIVATE_DNS_API_ENDPOINT=https://api.private.dns-svcs.cloud.ibm.com/v1

For more information on using Terraform, see DNS Services resources and data sources.

For more information on using VPEs in Terraform, see ibm_is_virtual_endpoint_gateway_ip.