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

ibm.getDnsCustomResolverSecondaryZones

Explore with Pulumi AI

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

    Provides a read-only data source for secondary zones. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax. For more information about secondary zones, refer to list-secondary-zones.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const test_sz = ibm.getDnsCustomResolverSecondaryZones({
        instanceId: ibm_dns_custom_resolver.test.instance_id,
        resolverId: ibm_dns_custom_resolver.test.custom_resolver_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test_sz = ibm.get_dns_custom_resolver_secondary_zones(instance_id=ibm_dns_custom_resolver["test"]["instance_id"],
        resolver_id=ibm_dns_custom_resolver["test"]["custom_resolver_id"])
    
    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 {
    		_, err := ibm.GetDnsCustomResolverSecondaryZones(ctx, &ibm.GetDnsCustomResolverSecondaryZonesArgs{
    			InstanceId: ibm_dns_custom_resolver.Test.Instance_id,
    			ResolverId: ibm_dns_custom_resolver.Test.Custom_resolver_id,
    		}, nil)
    		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 test_sz = Ibm.GetDnsCustomResolverSecondaryZones.Invoke(new()
        {
            InstanceId = ibm_dns_custom_resolver.Test.Instance_id,
            ResolverId = ibm_dns_custom_resolver.Test.Custom_resolver_id,
        });
    
    });
    
    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.GetDnsCustomResolverSecondaryZonesArgs;
    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 test-sz = IbmFunctions.getDnsCustomResolverSecondaryZones(GetDnsCustomResolverSecondaryZonesArgs.builder()
                .instanceId(ibm_dns_custom_resolver.test().instance_id())
                .resolverId(ibm_dns_custom_resolver.test().custom_resolver_id())
                .build());
    
        }
    }
    
    variables:
      test-sz:
        fn::invoke:
          function: ibm:getDnsCustomResolverSecondaryZones
          arguments:
            instanceId: ${ibm_dns_custom_resolver.test.instance_id}
            resolverId: ${ibm_dns_custom_resolver.test.custom_resolver_id}
    

    Using getDnsCustomResolverSecondaryZones

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDnsCustomResolverSecondaryZones(args: GetDnsCustomResolverSecondaryZonesArgs, opts?: InvokeOptions): Promise<GetDnsCustomResolverSecondaryZonesResult>
    function getDnsCustomResolverSecondaryZonesOutput(args: GetDnsCustomResolverSecondaryZonesOutputArgs, opts?: InvokeOptions): Output<GetDnsCustomResolverSecondaryZonesResult>
    def get_dns_custom_resolver_secondary_zones(id: Optional[str] = None,
                                                instance_id: Optional[str] = None,
                                                resolver_id: Optional[str] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetDnsCustomResolverSecondaryZonesResult
    def get_dns_custom_resolver_secondary_zones_output(id: Optional[pulumi.Input[str]] = None,
                                                instance_id: Optional[pulumi.Input[str]] = None,
                                                resolver_id: Optional[pulumi.Input[str]] = None,
                                                opts: Optional[InvokeOptions] = None) -> Output[GetDnsCustomResolverSecondaryZonesResult]
    func GetDnsCustomResolverSecondaryZones(ctx *Context, args *GetDnsCustomResolverSecondaryZonesArgs, opts ...InvokeOption) (*GetDnsCustomResolverSecondaryZonesResult, error)
    func GetDnsCustomResolverSecondaryZonesOutput(ctx *Context, args *GetDnsCustomResolverSecondaryZonesOutputArgs, opts ...InvokeOption) GetDnsCustomResolverSecondaryZonesResultOutput

    > Note: This function is named GetDnsCustomResolverSecondaryZones in the Go SDK.

    public static class GetDnsCustomResolverSecondaryZones 
    {
        public static Task<GetDnsCustomResolverSecondaryZonesResult> InvokeAsync(GetDnsCustomResolverSecondaryZonesArgs args, InvokeOptions? opts = null)
        public static Output<GetDnsCustomResolverSecondaryZonesResult> Invoke(GetDnsCustomResolverSecondaryZonesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDnsCustomResolverSecondaryZonesResult> getDnsCustomResolverSecondaryZones(GetDnsCustomResolverSecondaryZonesArgs args, InvokeOptions options)
    public static Output<GetDnsCustomResolverSecondaryZonesResult> getDnsCustomResolverSecondaryZones(GetDnsCustomResolverSecondaryZonesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getDnsCustomResolverSecondaryZones:getDnsCustomResolverSecondaryZones
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    The GUID of the DNS Services instance.
    ResolverId string
    The unique identifier of a custom resolver.
    Id string
    InstanceId string
    The GUID of the DNS Services instance.
    ResolverId string
    The unique identifier of a custom resolver.
    Id string
    instanceId String
    The GUID of the DNS Services instance.
    resolverId String
    The unique identifier of a custom resolver.
    id String
    instanceId string
    The GUID of the DNS Services instance.
    resolverId string
    The unique identifier of a custom resolver.
    id string
    instance_id str
    The GUID of the DNS Services instance.
    resolver_id str
    The unique identifier of a custom resolver.
    id str
    instanceId String
    The GUID of the DNS Services instance.
    resolverId String
    The unique identifier of a custom resolver.
    id String

    getDnsCustomResolverSecondaryZones Result

    The following output properties are available:

    id String
    instanceId String
    resolverId String
    secondaryZones List<Property Map>
    (List) List of secondary zones.

    Supporting Types

    GetDnsCustomResolverSecondaryZonesSecondaryZone

    CreatedOn string
    Description string
    (String) Descriptive text of the secondary zone.
    Enabled bool
    (String) Enable/Disable the secondary zone.
    ModifiedOn string
    SecondaryZoneId string
    TransferFroms List<string>
    (List) The addresses of DNS servers where the secondary zone data is transferred from.
    Zone string
    (String) The name of the zone.
    CreatedOn string
    Description string
    (String) Descriptive text of the secondary zone.
    Enabled bool
    (String) Enable/Disable the secondary zone.
    ModifiedOn string
    SecondaryZoneId string
    TransferFroms []string
    (List) The addresses of DNS servers where the secondary zone data is transferred from.
    Zone string
    (String) The name of the zone.
    createdOn String
    description String
    (String) Descriptive text of the secondary zone.
    enabled Boolean
    (String) Enable/Disable the secondary zone.
    modifiedOn String
    secondaryZoneId String
    transferFroms List<String>
    (List) The addresses of DNS servers where the secondary zone data is transferred from.
    zone String
    (String) The name of the zone.
    createdOn string
    description string
    (String) Descriptive text of the secondary zone.
    enabled boolean
    (String) Enable/Disable the secondary zone.
    modifiedOn string
    secondaryZoneId string
    transferFroms string[]
    (List) The addresses of DNS servers where the secondary zone data is transferred from.
    zone string
    (String) The name of the zone.
    created_on str
    description str
    (String) Descriptive text of the secondary zone.
    enabled bool
    (String) Enable/Disable the secondary zone.
    modified_on str
    secondary_zone_id str
    transfer_froms Sequence[str]
    (List) The addresses of DNS servers where the secondary zone data is transferred from.
    zone str
    (String) The name of the zone.
    createdOn String
    description String
    (String) Descriptive text of the secondary zone.
    enabled Boolean
    (String) Enable/Disable the secondary zone.
    modifiedOn String
    secondaryZoneId String
    transferFroms List<String>
    (List) The addresses of DNS servers where the secondary zone data is transferred from.
    zone String
    (String) The name of the zone.

    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