ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getDnsCustomResolverForwardingRules
Explore with Pulumi AI
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:
- Instance
Id string - The GUID of the private DNS service instance.
- Resolver
Id string - The unique identifier of a custom resolver.
- Id string
- Instance
Id string - The GUID of the private DNS service instance.
- Resolver
Id string - The unique identifier of a custom resolver.
- Id string
- instance
Id String - The GUID of the private DNS service instance.
- resolver
Id String - The unique identifier of a custom resolver.
- id String
- instance
Id string - The GUID of the private DNS service instance.
- resolver
Id 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
- instance
Id String - The GUID of the private DNS service instance.
- resolver
Id String - The unique identifier of a custom resolver.
- id String
getDnsCustomResolverForwardingRules Result
The following output properties are available:
- Id string
- Instance
Id string - Resolver
Id string - Rules
List<Get
Dns Custom Resolver Forwarding Rules Rule>
- Id string
- Instance
Id string - Resolver
Id string - Rules
[]Get
Dns Custom Resolver Forwarding Rules Rule
- id String
- instance
Id String - resolver
Id String - rules
List<Get
Dns Custom Resolver Forwarding Rules Rule>
- id string
- instance
Id string - resolver
Id string - rules
Get
Dns Custom Resolver Forwarding Rules Rule[]
- id String
- instance
Id String - resolver
Id String - rules List<Property Map>
Supporting Types
GetDnsCustomResolverForwardingRulesRule
- Description string
- (String) Description of the view.
- Forward
Tos 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.
- Rule
Id string - (String) Identifier of the forwarding rule.
- Type string
- (String) Type of the forwarding rule.
- Views
List<Get
Dns Custom Resolver Forwarding Rules Rule View> - (List) List of views attached to the custom resolver.
- Description string
- (String) Description of the view.
- Forward
Tos []string - (List) List of upstream DNS servers that the matching DNS queries will be forwarded to.
- Match string
- (String) The matching zone or hostname.
- Rule
Id string - (String) Identifier of the forwarding rule.
- Type string
- (String) Type of the forwarding rule.
- Views
[]Get
Dns Custom Resolver Forwarding Rules Rule View - (List) List of views attached to the custom resolver.
- description String
- (String) Description of the view.
- forward
Tos 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.
- rule
Id String - (String) Identifier of the forwarding rule.
- type String
- (String) Type of the forwarding rule.
- views
List<Get
Dns Custom Resolver Forwarding Rules Rule View> - (List) List of views attached to the custom resolver.
- description string
- (String) Description of the view.
- forward
Tos string[] - (List) List of upstream DNS servers that the matching DNS queries will be forwarded to.
- match string
- (String) The matching zone or hostname.
- rule
Id string - (String) Identifier of the forwarding rule.
- type string
- (String) Type of the forwarding rule.
- views
Get
Dns Custom Resolver Forwarding Rules Rule View[] - (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[Get
Dns Custom Resolver Forwarding Rules Rule View] - (List) List of views attached to the custom resolver.
- description String
- (String) Description of the view.
- forward
Tos 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.
- rule
Id 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.
- Forward
Tos 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.
- Forward
Tos []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.
- forward
Tos 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.
- forward
Tos 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.
- forward
Tos 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.