IBM Cloud Docs
Configuring a custom resolver

Configuring a custom resolver

You can add a custom resolver in IBM Cloud® DNS Services by using the UI, CLI, or API.

Creating a custom resolver in the console

To add a custom resolver in the console, follow these steps:

You must create a DNS service before you create a custom resolver. Each VPC can only have one custom resolver.

  1. If you haven't already, create a DNS service.

  2. From your browser, open the IBM Cloud console and log in to your account.

  3. Select the Navigation Menu Menu icon, then click Resource list > Networking > dns-cr-instance.

  4. Navigate to the Custom resolver tab, then click Create custom resolver.

  5. Enter a name and description for your custom resolver.

  6. Select a profile, region, VPC, and subnet from the list menu.

    To achieve high availability, you must provide a minimum of two subnets. You can configure a maximum of three locations within the same subnet, or in different subnets.

  7. Click Add+ if you want to add another subnet.

  8. Click Create.

    The custom resolver details view appears, where you can manage custom resolver settings.

Creating a custom resolver without high availability

If you want to create a custom resolver without high availability, you must manually delete the second subnet field by clicking the Delete icon next to the second subnet.

Delete second subnet
Delete the second subnet to remove high availability function

Creating a custom resolver from the CLI

To create a custom resolver using the CLI, run the following command:

ibmcloud dns custom-resolver-create --name NAME --location LOCATION1 --location LOCATION2 [-d, --description DESCRIPTION] [--profile Profile] [-i, --instance INSTANCE] [--output FORMAT]

Where:

  • -n, --name is the name of the custom resolver.
  • -d, --description is the descriptive text of the custom resolver.
  • --location is the location where the custom resolver is running. The location subnet CRN is required. For example: --location subnet1,enable --location subnet2,disable
  • --profile is the profile name of custom resolver. Valid values: essential, advanced, premier.
  • -i, --instance is the instance name or ID. If this is not set, the context instance specified by dns instance-target INSTANCE is used instead.
  • --output specifies output format. Currently, json is the only supported format.

To create a custom resolver without high availability, run the command with [-f, --force]:

ibmcloud dns custom-resolver-create --name NAME [--location LOCATION1] [--location LOCATION2] [-description DESCRIPTION] [--profile Profile] [-f, --force] [-i, --instance INSTANCE] [--output FORMAT]

Where:

  • -f, --force allows for creating custom resolver with fewer than 2 locations.

Create a custom resolver with the API

To add a custom resolver using the API, follow these steps:

  1. Set up your API environment with the correct variables.
  2. Store the following values in variables to be used in the API command:
    • instance_id, which is the unique identifier of a service instance.
    • X-Correlation-ID, which is a string that uniquely identifies a request.
  3. When all variables are initiated, add your custom resolver:
{
  "name": "my-resolver",
  "description": "custom resolver",
  "locations": [
    {
      "subnet_crn": "crn:v1:bluemix:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04",
      "enabled": false
    }
  ],
  "profile": "essential"
}

Next steps