1. Packages
  2. Infoblox Provider
  3. API Docs
  4. NsRecord
infoblox 2.10.0 published on Friday, Apr 25, 2025 by infobloxopen

infoblox.NsRecord

Explore with Pulumi AI

infoblox logo
infoblox 2.10.0 published on Friday, Apr 25, 2025 by infobloxopen

    # NS-record Resource

    The infoblox.NsRecord resource enables you to perform create, update and delete operations on NS Record in a NIOS appliance. The resource represents the ‘record:ns’ WAPI object in NIOS.

    Note: NS record objects do not support extensible attributes.

    The following list describes the parameters you can define in the resource block of the NS Record object:

    • name: required, The name of the NS record in FQDN format. This value can be in unicode format. Values with leading or trailing white space are not valid for this field. Example: test.com
    • nameserver: required, The domain name of an authoritative server for the redirected zone. Values with leading or trailing white space are not valid for this field. Example: ns1.test.com
    • addresses: required, The list of zone name servers.
    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    • dns_view: optional, The name of the DNS view in which the record resides.The default value is The default DNS view. Example: external

    Examples of a NS Record Block

    import * as pulumi from "@pulumi/pulumi";
    import * as infoblox from "@pulumi/infoblox";
    
    //creating NS record 
    const ns = new infoblox.NsRecord("ns", {
        addresses: [{
            address: "2.3.2.5",
            autoCreatePtr: true,
        }],
        dnsView: "default",
        nameserver: "name_server.test.com",
    });
    
    import pulumi
    import pulumi_infoblox as infoblox
    
    #creating NS record 
    ns = infoblox.NsRecord("ns",
        addresses=[{
            "address": "2.3.2.5",
            "auto_create_ptr": True,
        }],
        dns_view="default",
        nameserver="name_server.test.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/infoblox/v2/infoblox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// creating NS record
    		_, err := infoblox.NewNsRecord(ctx, "ns", &infoblox.NsRecordArgs{
    			Addresses: infoblox.NsRecordAddressArray{
    				&infoblox.NsRecordAddressArgs{
    					Address:       pulumi.String("2.3.2.5"),
    					AutoCreatePtr: pulumi.Bool(true),
    				},
    			},
    			DnsView:    pulumi.String("default"),
    			Nameserver: pulumi.String("name_server.test.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Infoblox = Pulumi.Infoblox;
    
    return await Deployment.RunAsync(() => 
    {
        //creating NS record 
        var ns = new Infoblox.NsRecord("ns", new()
        {
            Addresses = new[]
            {
                new Infoblox.Inputs.NsRecordAddressArgs
                {
                    Address = "2.3.2.5",
                    AutoCreatePtr = true,
                },
            },
            DnsView = "default",
            Nameserver = "name_server.test.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.infoblox.NsRecord;
    import com.pulumi.infoblox.NsRecordArgs;
    import com.pulumi.infoblox.inputs.NsRecordAddressArgs;
    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) {
            //creating NS record 
            var ns = new NsRecord("ns", NsRecordArgs.builder()
                .addresses(NsRecordAddressArgs.builder()
                    .address("2.3.2.5")
                    .autoCreatePtr(true)
                    .build())
                .dnsView("default")
                .nameserver("name_server.test.com")
                .build());
    
        }
    }
    
    resources:
      # creating NS record
      ns:
        type: infoblox:NsRecord
        properties:
          addresses:
            - address: 2.3.2.5
              autoCreatePtr: true
          dnsView: default
          nameserver: name_server.test.com
    

    Create NsRecord Resource

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

    Constructor syntax

    new NsRecord(name: string, args: NsRecordArgs, opts?: CustomResourceOptions);
    @overload
    def NsRecord(resource_name: str,
                 args: NsRecordArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def NsRecord(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 addresses: Optional[Sequence[NsRecordAddressArgs]] = None,
                 nameserver: Optional[str] = None,
                 dns_view: Optional[str] = None,
                 name: Optional[str] = None,
                 ns_record_id: Optional[str] = None)
    func NewNsRecord(ctx *Context, name string, args NsRecordArgs, opts ...ResourceOption) (*NsRecord, error)
    public NsRecord(string name, NsRecordArgs args, CustomResourceOptions? opts = null)
    public NsRecord(String name, NsRecordArgs args)
    public NsRecord(String name, NsRecordArgs args, CustomResourceOptions options)
    
    type: infoblox:NsRecord
    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 NsRecordArgs
    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 NsRecordArgs
    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 NsRecordArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NsRecordArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NsRecordArgs
    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 nsRecordResource = new Infoblox.NsRecord("nsRecordResource", new()
    {
        Addresses = new[]
        {
            new Infoblox.Inputs.NsRecordAddressArgs
            {
                Address = "string",
                AutoCreatePtr = false,
            },
        },
        Nameserver = "string",
        DnsView = "string",
        Name = "string",
        NsRecordId = "string",
    });
    
    example, err := infoblox.NewNsRecord(ctx, "nsRecordResource", &infoblox.NsRecordArgs{
    	Addresses: infoblox.NsRecordAddressArray{
    		&infoblox.NsRecordAddressArgs{
    			Address:       pulumi.String("string"),
    			AutoCreatePtr: pulumi.Bool(false),
    		},
    	},
    	Nameserver: pulumi.String("string"),
    	DnsView:    pulumi.String("string"),
    	Name:       pulumi.String("string"),
    	NsRecordId: pulumi.String("string"),
    })
    
    var nsRecordResource = new NsRecord("nsRecordResource", NsRecordArgs.builder()
        .addresses(NsRecordAddressArgs.builder()
            .address("string")
            .autoCreatePtr(false)
            .build())
        .nameserver("string")
        .dnsView("string")
        .name("string")
        .nsRecordId("string")
        .build());
    
    ns_record_resource = infoblox.NsRecord("nsRecordResource",
        addresses=[{
            "address": "string",
            "auto_create_ptr": False,
        }],
        nameserver="string",
        dns_view="string",
        name="string",
        ns_record_id="string")
    
    const nsRecordResource = new infoblox.NsRecord("nsRecordResource", {
        addresses: [{
            address: "string",
            autoCreatePtr: false,
        }],
        nameserver: "string",
        dnsView: "string",
        name: "string",
        nsRecordId: "string",
    });
    
    type: infoblox:NsRecord
    properties:
        addresses:
            - address: string
              autoCreatePtr: false
        dnsView: string
        name: string
        nameserver: string
        nsRecordId: string
    

    NsRecord 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 NsRecord resource accepts the following input properties:

    Addresses List<NsRecordAddress>
    The list of zone name servers.
    Nameserver string
    The domain name of an authoritative server for the redirected zone.
    DnsView string
    The name of the DNS view in which the record resides.Example: “external”.
    Name string
    The name of the NS record in FQDN format. This value can be in unicode format.
    NsRecordId string
    Addresses []NsRecordAddressArgs
    The list of zone name servers.
    Nameserver string
    The domain name of an authoritative server for the redirected zone.
    DnsView string
    The name of the DNS view in which the record resides.Example: “external”.
    Name string
    The name of the NS record in FQDN format. This value can be in unicode format.
    NsRecordId string
    addresses List<NsRecordAddress>
    The list of zone name servers.
    nameserver String
    The domain name of an authoritative server for the redirected zone.
    dnsView String
    The name of the DNS view in which the record resides.Example: “external”.
    name String
    The name of the NS record in FQDN format. This value can be in unicode format.
    nsRecordId String
    addresses NsRecordAddress[]
    The list of zone name servers.
    nameserver string
    The domain name of an authoritative server for the redirected zone.
    dnsView string
    The name of the DNS view in which the record resides.Example: “external”.
    name string
    The name of the NS record in FQDN format. This value can be in unicode format.
    nsRecordId string
    addresses Sequence[NsRecordAddressArgs]
    The list of zone name servers.
    nameserver str
    The domain name of an authoritative server for the redirected zone.
    dns_view str
    The name of the DNS view in which the record resides.Example: “external”.
    name str
    The name of the NS record in FQDN format. This value can be in unicode format.
    ns_record_id str
    addresses List<Property Map>
    The list of zone name servers.
    nameserver String
    The domain name of an authoritative server for the redirected zone.
    dnsView String
    The name of the DNS view in which the record resides.Example: “external”.
    name String
    The name of the NS record in FQDN format. This value can be in unicode format.
    nsRecordId String

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Ref string
    NIOS object's reference, not to be set by a user.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ref string
    NIOS object's reference, not to be set by a user.
    id String
    The provider-assigned unique ID for this managed resource.
    ref String
    NIOS object's reference, not to be set by a user.
    id string
    The provider-assigned unique ID for this managed resource.
    ref string
    NIOS object's reference, not to be set by a user.
    id str
    The provider-assigned unique ID for this managed resource.
    ref str
    NIOS object's reference, not to be set by a user.
    id String
    The provider-assigned unique ID for this managed resource.
    ref String
    NIOS object's reference, not to be set by a user.

    Look up Existing NsRecord Resource

    Get an existing NsRecord 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?: NsRecordState, opts?: CustomResourceOptions): NsRecord
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            addresses: Optional[Sequence[NsRecordAddressArgs]] = None,
            dns_view: Optional[str] = None,
            name: Optional[str] = None,
            nameserver: Optional[str] = None,
            ns_record_id: Optional[str] = None,
            ref: Optional[str] = None) -> NsRecord
    func GetNsRecord(ctx *Context, name string, id IDInput, state *NsRecordState, opts ...ResourceOption) (*NsRecord, error)
    public static NsRecord Get(string name, Input<string> id, NsRecordState? state, CustomResourceOptions? opts = null)
    public static NsRecord get(String name, Output<String> id, NsRecordState state, CustomResourceOptions options)
    resources:  _:    type: infoblox:NsRecord    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:
    Addresses List<NsRecordAddress>
    The list of zone name servers.
    DnsView string
    The name of the DNS view in which the record resides.Example: “external”.
    Name string
    The name of the NS record in FQDN format. This value can be in unicode format.
    Nameserver string
    The domain name of an authoritative server for the redirected zone.
    NsRecordId string
    Ref string
    NIOS object's reference, not to be set by a user.
    Addresses []NsRecordAddressArgs
    The list of zone name servers.
    DnsView string
    The name of the DNS view in which the record resides.Example: “external”.
    Name string
    The name of the NS record in FQDN format. This value can be in unicode format.
    Nameserver string
    The domain name of an authoritative server for the redirected zone.
    NsRecordId string
    Ref string
    NIOS object's reference, not to be set by a user.
    addresses List<NsRecordAddress>
    The list of zone name servers.
    dnsView String
    The name of the DNS view in which the record resides.Example: “external”.
    name String
    The name of the NS record in FQDN format. This value can be in unicode format.
    nameserver String
    The domain name of an authoritative server for the redirected zone.
    nsRecordId String
    ref String
    NIOS object's reference, not to be set by a user.
    addresses NsRecordAddress[]
    The list of zone name servers.
    dnsView string
    The name of the DNS view in which the record resides.Example: “external”.
    name string
    The name of the NS record in FQDN format. This value can be in unicode format.
    nameserver string
    The domain name of an authoritative server for the redirected zone.
    nsRecordId string
    ref string
    NIOS object's reference, not to be set by a user.
    addresses Sequence[NsRecordAddressArgs]
    The list of zone name servers.
    dns_view str
    The name of the DNS view in which the record resides.Example: “external”.
    name str
    The name of the NS record in FQDN format. This value can be in unicode format.
    nameserver str
    The domain name of an authoritative server for the redirected zone.
    ns_record_id str
    ref str
    NIOS object's reference, not to be set by a user.
    addresses List<Property Map>
    The list of zone name servers.
    dnsView String
    The name of the DNS view in which the record resides.Example: “external”.
    name String
    The name of the NS record in FQDN format. This value can be in unicode format.
    nameserver String
    The domain name of an authoritative server for the redirected zone.
    nsRecordId String
    ref String
    NIOS object's reference, not to be set by a user.

    Supporting Types

    NsRecordAddress, NsRecordAddressArgs

    Address string
    he address of the Zone Name Server.
    AutoCreatePtr bool
    Flag to indicate if ptr records need to be auto created.
    Address string
    he address of the Zone Name Server.
    AutoCreatePtr bool
    Flag to indicate if ptr records need to be auto created.
    address String
    he address of the Zone Name Server.
    autoCreatePtr Boolean
    Flag to indicate if ptr records need to be auto created.
    address string
    he address of the Zone Name Server.
    autoCreatePtr boolean
    Flag to indicate if ptr records need to be auto created.
    address str
    he address of the Zone Name Server.
    auto_create_ptr bool
    Flag to indicate if ptr records need to be auto created.
    address String
    he address of the Zone Name Server.
    autoCreatePtr Boolean
    Flag to indicate if ptr records need to be auto created.

    Package Details

    Repository
    infoblox infobloxopen/terraform-provider-infoblox
    License
    Notes
    This Pulumi package is based on the infoblox Terraform Provider.
    infoblox logo
    infoblox 2.10.0 published on Friday, Apr 25, 2025 by infobloxopen