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

ibm.getDnsCustomResolverForwardingRules

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 forwarding rules. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax. For more information about forwarding rules, refer to list-forwarding-rules

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const test_fr = ibm.getDnsCustomResolverForwardingRules({
        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_fr = ibm.get_dns_custom_resolver_forwarding_rules(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.GetDnsCustomResolverForwardingRules(ctx, &ibm.GetDnsCustomResolverForwardingRulesArgs{
    			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_fr = Ibm.GetDnsCustomResolverForwardingRules.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.GetDnsCustomResolverForwardingRulesArgs;
    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-fr = IbmFunctions.getDnsCustomResolverForwardingRules(GetDnsCustomResolverForwardingRulesArgs.builder()
                .instanceId(ibm_dns_custom_resolver.test().instance_id())
                .resolverId(ibm_dns_custom_resolver.test().custom_resolver_id())
                .build());
    
        }
    }
    
    variables:
      test-fr:
        fn::invoke:
          function: ibm:getDnsCustomResolverForwardingRules
          arguments:
            instanceId: ${ibm_dns_custom_resolver.test.instance_id}
            resolverId: ${ibm_dns_custom_resolver.test.custom_resolver_id}
    

    Using getDnsCustomResolverForwardingRules

    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 getDnsCustomResolverForwardingRules(args: GetDnsCustomResolverForwardingRulesArgs, opts?: InvokeOptions): Promise<GetDnsCustomResolverForwardingRulesResult>
    function getDnsCustomResolverForwardingRulesOutput(args: GetDnsCustomResolverForwardingRulesOutputArgs, opts?: InvokeOptions): Output<GetDnsCustomResolverForwardingRulesResult>
    def get_dns_custom_resolver_forwarding_rules(id: Optional[str] = None,
                                                 instance_id: Optional[str] = None,
                                                 resolver_id: Optional[str] = None,
                                                 opts: Optional[InvokeOptions] = None) -> GetDnsCustomResolverForwardingRulesResult
    def get_dns_custom_resolver_forwarding_rules_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[GetDnsCustomResolverForwardingRulesResult]
    func GetDnsCustomResolverForwardingRules(ctx *Context, args *GetDnsCustomResolverForwardingRulesArgs, opts ...InvokeOption) (*GetDnsCustomResolverForwardingRulesResult, error)
    func GetDnsCustomResolverForwardingRulesOutput(ctx *Context, args *GetDnsCustomResolverForwardingRulesOutputArgs, opts ...InvokeOption) GetDnsCustomResolverForwardingRulesResultOutput

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

    public static class GetDnsCustomResolverForwardingRules 
    {
        public static Task<GetDnsCustomResolverForwardingRulesResult> InvokeAsync(GetDnsCustomResolverForwardingRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetDnsCustomResolverForwardingRulesResult> Invoke(GetDnsCustomResolverForwardingRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDnsCustomResolverForwardingRulesResult> getDnsCustomResolverForwardingRules(GetDnsCustomResolverForwardingRulesArgs args, InvokeOptions options)
    public static Output<GetDnsCustomResolverForwardingRulesResult> getDnsCustomResolverForwardingRules(GetDnsCustomResolverForwardingRulesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getDnsCustomResolverForwardingRules:getDnsCustomResolverForwardingRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getDnsCustomResolverForwardingRules Result

    The following output properties are available:

    Supporting Types

    GetDnsCustomResolverForwardingRulesRule

    Description string
    (String) Description of the view.
    ForwardTos List<string>
    (List) List of upstream DNS servers that the matching DNS queries will be forwarded to.
    Match string
    (String) The matching zone or hostname.
    RuleId string
    (String) Identifier of the forwarding rule.
    Type string
    (String) Type of the forwarding rule.
    Views List<GetDnsCustomResolverForwardingRulesRuleView>
    (List) List of views attached to the custom resolver.
    Description string
    (String) Description of the view.
    ForwardTos []string
    (List) List of upstream DNS servers that the matching DNS queries will be forwarded to.
    Match string
    (String) The matching zone or hostname.
    RuleId string
    (String) Identifier of the forwarding rule.
    Type string
    (String) Type of the forwarding rule.
    Views []GetDnsCustomResolverForwardingRulesRuleView
    (List) List of views attached to the custom resolver.
    description String
    (String) Description of the view.
    forwardTos List<String>
    (List) List of upstream DNS servers that the matching DNS queries will be forwarded to.
    match String
    (String) The matching zone or hostname.
    ruleId String
    (String) Identifier of the forwarding rule.
    type String
    (String) Type of the forwarding rule.
    views List<GetDnsCustomResolverForwardingRulesRuleView>
    (List) List of views attached to the custom resolver.
    description string
    (String) Description of the view.
    forwardTos string[]
    (List) List of upstream DNS servers that the matching DNS queries will be forwarded to.
    match string
    (String) The matching zone or hostname.
    ruleId string
    (String) Identifier of the forwarding rule.
    type string
    (String) Type of the forwarding rule.
    views GetDnsCustomResolverForwardingRulesRuleView[]
    (List) List of views attached to the custom resolver.
    description str
    (String) Description of the view.
    forward_tos Sequence[str]
    (List) List of upstream DNS servers that the matching DNS queries will be forwarded to.
    match str
    (String) The matching zone or hostname.
    rule_id str
    (String) Identifier of the forwarding rule.
    type str
    (String) Type of the forwarding rule.
    views Sequence[GetDnsCustomResolverForwardingRulesRuleView]
    (List) List of views attached to the custom resolver.
    description String
    (String) Description of the view.
    forwardTos List<String>
    (List) List of upstream DNS servers that the matching DNS queries will be forwarded to.
    match String
    (String) The matching zone or hostname.
    ruleId String
    (String) Identifier of the forwarding rule.
    type String
    (String) Type of the forwarding rule.
    views List<Property Map>
    (List) List of views attached to the custom resolver.

    GetDnsCustomResolverForwardingRulesRuleView

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

    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