1. Packages
  2. Packages
  3. Gcore Provider
  4. API Docs
  5. getDnsNetworkMappings
Viewing docs for gcore 2.0.0-alpha.15
published on Thursday, Aug 6, 2026 by g-core
Viewing docs for gcore 2.0.0-alpha.15
published on Thursday, Aug 6, 2026 by g-core

    DNS network mappings associate CIDR ranges with network tags for private DNS resolution and traffic-based routing.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const exampleDnsNetworkMappings = gcore.getDnsNetworkMappings({
        orderBy: "order_by",
        orderDirection: "asc",
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_dns_network_mappings = gcore.get_dns_network_mappings(order_by="order_by",
        order_direction="asc")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.GetDnsNetworkMappings(ctx, &gcore.GetDnsNetworkMappingsArgs{
    			OrderBy:        pulumi.StringRef("order_by"),
    			OrderDirection: pulumi.StringRef("asc"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleDnsNetworkMappings = Gcore.GetDnsNetworkMappings.Invoke(new()
        {
            OrderBy = "order_by",
            OrderDirection = "asc",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.GcoreFunctions;
    import com.pulumi.gcore.inputs.GetDnsNetworkMappingsArgs;
    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 exampleDnsNetworkMappings = GcoreFunctions.getDnsNetworkMappings(GetDnsNetworkMappingsArgs.builder()
                .orderBy("order_by")
                .orderDirection("asc")
                .build());
    
        }
    }
    
    variables:
      exampleDnsNetworkMappings:
        fn::invoke:
          function: gcore:getDnsNetworkMappings
          arguments:
            orderBy: order_by
            orderDirection: asc
    
    Example coming soon!
    

    Using getDnsNetworkMappings

    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 getDnsNetworkMappings(args: GetDnsNetworkMappingsArgs, opts?: InvokeOptions): Promise<GetDnsNetworkMappingsResult>
    function getDnsNetworkMappingsOutput(args: GetDnsNetworkMappingsOutputArgs, opts?: InvokeOptions): Output<GetDnsNetworkMappingsResult>
    def get_dns_network_mappings(max_items: Optional[float] = None,
                                 order_by: Optional[str] = None,
                                 order_direction: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetDnsNetworkMappingsResult
    def get_dns_network_mappings_output(max_items: pulumi.Input[Optional[float]] = None,
                                 order_by: pulumi.Input[Optional[str]] = None,
                                 order_direction: pulumi.Input[Optional[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetDnsNetworkMappingsResult]
    func GetDnsNetworkMappings(ctx *Context, args *GetDnsNetworkMappingsArgs, opts ...InvokeOption) (*GetDnsNetworkMappingsResult, error)
    func GetDnsNetworkMappingsOutput(ctx *Context, args *GetDnsNetworkMappingsOutputArgs, opts ...InvokeOption) GetDnsNetworkMappingsResultOutput

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

    public static class GetDnsNetworkMappings 
    {
        public static Task<GetDnsNetworkMappingsResult> InvokeAsync(GetDnsNetworkMappingsArgs args, InvokeOptions? opts = null)
        public static Output<GetDnsNetworkMappingsResult> Invoke(GetDnsNetworkMappingsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDnsNetworkMappingsResult> getDnsNetworkMappings(GetDnsNetworkMappingsArgs args, InvokeOptions options)
    public static Output<GetDnsNetworkMappingsResult> getDnsNetworkMappings(GetDnsNetworkMappingsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getDnsNetworkMappings:getDnsNetworkMappings
      arguments:
        # arguments dictionary
    data "gcore_get_dns_network_mappings" "name" {
        # arguments
    }

    The following arguments are supported:

    MaxItems double
    Max items to fetch, default: 1000
    OrderBy string
    Field name to sort by
    OrderDirection string
    Ascending or descending order Available values: "asc", "desc".
    MaxItems float64
    Max items to fetch, default: 1000
    OrderBy string
    Field name to sort by
    OrderDirection string
    Ascending or descending order Available values: "asc", "desc".
    max_items number
    Max items to fetch, default: 1000
    order_by string
    Field name to sort by
    order_direction string
    Ascending or descending order Available values: "asc", "desc".
    maxItems Double
    Max items to fetch, default: 1000
    orderBy String
    Field name to sort by
    orderDirection String
    Ascending or descending order Available values: "asc", "desc".
    maxItems number
    Max items to fetch, default: 1000
    orderBy string
    Field name to sort by
    orderDirection string
    Ascending or descending order Available values: "asc", "desc".
    max_items float
    Max items to fetch, default: 1000
    order_by str
    Field name to sort by
    order_direction str
    Ascending or descending order Available values: "asc", "desc".
    maxItems Number
    Max items to fetch, default: 1000
    orderBy String
    Field name to sort by
    orderDirection String
    Ascending or descending order Available values: "asc", "desc".

    getDnsNetworkMappings Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<GetDnsNetworkMappingsItem>
    The items returned by the data source
    MaxItems double
    Max items to fetch, default: 1000
    OrderBy string
    Field name to sort by
    OrderDirection string
    Ascending or descending order Available values: "asc", "desc".
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetDnsNetworkMappingsItem
    The items returned by the data source
    MaxItems float64
    Max items to fetch, default: 1000
    OrderBy string
    Field name to sort by
    OrderDirection string
    Ascending or descending order Available values: "asc", "desc".
    id string
    The provider-assigned unique ID for this managed resource.
    items list(object)
    The items returned by the data source
    max_items number
    Max items to fetch, default: 1000
    order_by string
    Field name to sort by
    order_direction string
    Ascending or descending order Available values: "asc", "desc".
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetDnsNetworkMappingsItem>
    The items returned by the data source
    maxItems Double
    Max items to fetch, default: 1000
    orderBy String
    Field name to sort by
    orderDirection String
    Ascending or descending order Available values: "asc", "desc".
    id string
    The provider-assigned unique ID for this managed resource.
    items GetDnsNetworkMappingsItem[]
    The items returned by the data source
    maxItems number
    Max items to fetch, default: 1000
    orderBy string
    Field name to sort by
    orderDirection string
    Ascending or descending order Available values: "asc", "desc".
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[GetDnsNetworkMappingsItem]
    The items returned by the data source
    max_items float
    Max items to fetch, default: 1000
    order_by str
    Field name to sort by
    order_direction str
    Ascending or descending order Available values: "asc", "desc".
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    The items returned by the data source
    maxItems Number
    Max items to fetch, default: 1000
    orderBy String
    Field name to sort by
    orderDirection String
    Ascending or descending order Available values: "asc", "desc".

    Supporting Types

    GetDnsNetworkMappingsItem

    GetDnsNetworkMappingsItemMapping

    Cidr4s List<string>
    Cidr6s List<string>
    Tags List<string>
    Cidr4s []string
    Cidr6s []string
    Tags []string
    cidr4s list(string)
    cidr6s list(string)
    tags list(string)
    cidr4s List<String>
    cidr6s List<String>
    tags List<String>
    cidr4s string[]
    cidr6s string[]
    tags string[]
    cidr4s Sequence[str]
    cidr6s Sequence[str]
    tags Sequence[str]
    cidr4s List<String>
    cidr6s List<String>
    tags List<String>

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    Viewing docs for gcore 2.0.0-alpha.15
    published on Thursday, Aug 6, 2026 by g-core

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial