1. Packages
  2. Ibm Provider
  3. API Docs
  4. DnsCustomResolver
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.DnsCustomResolver

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a private DNS custom resolver resource. This allows DNS custom resolver to create, update, and delete. For more information, about customer resolver, see create-custom-resolver.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const rg = ibm.getResourceGroup({
        isDefault: true,
    });
    const test_pdns_cr_vpc = new ibm.IsVpc("test-pdns-cr-vpc", {resourceGroup: rg.then(rg => rg.id)});
    const test_pdns_cr_subnet1 = new ibm.IsSubnet("test-pdns-cr-subnet1", {
        vpc: test_pdns_cr_vpc.isVpcId,
        zone: "us-south-1",
        ipv4CidrBlock: "10.240.0.0/24",
        resourceGroup: rg.then(rg => rg.id),
    });
    const test_pdns_cr_subnet2 = new ibm.IsSubnet("test-pdns-cr-subnet2", {
        vpc: test_pdns_cr_vpc.isVpcId,
        zone: "us-south-1",
        ipv4CidrBlock: "10.240.64.0/24",
        resourceGroup: rg.then(rg => rg.id),
    });
    const test_pdns_cr_instance = new ibm.ResourceInstance("test-pdns-cr-instance", {
        resourceGroupId: rg.then(rg => rg.id),
        location: "global",
        service: "dns-svcs",
        plan: "standard-dns",
    });
    const test = new ibm.DnsCustomResolver("test", {
        instanceId: test_pdns_cr_instance.guid,
        description: "new test CR - TF",
        highAvailability: true,
        enabled: true,
        profile: "essential",
        allowDisruptiveUpdates: false,
        locations: [
            {
                subnetCrn: test_pdns_cr_subnet1.crn,
                enabled: true,
            },
            {
                subnetCrn: test_pdns_cr_subnet1.crn,
                enabled: true,
            },
            {
                subnetCrn: test_pdns_cr_subnet2.crn,
                enabled: false,
            },
        ],
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    rg = ibm.get_resource_group(is_default=True)
    test_pdns_cr_vpc = ibm.IsVpc("test-pdns-cr-vpc", resource_group=rg.id)
    test_pdns_cr_subnet1 = ibm.IsSubnet("test-pdns-cr-subnet1",
        vpc=test_pdns_cr_vpc.is_vpc_id,
        zone="us-south-1",
        ipv4_cidr_block="10.240.0.0/24",
        resource_group=rg.id)
    test_pdns_cr_subnet2 = ibm.IsSubnet("test-pdns-cr-subnet2",
        vpc=test_pdns_cr_vpc.is_vpc_id,
        zone="us-south-1",
        ipv4_cidr_block="10.240.64.0/24",
        resource_group=rg.id)
    test_pdns_cr_instance = ibm.ResourceInstance("test-pdns-cr-instance",
        resource_group_id=rg.id,
        location="global",
        service="dns-svcs",
        plan="standard-dns")
    test = ibm.DnsCustomResolver("test",
        instance_id=test_pdns_cr_instance.guid,
        description="new test CR - TF",
        high_availability=True,
        enabled=True,
        profile="essential",
        allow_disruptive_updates=False,
        locations=[
            {
                "subnet_crn": test_pdns_cr_subnet1.crn,
                "enabled": True,
            },
            {
                "subnet_crn": test_pdns_cr_subnet1.crn,
                "enabled": True,
            },
            {
                "subnet_crn": test_pdns_cr_subnet2.crn,
                "enabled": False,
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		rg, err := ibm.LookupResourceGroup(ctx, &ibm.LookupResourceGroupArgs{
    			IsDefault: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		test_pdns_cr_vpc, err := ibm.NewIsVpc(ctx, "test-pdns-cr-vpc", &ibm.IsVpcArgs{
    			ResourceGroup: pulumi.String(rg.Id),
    		})
    		if err != nil {
    			return err
    		}
    		test_pdns_cr_subnet1, err := ibm.NewIsSubnet(ctx, "test-pdns-cr-subnet1", &ibm.IsSubnetArgs{
    			Vpc:           test_pdns_cr_vpc.IsVpcId,
    			Zone:          pulumi.String("us-south-1"),
    			Ipv4CidrBlock: pulumi.String("10.240.0.0/24"),
    			ResourceGroup: pulumi.String(rg.Id),
    		})
    		if err != nil {
    			return err
    		}
    		test_pdns_cr_subnet2, err := ibm.NewIsSubnet(ctx, "test-pdns-cr-subnet2", &ibm.IsSubnetArgs{
    			Vpc:           test_pdns_cr_vpc.IsVpcId,
    			Zone:          pulumi.String("us-south-1"),
    			Ipv4CidrBlock: pulumi.String("10.240.64.0/24"),
    			ResourceGroup: pulumi.String(rg.Id),
    		})
    		if err != nil {
    			return err
    		}
    		test_pdns_cr_instance, err := ibm.NewResourceInstance(ctx, "test-pdns-cr-instance", &ibm.ResourceInstanceArgs{
    			ResourceGroupId: pulumi.String(rg.Id),
    			Location:        pulumi.String("global"),
    			Service:         pulumi.String("dns-svcs"),
    			Plan:            pulumi.String("standard-dns"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ibm.NewDnsCustomResolver(ctx, "test", &ibm.DnsCustomResolverArgs{
    			InstanceId:             test_pdns_cr_instance.Guid,
    			Description:            pulumi.String("new test CR - TF"),
    			HighAvailability:       pulumi.Bool(true),
    			Enabled:                pulumi.Bool(true),
    			Profile:                pulumi.String("essential"),
    			AllowDisruptiveUpdates: pulumi.Bool(false),
    			Locations: ibm.DnsCustomResolverLocationArray{
    				&ibm.DnsCustomResolverLocationArgs{
    					SubnetCrn: test_pdns_cr_subnet1.Crn,
    					Enabled:   pulumi.Bool(true),
    				},
    				&ibm.DnsCustomResolverLocationArgs{
    					SubnetCrn: test_pdns_cr_subnet1.Crn,
    					Enabled:   pulumi.Bool(true),
    				},
    				&ibm.DnsCustomResolverLocationArgs{
    					SubnetCrn: test_pdns_cr_subnet2.Crn,
    					Enabled:   pulumi.Bool(false),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var rg = Ibm.GetResourceGroup.Invoke(new()
        {
            IsDefault = true,
        });
    
        var test_pdns_cr_vpc = new Ibm.IsVpc("test-pdns-cr-vpc", new()
        {
            ResourceGroup = rg.Apply(getResourceGroupResult => getResourceGroupResult.Id),
        });
    
        var test_pdns_cr_subnet1 = new Ibm.IsSubnet("test-pdns-cr-subnet1", new()
        {
            Vpc = test_pdns_cr_vpc.IsVpcId,
            Zone = "us-south-1",
            Ipv4CidrBlock = "10.240.0.0/24",
            ResourceGroup = rg.Apply(getResourceGroupResult => getResourceGroupResult.Id),
        });
    
        var test_pdns_cr_subnet2 = new Ibm.IsSubnet("test-pdns-cr-subnet2", new()
        {
            Vpc = test_pdns_cr_vpc.IsVpcId,
            Zone = "us-south-1",
            Ipv4CidrBlock = "10.240.64.0/24",
            ResourceGroup = rg.Apply(getResourceGroupResult => getResourceGroupResult.Id),
        });
    
        var test_pdns_cr_instance = new Ibm.ResourceInstance("test-pdns-cr-instance", new()
        {
            ResourceGroupId = rg.Apply(getResourceGroupResult => getResourceGroupResult.Id),
            Location = "global",
            Service = "dns-svcs",
            Plan = "standard-dns",
        });
    
        var test = new Ibm.DnsCustomResolver("test", new()
        {
            InstanceId = test_pdns_cr_instance.Guid,
            Description = "new test CR - TF",
            HighAvailability = true,
            Enabled = true,
            Profile = "essential",
            AllowDisruptiveUpdates = false,
            Locations = new[]
            {
                new Ibm.Inputs.DnsCustomResolverLocationArgs
                {
                    SubnetCrn = test_pdns_cr_subnet1.Crn,
                    Enabled = true,
                },
                new Ibm.Inputs.DnsCustomResolverLocationArgs
                {
                    SubnetCrn = test_pdns_cr_subnet1.Crn,
                    Enabled = true,
                },
                new Ibm.Inputs.DnsCustomResolverLocationArgs
                {
                    SubnetCrn = test_pdns_cr_subnet2.Crn,
                    Enabled = false,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetResourceGroupArgs;
    import com.pulumi.ibm.IsVpc;
    import com.pulumi.ibm.IsVpcArgs;
    import com.pulumi.ibm.IsSubnet;
    import com.pulumi.ibm.IsSubnetArgs;
    import com.pulumi.ibm.ResourceInstance;
    import com.pulumi.ibm.ResourceInstanceArgs;
    import com.pulumi.ibm.DnsCustomResolver;
    import com.pulumi.ibm.DnsCustomResolverArgs;
    import com.pulumi.ibm.inputs.DnsCustomResolverLocationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var rg = IbmFunctions.getResourceGroup(GetResourceGroupArgs.builder()
                .isDefault(true)
                .build());
    
            var test_pdns_cr_vpc = new IsVpc("test-pdns-cr-vpc", IsVpcArgs.builder()
                .resourceGroup(rg.applyValue(getResourceGroupResult -> getResourceGroupResult.id()))
                .build());
    
            var test_pdns_cr_subnet1 = new IsSubnet("test-pdns-cr-subnet1", IsSubnetArgs.builder()
                .vpc(test_pdns_cr_vpc.isVpcId())
                .zone("us-south-1")
                .ipv4CidrBlock("10.240.0.0/24")
                .resourceGroup(rg.applyValue(getResourceGroupResult -> getResourceGroupResult.id()))
                .build());
    
            var test_pdns_cr_subnet2 = new IsSubnet("test-pdns-cr-subnet2", IsSubnetArgs.builder()
                .vpc(test_pdns_cr_vpc.isVpcId())
                .zone("us-south-1")
                .ipv4CidrBlock("10.240.64.0/24")
                .resourceGroup(rg.applyValue(getResourceGroupResult -> getResourceGroupResult.id()))
                .build());
    
            var test_pdns_cr_instance = new ResourceInstance("test-pdns-cr-instance", ResourceInstanceArgs.builder()
                .resourceGroupId(rg.applyValue(getResourceGroupResult -> getResourceGroupResult.id()))
                .location("global")
                .service("dns-svcs")
                .plan("standard-dns")
                .build());
    
            var test = new DnsCustomResolver("test", DnsCustomResolverArgs.builder()
                .instanceId(test_pdns_cr_instance.guid())
                .description("new test CR - TF")
                .highAvailability(true)
                .enabled(true)
                .profile("essential")
                .allowDisruptiveUpdates(false)
                .locations(            
                    DnsCustomResolverLocationArgs.builder()
                        .subnetCrn(test_pdns_cr_subnet1.crn())
                        .enabled(true)
                        .build(),
                    DnsCustomResolverLocationArgs.builder()
                        .subnetCrn(test_pdns_cr_subnet1.crn())
                        .enabled(true)
                        .build(),
                    DnsCustomResolverLocationArgs.builder()
                        .subnetCrn(test_pdns_cr_subnet2.crn())
                        .enabled(false)
                        .build())
                .build());
    
        }
    }
    
    resources:
      test-pdns-cr-vpc:
        type: ibm:IsVpc
        properties:
          resourceGroup: ${rg.id}
      test-pdns-cr-subnet1:
        type: ibm:IsSubnet
        properties:
          vpc: ${["test-pdns-cr-vpc"].isVpcId}
          zone: us-south-1
          ipv4CidrBlock: 10.240.0.0/24
          resourceGroup: ${rg.id}
      test-pdns-cr-subnet2:
        type: ibm:IsSubnet
        properties:
          vpc: ${["test-pdns-cr-vpc"].isVpcId}
          zone: us-south-1
          ipv4CidrBlock: 10.240.64.0/24
          resourceGroup: ${rg.id}
      test-pdns-cr-instance:
        type: ibm:ResourceInstance
        properties:
          resourceGroupId: ${rg.id}
          location: global
          service: dns-svcs
          plan: standard-dns
      test:
        type: ibm:DnsCustomResolver
        properties:
          instanceId: ${["test-pdns-cr-instance"].guid}
          description: new test CR - TF
          highAvailability: true
          enabled: true
          profile: essential
          allowDisruptiveUpdates: false
          locations:
            - subnetCrn: ${["test-pdns-cr-subnet1"].crn}
              enabled: true
            - subnetCrn: ${["test-pdns-cr-subnet1"].crn}
              enabled: true
            - subnetCrn: ${["test-pdns-cr-subnet2"].crn}
              enabled: false
    variables:
      rg:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            isDefault: true
    

    Create DnsCustomResolver Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DnsCustomResolver(name: string, args: DnsCustomResolverArgs, opts?: CustomResourceOptions);
    @overload
    def DnsCustomResolver(resource_name: str,
                          args: DnsCustomResolverArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def DnsCustomResolver(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          instance_id: Optional[str] = None,
                          allow_disruptive_updates: Optional[bool] = None,
                          description: Optional[str] = None,
                          dns_custom_resolver_id: Optional[str] = None,
                          enabled: Optional[bool] = None,
                          high_availability: Optional[bool] = None,
                          locations: Optional[Sequence[DnsCustomResolverLocationArgs]] = None,
                          name: Optional[str] = None,
                          profile: Optional[str] = None,
                          timeouts: Optional[DnsCustomResolverTimeoutsArgs] = None)
    func NewDnsCustomResolver(ctx *Context, name string, args DnsCustomResolverArgs, opts ...ResourceOption) (*DnsCustomResolver, error)
    public DnsCustomResolver(string name, DnsCustomResolverArgs args, CustomResourceOptions? opts = null)
    public DnsCustomResolver(String name, DnsCustomResolverArgs args)
    public DnsCustomResolver(String name, DnsCustomResolverArgs args, CustomResourceOptions options)
    
    type: ibm:DnsCustomResolver
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DnsCustomResolverArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DnsCustomResolverArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DnsCustomResolverArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DnsCustomResolverArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DnsCustomResolverArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var dnsCustomResolverResource = new Ibm.DnsCustomResolver("dnsCustomResolverResource", new()
    {
        InstanceId = "string",
        AllowDisruptiveUpdates = false,
        Description = "string",
        DnsCustomResolverId = "string",
        Enabled = false,
        HighAvailability = false,
        Locations = new[]
        {
            new Ibm.Inputs.DnsCustomResolverLocationArgs
            {
                SubnetCrn = "string",
                DnsServerIp = "string",
                Enabled = false,
                Healthy = false,
                LocationId = "string",
            },
        },
        Name = "string",
        Profile = "string",
        Timeouts = new Ibm.Inputs.DnsCustomResolverTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ibm.NewDnsCustomResolver(ctx, "dnsCustomResolverResource", &ibm.DnsCustomResolverArgs{
    	InstanceId:             pulumi.String("string"),
    	AllowDisruptiveUpdates: pulumi.Bool(false),
    	Description:            pulumi.String("string"),
    	DnsCustomResolverId:    pulumi.String("string"),
    	Enabled:                pulumi.Bool(false),
    	HighAvailability:       pulumi.Bool(false),
    	Locations: ibm.DnsCustomResolverLocationArray{
    		&ibm.DnsCustomResolverLocationArgs{
    			SubnetCrn:   pulumi.String("string"),
    			DnsServerIp: pulumi.String("string"),
    			Enabled:     pulumi.Bool(false),
    			Healthy:     pulumi.Bool(false),
    			LocationId:  pulumi.String("string"),
    		},
    	},
    	Name:    pulumi.String("string"),
    	Profile: pulumi.String("string"),
    	Timeouts: &ibm.DnsCustomResolverTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var dnsCustomResolverResource = new DnsCustomResolver("dnsCustomResolverResource", DnsCustomResolverArgs.builder()
        .instanceId("string")
        .allowDisruptiveUpdates(false)
        .description("string")
        .dnsCustomResolverId("string")
        .enabled(false)
        .highAvailability(false)
        .locations(DnsCustomResolverLocationArgs.builder()
            .subnetCrn("string")
            .dnsServerIp("string")
            .enabled(false)
            .healthy(false)
            .locationId("string")
            .build())
        .name("string")
        .profile("string")
        .timeouts(DnsCustomResolverTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    dns_custom_resolver_resource = ibm.DnsCustomResolver("dnsCustomResolverResource",
        instance_id="string",
        allow_disruptive_updates=False,
        description="string",
        dns_custom_resolver_id="string",
        enabled=False,
        high_availability=False,
        locations=[{
            "subnet_crn": "string",
            "dns_server_ip": "string",
            "enabled": False,
            "healthy": False,
            "location_id": "string",
        }],
        name="string",
        profile="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const dnsCustomResolverResource = new ibm.DnsCustomResolver("dnsCustomResolverResource", {
        instanceId: "string",
        allowDisruptiveUpdates: false,
        description: "string",
        dnsCustomResolverId: "string",
        enabled: false,
        highAvailability: false,
        locations: [{
            subnetCrn: "string",
            dnsServerIp: "string",
            enabled: false,
            healthy: false,
            locationId: "string",
        }],
        name: "string",
        profile: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: ibm:DnsCustomResolver
    properties:
        allowDisruptiveUpdates: false
        description: string
        dnsCustomResolverId: string
        enabled: false
        highAvailability: false
        instanceId: string
        locations:
            - dnsServerIp: string
              enabled: false
              healthy: false
              locationId: string
              subnetCrn: string
        name: string
        profile: string
        timeouts:
            create: string
            delete: string
            update: string
    

    DnsCustomResolver Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DnsCustomResolver resource accepts the following input properties:

    InstanceId string
    The GUID of the private DNS service instance.
    AllowDisruptiveUpdates bool
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    Description string
    Descriptive text of the custom resolver.
    DnsCustomResolverId string
    Enabled bool
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    HighAvailability bool
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    Locations List<DnsCustomResolverLocation>
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    Name string
    The name of the custom resolver.
    Profile string
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    Timeouts DnsCustomResolverTimeouts
    InstanceId string
    The GUID of the private DNS service instance.
    AllowDisruptiveUpdates bool
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    Description string
    Descriptive text of the custom resolver.
    DnsCustomResolverId string
    Enabled bool
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    HighAvailability bool
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    Locations []DnsCustomResolverLocationArgs
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    Name string
    The name of the custom resolver.
    Profile string
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    Timeouts DnsCustomResolverTimeoutsArgs
    instanceId String
    The GUID of the private DNS service instance.
    allowDisruptiveUpdates Boolean
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    description String
    Descriptive text of the custom resolver.
    dnsCustomResolverId String
    enabled Boolean
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    highAvailability Boolean
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    locations List<DnsCustomResolverLocation>
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    name String
    The name of the custom resolver.
    profile String
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    timeouts DnsCustomResolverTimeouts
    instanceId string
    The GUID of the private DNS service instance.
    allowDisruptiveUpdates boolean
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    description string
    Descriptive text of the custom resolver.
    dnsCustomResolverId string
    enabled boolean
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    highAvailability boolean
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    locations DnsCustomResolverLocation[]
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    name string
    The name of the custom resolver.
    profile string
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    timeouts DnsCustomResolverTimeouts
    instance_id str
    The GUID of the private DNS service instance.
    allow_disruptive_updates bool
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    description str
    Descriptive text of the custom resolver.
    dns_custom_resolver_id str
    enabled bool
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    high_availability bool
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    locations Sequence[DnsCustomResolverLocationArgs]
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    name str
    The name of the custom resolver.
    profile str
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    timeouts DnsCustomResolverTimeoutsArgs
    instanceId String
    The GUID of the private DNS service instance.
    allowDisruptiveUpdates Boolean
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    description String
    Descriptive text of the custom resolver.
    dnsCustomResolverId String
    enabled Boolean
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    highAvailability Boolean
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    locations List<Property Map>
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    name String
    The name of the custom resolver.
    profile String
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DnsCustomResolver resource produces the following output properties:

    CreatedOn string
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    CustomResolverId string
    (String) The unique ID of the private DNS custom resolver.
    Health string
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    Rules List<DnsCustomResolverRule>
    CreatedOn string
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    CustomResolverId string
    (String) The unique ID of the private DNS custom resolver.
    Health string
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    Rules []DnsCustomResolverRule
    createdOn String
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    customResolverId String
    (String) The unique ID of the private DNS custom resolver.
    health String
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    rules List<DnsCustomResolverRule>
    createdOn string
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    customResolverId string
    (String) The unique ID of the private DNS custom resolver.
    health string
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    id string
    The provider-assigned unique ID for this managed resource.
    modifiedOn string
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    rules DnsCustomResolverRule[]
    created_on str
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    custom_resolver_id str
    (String) The unique ID of the private DNS custom resolver.
    health str
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    id str
    The provider-assigned unique ID for this managed resource.
    modified_on str
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    rules Sequence[DnsCustomResolverRule]
    createdOn String
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    customResolverId String
    (String) The unique ID of the private DNS custom resolver.
    health String
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    rules List<Property Map>

    Look up Existing DnsCustomResolver Resource

    Get an existing DnsCustomResolver resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DnsCustomResolverState, opts?: CustomResourceOptions): DnsCustomResolver
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_disruptive_updates: Optional[bool] = None,
            created_on: Optional[str] = None,
            custom_resolver_id: Optional[str] = None,
            description: Optional[str] = None,
            dns_custom_resolver_id: Optional[str] = None,
            enabled: Optional[bool] = None,
            health: Optional[str] = None,
            high_availability: Optional[bool] = None,
            instance_id: Optional[str] = None,
            locations: Optional[Sequence[DnsCustomResolverLocationArgs]] = None,
            modified_on: Optional[str] = None,
            name: Optional[str] = None,
            profile: Optional[str] = None,
            rules: Optional[Sequence[DnsCustomResolverRuleArgs]] = None,
            timeouts: Optional[DnsCustomResolverTimeoutsArgs] = None) -> DnsCustomResolver
    func GetDnsCustomResolver(ctx *Context, name string, id IDInput, state *DnsCustomResolverState, opts ...ResourceOption) (*DnsCustomResolver, error)
    public static DnsCustomResolver Get(string name, Input<string> id, DnsCustomResolverState? state, CustomResourceOptions? opts = null)
    public static DnsCustomResolver get(String name, Output<String> id, DnsCustomResolverState state, CustomResourceOptions options)
    resources:  _:    type: ibm:DnsCustomResolver    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AllowDisruptiveUpdates bool
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    CreatedOn string
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    CustomResolverId string
    (String) The unique ID of the private DNS custom resolver.
    Description string
    Descriptive text of the custom resolver.
    DnsCustomResolverId string
    Enabled bool
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    Health string
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    HighAvailability bool
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    InstanceId string
    The GUID of the private DNS service instance.
    Locations List<DnsCustomResolverLocation>
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    ModifiedOn string
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    Name string
    The name of the custom resolver.
    Profile string
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    Rules List<DnsCustomResolverRule>
    Timeouts DnsCustomResolverTimeouts
    AllowDisruptiveUpdates bool
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    CreatedOn string
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    CustomResolverId string
    (String) The unique ID of the private DNS custom resolver.
    Description string
    Descriptive text of the custom resolver.
    DnsCustomResolverId string
    Enabled bool
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    Health string
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    HighAvailability bool
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    InstanceId string
    The GUID of the private DNS service instance.
    Locations []DnsCustomResolverLocationArgs
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    ModifiedOn string
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    Name string
    The name of the custom resolver.
    Profile string
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    Rules []DnsCustomResolverRuleArgs
    Timeouts DnsCustomResolverTimeoutsArgs
    allowDisruptiveUpdates Boolean
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    createdOn String
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    customResolverId String
    (String) The unique ID of the private DNS custom resolver.
    description String
    Descriptive text of the custom resolver.
    dnsCustomResolverId String
    enabled Boolean
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    health String
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    highAvailability Boolean
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    instanceId String
    The GUID of the private DNS service instance.
    locations List<DnsCustomResolverLocation>
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    modifiedOn String
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    name String
    The name of the custom resolver.
    profile String
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    rules List<DnsCustomResolverRule>
    timeouts DnsCustomResolverTimeouts
    allowDisruptiveUpdates boolean
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    createdOn string
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    customResolverId string
    (String) The unique ID of the private DNS custom resolver.
    description string
    Descriptive text of the custom resolver.
    dnsCustomResolverId string
    enabled boolean
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    health string
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    highAvailability boolean
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    instanceId string
    The GUID of the private DNS service instance.
    locations DnsCustomResolverLocation[]
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    modifiedOn string
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    name string
    The name of the custom resolver.
    profile string
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    rules DnsCustomResolverRule[]
    timeouts DnsCustomResolverTimeouts
    allow_disruptive_updates bool
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    created_on str
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    custom_resolver_id str
    (String) The unique ID of the private DNS custom resolver.
    description str
    Descriptive text of the custom resolver.
    dns_custom_resolver_id str
    enabled bool
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    health str
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    high_availability bool
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    instance_id str
    The GUID of the private DNS service instance.
    locations Sequence[DnsCustomResolverLocationArgs]
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    modified_on str
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    name str
    The name of the custom resolver.
    profile str
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    rules Sequence[DnsCustomResolverRuleArgs]
    timeouts DnsCustomResolverTimeoutsArgs
    allowDisruptiveUpdates Boolean
    Whether disruptive update is allowed for the custom resolver. Default value is false.
    createdOn String
    (Timestamp) The time (created On) of the DNS Custom Resolver.
    customResolverId String
    (String) The unique ID of the private DNS custom resolver.
    description String
    Descriptive text of the custom resolver.
    dnsCustomResolverId String
    enabled Boolean
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    health String
    (String) The status of DNS Custom Resolver's health. Possible values are DEGRADED, CRITICAL, HEALTHY.
    highAvailability Boolean
    High Availability is enabled by Default. To meet high availability status, configure custom resolvers with a minimum of two resolver locations.
    instanceId String
    The GUID of the private DNS service instance.
    locations List<Property Map>
    The list of locations where this custom resolver is deployed. A custom resolver can have a maximum of three locations, either within the same subnet or in different subnets.
    modifiedOn String
    (Timestamp) The time (modified On) of the DNS Custom Resolver.
    name String
    The name of the custom resolver.
    profile String
    The profile name of the custom resolver. Supported values are ESSENTIAL, ADVANCED, PREMIER. Default value is ESSENTIAL.
    rules List<Property Map>
    timeouts Property Map

    Supporting Types

    DnsCustomResolverLocation, DnsCustomResolverLocationArgs

    SubnetCrn string
    Subnet CRN
    DnsServerIp string
    (String) The DNS server IP.
    Enabled bool
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    Healthy bool
    (String) The health status.
    LocationId string
    (String) The location ID.
    SubnetCrn string
    Subnet CRN
    DnsServerIp string
    (String) The DNS server IP.
    Enabled bool
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    Healthy bool
    (String) The health status.
    LocationId string
    (String) The location ID.
    subnetCrn String
    Subnet CRN
    dnsServerIp String
    (String) The DNS server IP.
    enabled Boolean
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    healthy Boolean
    (String) The health status.
    locationId String
    (String) The location ID.
    subnetCrn string
    Subnet CRN
    dnsServerIp string
    (String) The DNS server IP.
    enabled boolean
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    healthy boolean
    (String) The health status.
    locationId string
    (String) The location ID.
    subnet_crn str
    Subnet CRN
    dns_server_ip str
    (String) The DNS server IP.
    enabled bool
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    healthy bool
    (String) The health status.
    location_id str
    (String) The location ID.
    subnetCrn String
    Subnet CRN
    dnsServerIp String
    (String) The DNS server IP.
    enabled Boolean
    To enable or disable a custom resolver. To enable a custom resolver, it is recommended that you have at least one enabled location. The Default value is false.
    healthy Boolean
    (String) The health status.
    locationId String
    (String) The location ID.

    DnsCustomResolverRule, DnsCustomResolverRuleArgs

    Description string
    Descriptive text of the custom resolver.
    ForwardTos List<string>
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    Match string
    (String) The matching zone or hostname.
    RuleId string
    (String) The rule ID is unique identifier of the custom resolver forwarding rule.
    Type string
    (String) Type of the forwarding rule.

    • Constraints: Allowable values are: zone, hostname.
    Views List<DnsCustomResolverRuleView>
    (List) List of views attached to the custom resolver.
    Description string
    Descriptive text of the custom resolver.
    ForwardTos []string
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    Match string
    (String) The matching zone or hostname.
    RuleId string
    (String) The rule ID is unique identifier of the custom resolver forwarding rule.
    Type string
    (String) Type of the forwarding rule.

    • Constraints: Allowable values are: zone, hostname.
    Views []DnsCustomResolverRuleView
    (List) List of views attached to the custom resolver.
    description String
    Descriptive text of the custom resolver.
    forwardTos List<String>
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    match String
    (String) The matching zone or hostname.
    ruleId String
    (String) The rule ID is unique identifier of the custom resolver forwarding rule.
    type String
    (String) Type of the forwarding rule.

    • Constraints: Allowable values are: zone, hostname.
    views List<DnsCustomResolverRuleView>
    (List) List of views attached to the custom resolver.
    description string
    Descriptive text of the custom resolver.
    forwardTos string[]
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    match string
    (String) The matching zone or hostname.
    ruleId string
    (String) The rule ID is unique identifier of the custom resolver forwarding rule.
    type string
    (String) Type of the forwarding rule.

    • Constraints: Allowable values are: zone, hostname.
    views DnsCustomResolverRuleView[]
    (List) List of views attached to the custom resolver.
    description str
    Descriptive text of the custom resolver.
    forward_tos Sequence[str]
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    match str
    (String) The matching zone or hostname.
    rule_id str
    (String) The rule ID is unique identifier of the custom resolver forwarding rule.
    type str
    (String) Type of the forwarding rule.

    • Constraints: Allowable values are: zone, hostname.
    views Sequence[DnsCustomResolverRuleView]
    (List) List of views attached to the custom resolver.
    description String
    Descriptive text of the custom resolver.
    forwardTos List<String>
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    match String
    (String) The matching zone or hostname.
    ruleId String
    (String) The rule ID is unique identifier of the custom resolver forwarding rule.
    type String
    (String) Type of the forwarding rule.

    • Constraints: Allowable values are: zone, hostname.
    views List<Property Map>
    (List) List of views attached to the custom resolver.

    DnsCustomResolverRuleView, DnsCustomResolverRuleViewArgs

    Description string
    Descriptive text of the custom resolver.
    Expression string
    (String) Expression of the view.
    ForwardTos List<string>
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    Name string
    The name of the custom resolver.
    Description string
    Descriptive text of the custom resolver.
    Expression string
    (String) Expression of the view.
    ForwardTos []string
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    Name string
    The name of the custom resolver.
    description String
    Descriptive text of the custom resolver.
    expression String
    (String) Expression of the view.
    forwardTos List<String>
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    name String
    The name of the custom resolver.
    description string
    Descriptive text of the custom resolver.
    expression string
    (String) Expression of the view.
    forwardTos string[]
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    name string
    The name of the custom resolver.
    description str
    Descriptive text of the custom resolver.
    expression str
    (String) Expression of the view.
    forward_tos Sequence[str]
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    name str
    The name of the custom resolver.
    description String
    Descriptive text of the custom resolver.
    expression String
    (String) Expression of the view.
    forwardTos List<String>
    (List) List of the upstream DNS servers that the matching DNS queries will be forwarded to.
    name String
    The name of the custom resolver.

    DnsCustomResolverTimeouts, DnsCustomResolverTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Import

    Example

    terraform

    $ pulumi import ibm:index/dnsCustomResolver:DnsCustomResolver example 270edfad-8574-4ce0-86bf-5c158d3e38fe:345ca2c4-83bf-4c04-bb09-5d8ec4d425a8
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud