1. Packages
  2. Fortios
  3. API Docs
  4. system
  5. SettingDns
Fortios v0.0.6 published on Tuesday, Jul 9, 2024 by pulumiverse

fortios.system.SettingDns

Explore with Pulumi AI

fortios logo
Fortios v0.0.6 published on Tuesday, Jul 9, 2024 by pulumiverse

    Provides a resource to configure DNS of FortiOS.

    !> Warning: The resource will be deprecated and replaced by new resource fortios.system.Dns, we recommend that you use the new resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as fortios from "@pulumiverse/fortios";
    
    const test1 = new fortios.system.SettingDns("test1", {
        dnsOverTls: "disable",
        primary: "208.91.112.53",
        secondary: "208.91.112.22",
    });
    
    import pulumi
    import pulumiverse_fortios as fortios
    
    test1 = fortios.system.SettingDns("test1",
        dns_over_tls="disable",
        primary="208.91.112.53",
        secondary="208.91.112.22")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/system"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := system.NewSettingDns(ctx, "test1", &system.SettingDnsArgs{
    			DnsOverTls: pulumi.String("disable"),
    			Primary:    pulumi.String("208.91.112.53"),
    			Secondary:  pulumi.String("208.91.112.22"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fortios = Pulumiverse.Fortios;
    
    return await Deployment.RunAsync(() => 
    {
        var test1 = new Fortios.System.SettingDns("test1", new()
        {
            DnsOverTls = "disable",
            Primary = "208.91.112.53",
            Secondary = "208.91.112.22",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fortios.system.SettingDns;
    import com.pulumi.fortios.system.SettingDnsArgs;
    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 test1 = new SettingDns("test1", SettingDnsArgs.builder()
                .dnsOverTls("disable")
                .primary("208.91.112.53")
                .secondary("208.91.112.22")
                .build());
    
        }
    }
    
    resources:
      test1:
        type: fortios:system:SettingDns
        properties:
          dnsOverTls: disable
          primary: 208.91.112.53
          secondary: 208.91.112.22
    

    Create SettingDns Resource

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

    Constructor syntax

    new SettingDns(name: string, args?: SettingDnsArgs, opts?: CustomResourceOptions);
    @overload
    def SettingDns(resource_name: str,
                   args: Optional[SettingDnsArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def SettingDns(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   dns_over_tls: Optional[str] = None,
                   primary: Optional[str] = None,
                   secondary: Optional[str] = None)
    func NewSettingDns(ctx *Context, name string, args *SettingDnsArgs, opts ...ResourceOption) (*SettingDns, error)
    public SettingDns(string name, SettingDnsArgs? args = null, CustomResourceOptions? opts = null)
    public SettingDns(String name, SettingDnsArgs args)
    public SettingDns(String name, SettingDnsArgs args, CustomResourceOptions options)
    
    type: fortios:system:SettingDns
    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 SettingDnsArgs
    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 SettingDnsArgs
    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 SettingDnsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SettingDnsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SettingDnsArgs
    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 settingDnsResource = new Fortios.System.SettingDns("settingDnsResource", new()
    {
        DnsOverTls = "string",
        Primary = "string",
        Secondary = "string",
    });
    
    example, err := system.NewSettingDns(ctx, "settingDnsResource", &system.SettingDnsArgs{
    	DnsOverTls: pulumi.String("string"),
    	Primary:    pulumi.String("string"),
    	Secondary:  pulumi.String("string"),
    })
    
    var settingDnsResource = new SettingDns("settingDnsResource", SettingDnsArgs.builder()
        .dnsOverTls("string")
        .primary("string")
        .secondary("string")
        .build());
    
    setting_dns_resource = fortios.system.SettingDns("settingDnsResource",
        dns_over_tls="string",
        primary="string",
        secondary="string")
    
    const settingDnsResource = new fortios.system.SettingDns("settingDnsResource", {
        dnsOverTls: "string",
        primary: "string",
        secondary: "string",
    });
    
    type: fortios:system:SettingDns
    properties:
        dnsOverTls: string
        primary: string
        secondary: string
    

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

    DnsOverTls string
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    Primary string
    Primary DNS server IP address.
    Secondary string
    Secondary DNS server IP address.
    DnsOverTls string
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    Primary string
    Primary DNS server IP address.
    Secondary string
    Secondary DNS server IP address.
    dnsOverTls String
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    primary String
    Primary DNS server IP address.
    secondary String
    Secondary DNS server IP address.
    dnsOverTls string
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    primary string
    Primary DNS server IP address.
    secondary string
    Secondary DNS server IP address.
    dns_over_tls str
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    primary str
    Primary DNS server IP address.
    secondary str
    Secondary DNS server IP address.
    dnsOverTls String
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    primary String
    Primary DNS server IP address.
    secondary String
    Secondary DNS server IP address.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SettingDns 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 SettingDns Resource

    Get an existing SettingDns 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?: SettingDnsState, opts?: CustomResourceOptions): SettingDns
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dns_over_tls: Optional[str] = None,
            primary: Optional[str] = None,
            secondary: Optional[str] = None) -> SettingDns
    func GetSettingDns(ctx *Context, name string, id IDInput, state *SettingDnsState, opts ...ResourceOption) (*SettingDns, error)
    public static SettingDns Get(string name, Input<string> id, SettingDnsState? state, CustomResourceOptions? opts = null)
    public static SettingDns get(String name, Output<String> id, SettingDnsState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    DnsOverTls string
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    Primary string
    Primary DNS server IP address.
    Secondary string
    Secondary DNS server IP address.
    DnsOverTls string
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    Primary string
    Primary DNS server IP address.
    Secondary string
    Secondary DNS server IP address.
    dnsOverTls String
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    primary String
    Primary DNS server IP address.
    secondary String
    Secondary DNS server IP address.
    dnsOverTls string
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    primary string
    Primary DNS server IP address.
    secondary string
    Secondary DNS server IP address.
    dns_over_tls str
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    primary str
    Primary DNS server IP address.
    secondary str
    Secondary DNS server IP address.
    dnsOverTls String
    Enable/disable/enforce DNS over TLS(available since v6.2.0). Enum: [ disable, enable, enforce ]
    primary String
    Primary DNS server IP address.
    secondary String
    Secondary DNS server IP address.

    Package Details

    Repository
    fortios pulumiverse/pulumi-fortios
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the fortios Terraform Provider.
    fortios logo
    Fortios v0.0.6 published on Tuesday, Jul 9, 2024 by pulumiverse