fortios.system.SettingNtp
Explore with Pulumi AI
Provides a resource to configure Network Time Protocol (NTP) servers of FortiOS.
!> Warning: The resource will be deprecated and replaced by new resource fortios.system.Ntp
, we recommend that you use the new resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as fortios from "@pulumiverse/fortios";
const test2 = new fortios.system.SettingNtp("test2", {
ntpservers: [
"1.1.1.1",
"3.3.3.3",
],
ntpsync: "disable",
type: "custom",
});
import pulumi
import pulumiverse_fortios as fortios
test2 = fortios.system.SettingNtp("test2",
ntpservers=[
"1.1.1.1",
"3.3.3.3",
],
ntpsync="disable",
type="custom")
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.NewSettingNtp(ctx, "test2", &system.SettingNtpArgs{
Ntpservers: pulumi.StringArray{
pulumi.String("1.1.1.1"),
pulumi.String("3.3.3.3"),
},
Ntpsync: pulumi.String("disable"),
Type: pulumi.String("custom"),
})
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 test2 = new Fortios.System.SettingNtp("test2", new()
{
Ntpservers = new[]
{
"1.1.1.1",
"3.3.3.3",
},
Ntpsync = "disable",
Type = "custom",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortios.system.SettingNtp;
import com.pulumi.fortios.system.SettingNtpArgs;
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 test2 = new SettingNtp("test2", SettingNtpArgs.builder()
.ntpservers(
"1.1.1.1",
"3.3.3.3")
.ntpsync("disable")
.type("custom")
.build());
}
}
resources:
test2:
type: fortios:system:SettingNtp
properties:
ntpservers:
- 1.1.1.1
- 3.3.3.3
ntpsync: disable
type: custom
Create SettingNtp Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SettingNtp(name: string, args: SettingNtpArgs, opts?: CustomResourceOptions);
@overload
def SettingNtp(resource_name: str,
args: SettingNtpArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SettingNtp(resource_name: str,
opts: Optional[ResourceOptions] = None,
type: Optional[str] = None,
ntpservers: Optional[Sequence[str]] = None,
ntpsync: Optional[str] = None)
func NewSettingNtp(ctx *Context, name string, args SettingNtpArgs, opts ...ResourceOption) (*SettingNtp, error)
public SettingNtp(string name, SettingNtpArgs args, CustomResourceOptions? opts = null)
public SettingNtp(String name, SettingNtpArgs args)
public SettingNtp(String name, SettingNtpArgs args, CustomResourceOptions options)
type: fortios:system:SettingNtp
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 SettingNtpArgs
- 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 SettingNtpArgs
- 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 SettingNtpArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SettingNtpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SettingNtpArgs
- 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 settingNtpResource = new Fortios.System.SettingNtp("settingNtpResource", new()
{
Type = "string",
Ntpservers = new[]
{
"string",
},
Ntpsync = "string",
});
example, err := system.NewSettingNtp(ctx, "settingNtpResource", &system.SettingNtpArgs{
Type: pulumi.String("string"),
Ntpservers: pulumi.StringArray{
pulumi.String("string"),
},
Ntpsync: pulumi.String("string"),
})
var settingNtpResource = new SettingNtp("settingNtpResource", SettingNtpArgs.builder()
.type("string")
.ntpservers("string")
.ntpsync("string")
.build());
setting_ntp_resource = fortios.system.SettingNtp("settingNtpResource",
type="string",
ntpservers=["string"],
ntpsync="string")
const settingNtpResource = new fortios.system.SettingNtp("settingNtpResource", {
type: "string",
ntpservers: ["string"],
ntpsync: "string",
});
type: fortios:system:SettingNtp
properties:
ntpservers:
- string
ntpsync: string
type: string
SettingNtp Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SettingNtp resource accepts the following input properties:
- Type string
- Use the FortiGuard NTP server or any other available NTP Server.
- Ntpservers List<string>
- Configure the FortiGate to connect to any available third-party NTP server.
- Ntpsync string
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
- Type string
- Use the FortiGuard NTP server or any other available NTP Server.
- Ntpservers []string
- Configure the FortiGate to connect to any available third-party NTP server.
- Ntpsync string
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
- type String
- Use the FortiGuard NTP server or any other available NTP Server.
- ntpservers List<String>
- Configure the FortiGate to connect to any available third-party NTP server.
- ntpsync String
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
- type string
- Use the FortiGuard NTP server or any other available NTP Server.
- ntpservers string[]
- Configure the FortiGate to connect to any available third-party NTP server.
- ntpsync string
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
- type str
- Use the FortiGuard NTP server or any other available NTP Server.
- ntpservers Sequence[str]
- Configure the FortiGate to connect to any available third-party NTP server.
- ntpsync str
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
- type String
- Use the FortiGuard NTP server or any other available NTP Server.
- ntpservers List<String>
- Configure the FortiGate to connect to any available third-party NTP server.
- ntpsync String
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
Outputs
All input properties are implicitly available as output properties. Additionally, the SettingNtp 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 SettingNtp Resource
Get an existing SettingNtp 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?: SettingNtpState, opts?: CustomResourceOptions): SettingNtp
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ntpservers: Optional[Sequence[str]] = None,
ntpsync: Optional[str] = None,
type: Optional[str] = None) -> SettingNtp
func GetSettingNtp(ctx *Context, name string, id IDInput, state *SettingNtpState, opts ...ResourceOption) (*SettingNtp, error)
public static SettingNtp Get(string name, Input<string> id, SettingNtpState? state, CustomResourceOptions? opts = null)
public static SettingNtp get(String name, Output<String> id, SettingNtpState 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.
- Ntpservers List<string>
- Configure the FortiGate to connect to any available third-party NTP server.
- Ntpsync string
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
- Type string
- Use the FortiGuard NTP server or any other available NTP Server.
- Ntpservers []string
- Configure the FortiGate to connect to any available third-party NTP server.
- Ntpsync string
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
- Type string
- Use the FortiGuard NTP server or any other available NTP Server.
- ntpservers List<String>
- Configure the FortiGate to connect to any available third-party NTP server.
- ntpsync String
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
- type String
- Use the FortiGuard NTP server or any other available NTP Server.
- ntpservers string[]
- Configure the FortiGate to connect to any available third-party NTP server.
- ntpsync string
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
- type string
- Use the FortiGuard NTP server or any other available NTP Server.
- ntpservers Sequence[str]
- Configure the FortiGate to connect to any available third-party NTP server.
- ntpsync str
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
- type str
- Use the FortiGuard NTP server or any other available NTP Server.
- ntpservers List<String>
- Configure the FortiGate to connect to any available third-party NTP server.
- ntpsync String
- Enable/disable setting the FortiGate system time by synchronizing with an NTP Server.
- type String
- Use the FortiGuard NTP server or any other available NTP Server.
Package Details
- Repository
- fortios pulumiverse/pulumi-fortios
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
fortios
Terraform Provider.