1. Packages
  2. Panos Provider
  3. API Docs
  4. DnsSettings
panos 2.0.0 published on Tuesday, Apr 15, 2025 by paloaltonetworks

panos.DnsSettings

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as panos from "@pulumi/panos";

const example = new panos.DnsSettings("example", {
    dnsSettings: {
        servers: {
            primary: "8.8.8.8",
            secondary: "1.1.1.1",
        },
    },
    location: {
        system: {},
    },
});
Copy
import pulumi
import pulumi_panos as panos

example = panos.DnsSettings("example",
    dns_settings={
        "servers": {
            "primary": "8.8.8.8",
            "secondary": "1.1.1.1",
        },
    },
    location={
        "system": {},
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/panos/v2/panos"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := panos.NewDnsSettings(ctx, "example", &panos.DnsSettingsArgs{
			DnsSettings: &panos.DnsSettingsDnsSettingsArgs{
				Servers: &panos.DnsSettingsDnsSettingsServersArgs{
					Primary:   pulumi.String("8.8.8.8"),
					Secondary: pulumi.String("1.1.1.1"),
				},
			},
			Location: &panos.DnsSettingsLocationArgs{
				System: &panos.DnsSettingsLocationSystemArgs{},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Panos = Pulumi.Panos;

return await Deployment.RunAsync(() => 
{
    var example = new Panos.DnsSettings("example", new()
    {
        DnsSettings = new Panos.Inputs.DnsSettingsDnsSettingsArgs
        {
            Servers = new Panos.Inputs.DnsSettingsDnsSettingsServersArgs
            {
                Primary = "8.8.8.8",
                Secondary = "1.1.1.1",
            },
        },
        Location = new Panos.Inputs.DnsSettingsLocationArgs
        {
            System = null,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.panos.DnsSettings;
import com.pulumi.panos.DnsSettingsArgs;
import com.pulumi.panos.inputs.DnsSettingsDnsSettingsArgs;
import com.pulumi.panos.inputs.DnsSettingsDnsSettingsServersArgs;
import com.pulumi.panos.inputs.DnsSettingsLocationArgs;
import com.pulumi.panos.inputs.DnsSettingsLocationSystemArgs;
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) {
        var example = new DnsSettings("example", DnsSettingsArgs.builder()
            .dnsSettings(DnsSettingsDnsSettingsArgs.builder()
                .servers(DnsSettingsDnsSettingsServersArgs.builder()
                    .primary("8.8.8.8")
                    .secondary("1.1.1.1")
                    .build())
                .build())
            .location(DnsSettingsLocationArgs.builder()
                .system()
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: panos:DnsSettings
    properties:
      dnsSettings:
        servers:
          primary: 8.8.8.8
          secondary: 1.1.1.1
      location:
        system: {}
Copy

Create DnsSettings Resource

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

Constructor syntax

new DnsSettings(name: string, args: DnsSettingsArgs, opts?: CustomResourceOptions);
@overload
def DnsSettings(resource_name: str,
                args: DnsSettingsArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def DnsSettings(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                location: Optional[DnsSettingsLocationArgs] = None,
                dns_settings: Optional[DnsSettingsDnsSettingsArgs] = None,
                fqdn_refresh_time: Optional[float] = None)
func NewDnsSettings(ctx *Context, name string, args DnsSettingsArgs, opts ...ResourceOption) (*DnsSettings, error)
public DnsSettings(string name, DnsSettingsArgs args, CustomResourceOptions? opts = null)
public DnsSettings(String name, DnsSettingsArgs args)
public DnsSettings(String name, DnsSettingsArgs args, CustomResourceOptions options)
type: panos:DnsSettings
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DnsSettingsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DnsSettingsArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DnsSettingsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DnsSettingsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DnsSettingsArgs
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 dnsSettingsResource = new Panos.DnsSettings("dnsSettingsResource", new()
{
    Location = new Panos.Inputs.DnsSettingsLocationArgs
    {
        System = new Panos.Inputs.DnsSettingsLocationSystemArgs
        {
            NgfwDevice = "string",
        },
        Template = new Panos.Inputs.DnsSettingsLocationTemplateArgs
        {
            Name = "string",
            NgfwDevice = "string",
            PanoramaDevice = "string",
        },
        TemplateStack = new Panos.Inputs.DnsSettingsLocationTemplateStackArgs
        {
            Name = "string",
            NgfwDevice = "string",
            PanoramaDevice = "string",
        },
    },
    DnsSettings = new Panos.Inputs.DnsSettingsDnsSettingsArgs
    {
        Servers = new Panos.Inputs.DnsSettingsDnsSettingsServersArgs
        {
            Primary = "string",
            Secondary = "string",
        },
    },
    FqdnRefreshTime = 0,
});
Copy
example, err := panos.NewDnsSettings(ctx, "dnsSettingsResource", &panos.DnsSettingsArgs{
Location: &.DnsSettingsLocationArgs{
System: &.DnsSettingsLocationSystemArgs{
NgfwDevice: pulumi.String("string"),
},
Template: &.DnsSettingsLocationTemplateArgs{
Name: pulumi.String("string"),
NgfwDevice: pulumi.String("string"),
PanoramaDevice: pulumi.String("string"),
},
TemplateStack: &.DnsSettingsLocationTemplateStackArgs{
Name: pulumi.String("string"),
NgfwDevice: pulumi.String("string"),
PanoramaDevice: pulumi.String("string"),
},
},
DnsSettings: &.DnsSettingsDnsSettingsArgs{
Servers: &.DnsSettingsDnsSettingsServersArgs{
Primary: pulumi.String("string"),
Secondary: pulumi.String("string"),
},
},
FqdnRefreshTime: pulumi.Float64(0),
})
Copy
var dnsSettingsResource = new DnsSettings("dnsSettingsResource", DnsSettingsArgs.builder()
    .location(DnsSettingsLocationArgs.builder()
        .system(DnsSettingsLocationSystemArgs.builder()
            .ngfwDevice("string")
            .build())
        .template(DnsSettingsLocationTemplateArgs.builder()
            .name("string")
            .ngfwDevice("string")
            .panoramaDevice("string")
            .build())
        .templateStack(DnsSettingsLocationTemplateStackArgs.builder()
            .name("string")
            .ngfwDevice("string")
            .panoramaDevice("string")
            .build())
        .build())
    .dnsSettings(DnsSettingsDnsSettingsArgs.builder()
        .servers(DnsSettingsDnsSettingsServersArgs.builder()
            .primary("string")
            .secondary("string")
            .build())
        .build())
    .fqdnRefreshTime(0)
    .build());
Copy
dns_settings_resource = panos.DnsSettings("dnsSettingsResource",
    location={
        "system": {
            "ngfw_device": "string",
        },
        "template": {
            "name": "string",
            "ngfw_device": "string",
            "panorama_device": "string",
        },
        "template_stack": {
            "name": "string",
            "ngfw_device": "string",
            "panorama_device": "string",
        },
    },
    dns_settings={
        "servers": {
            "primary": "string",
            "secondary": "string",
        },
    },
    fqdn_refresh_time=0)
Copy
const dnsSettingsResource = new panos.DnsSettings("dnsSettingsResource", {
    location: {
        system: {
            ngfwDevice: "string",
        },
        template: {
            name: "string",
            ngfwDevice: "string",
            panoramaDevice: "string",
        },
        templateStack: {
            name: "string",
            ngfwDevice: "string",
            panoramaDevice: "string",
        },
    },
    dnsSettings: {
        servers: {
            primary: "string",
            secondary: "string",
        },
    },
    fqdnRefreshTime: 0,
});
Copy
type: panos:DnsSettings
properties:
    dnsSettings:
        servers:
            primary: string
            secondary: string
    fqdnRefreshTime: 0
    location:
        system:
            ngfwDevice: string
        template:
            name: string
            ngfwDevice: string
            panoramaDevice: string
        templateStack:
            name: string
            ngfwDevice: string
            panoramaDevice: string
Copy

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

Location This property is required. DnsSettingsLocation
The location of this object.
DnsSettings DnsSettingsDnsSettings
FqdnRefreshTime double
Seconds for Periodic Timer to refresh expired FQDN object entries
Location This property is required. DnsSettingsLocationArgs
The location of this object.
DnsSettings DnsSettingsDnsSettingsArgs
FqdnRefreshTime float64
Seconds for Periodic Timer to refresh expired FQDN object entries
location This property is required. DnsSettingsLocation
The location of this object.
dnsSettings DnsSettingsDnsSettings
fqdnRefreshTime Double
Seconds for Periodic Timer to refresh expired FQDN object entries
location This property is required. DnsSettingsLocation
The location of this object.
dnsSettings DnsSettingsDnsSettings
fqdnRefreshTime number
Seconds for Periodic Timer to refresh expired FQDN object entries
location This property is required. DnsSettingsLocationArgs
The location of this object.
dns_settings DnsSettingsDnsSettingsArgs
fqdn_refresh_time float
Seconds for Periodic Timer to refresh expired FQDN object entries
location This property is required. Property Map
The location of this object.
dnsSettings Property Map
fqdnRefreshTime Number
Seconds for Periodic Timer to refresh expired FQDN object entries

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing DnsSettings Resource

Get an existing DnsSettings 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?: DnsSettingsState, opts?: CustomResourceOptions): DnsSettings
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        dns_settings: Optional[DnsSettingsDnsSettingsArgs] = None,
        fqdn_refresh_time: Optional[float] = None,
        location: Optional[DnsSettingsLocationArgs] = None) -> DnsSettings
func GetDnsSettings(ctx *Context, name string, id IDInput, state *DnsSettingsState, opts ...ResourceOption) (*DnsSettings, error)
public static DnsSettings Get(string name, Input<string> id, DnsSettingsState? state, CustomResourceOptions? opts = null)
public static DnsSettings get(String name, Output<String> id, DnsSettingsState state, CustomResourceOptions options)
resources:  _:    type: panos:DnsSettings    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
DnsSettings DnsSettingsDnsSettings
FqdnRefreshTime double
Seconds for Periodic Timer to refresh expired FQDN object entries
Location DnsSettingsLocation
The location of this object.
DnsSettings DnsSettingsDnsSettingsArgs
FqdnRefreshTime float64
Seconds for Periodic Timer to refresh expired FQDN object entries
Location DnsSettingsLocationArgs
The location of this object.
dnsSettings DnsSettingsDnsSettings
fqdnRefreshTime Double
Seconds for Periodic Timer to refresh expired FQDN object entries
location DnsSettingsLocation
The location of this object.
dnsSettings DnsSettingsDnsSettings
fqdnRefreshTime number
Seconds for Periodic Timer to refresh expired FQDN object entries
location DnsSettingsLocation
The location of this object.
dns_settings DnsSettingsDnsSettingsArgs
fqdn_refresh_time float
Seconds for Periodic Timer to refresh expired FQDN object entries
location DnsSettingsLocationArgs
The location of this object.
dnsSettings Property Map
fqdnRefreshTime Number
Seconds for Periodic Timer to refresh expired FQDN object entries
location Property Map
The location of this object.

Supporting Types

DnsSettingsDnsSettings
, DnsSettingsDnsSettingsArgs

DnsSettingsDnsSettingsServers
, DnsSettingsDnsSettingsServersArgs

Primary string
Primary DNS server IP address
Secondary string
Secondary DNS server IP address
Primary string
Primary DNS server IP address
Secondary string
Secondary DNS server IP address
primary String
Primary DNS server IP address
secondary String
Secondary DNS server IP address
primary string
Primary DNS server IP address
secondary string
Secondary DNS server IP address
primary str
Primary DNS server IP address
secondary str
Secondary DNS server IP address
primary String
Primary DNS server IP address
secondary String
Secondary DNS server IP address

DnsSettingsLocation
, DnsSettingsLocationArgs

System DnsSettingsLocationSystem
Located in a system settings.
Template DnsSettingsLocationTemplate
Located in a specific template.
TemplateStack DnsSettingsLocationTemplateStack
Located in a specific template stack.
System DnsSettingsLocationSystem
Located in a system settings.
Template DnsSettingsLocationTemplate
Located in a specific template.
TemplateStack DnsSettingsLocationTemplateStack
Located in a specific template stack.
system DnsSettingsLocationSystem
Located in a system settings.
template DnsSettingsLocationTemplate
Located in a specific template.
templateStack DnsSettingsLocationTemplateStack
Located in a specific template stack.
system DnsSettingsLocationSystem
Located in a system settings.
template DnsSettingsLocationTemplate
Located in a specific template.
templateStack DnsSettingsLocationTemplateStack
Located in a specific template stack.
system DnsSettingsLocationSystem
Located in a system settings.
template DnsSettingsLocationTemplate
Located in a specific template.
template_stack DnsSettingsLocationTemplateStack
Located in a specific template stack.
system Property Map
Located in a system settings.
template Property Map
Located in a specific template.
templateStack Property Map
Located in a specific template stack.

DnsSettingsLocationSystem
, DnsSettingsLocationSystemArgs

NgfwDevice string
The NGFW device.
NgfwDevice string
The NGFW device.
ngfwDevice String
The NGFW device.
ngfwDevice string
The NGFW device.
ngfw_device str
The NGFW device.
ngfwDevice String
The NGFW device.

DnsSettingsLocationTemplate
, DnsSettingsLocationTemplateArgs

Name string
The template.
NgfwDevice string
The NGFW device.
PanoramaDevice string
The panorama device.
Name string
The template.
NgfwDevice string
The NGFW device.
PanoramaDevice string
The panorama device.
name String
The template.
ngfwDevice String
The NGFW device.
panoramaDevice String
The panorama device.
name string
The template.
ngfwDevice string
The NGFW device.
panoramaDevice string
The panorama device.
name str
The template.
ngfw_device str
The NGFW device.
panorama_device str
The panorama device.
name String
The template.
ngfwDevice String
The NGFW device.
panoramaDevice String
The panorama device.

DnsSettingsLocationTemplateStack
, DnsSettingsLocationTemplateStackArgs

Name string
The template stack.
NgfwDevice string
The NGFW device.
PanoramaDevice string
The panorama device.
Name string
The template stack.
NgfwDevice string
The NGFW device.
PanoramaDevice string
The panorama device.
name String
The template stack.
ngfwDevice String
The NGFW device.
panoramaDevice String
The panorama device.
name string
The template stack.
ngfwDevice string
The NGFW device.
panoramaDevice string
The panorama device.
name str
The template stack.
ngfw_device str
The NGFW device.
panorama_device str
The panorama device.
name String
The template stack.
ngfwDevice String
The NGFW device.
panoramaDevice String
The panorama device.

Package Details

Repository
panos paloaltonetworks/terraform-provider-panos
License
Notes
This Pulumi package is based on the panos Terraform Provider.