published on Tuesday, Feb 17, 2026 by Pulumiverse
published on Tuesday, Feb 17, 2026 by Pulumiverse
The unifi.setting.Ntp resource allows you to configure Network Time Protocol (NTP) server settings for your UniFi network.
NTP servers provide time synchronization for your network devices. This resource supports both automatic and manual NTP configuration modes.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as unifi from "@pulumiverse/unifi";
const example = new unifi.setting.Ntp("example", {
mode: "manual",
ntpServer1: "time.cloudflare.com",
ntpServer2: "pool.ntp.org",
ntpServer3: "time.google.com",
ntpServer4: "0.pool.ntp.org",
});
import pulumi
import pulumiverse_unifi as unifi
example = unifi.setting.Ntp("example",
mode="manual",
ntp_server1="time.cloudflare.com",
ntp_server2="pool.ntp.org",
ntp_server3="time.google.com",
ntp_server4="0.pool.ntp.org")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi/setting"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := setting.NewNtp(ctx, "example", &setting.NtpArgs{
Mode: pulumi.String("manual"),
NtpServer1: pulumi.String("time.cloudflare.com"),
NtpServer2: pulumi.String("pool.ntp.org"),
NtpServer3: pulumi.String("time.google.com"),
NtpServer4: pulumi.String("0.pool.ntp.org"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Unifi = Pulumiverse.Unifi;
return await Deployment.RunAsync(() =>
{
var example = new Unifi.Setting.Ntp("example", new()
{
Mode = "manual",
NtpServer1 = "time.cloudflare.com",
NtpServer2 = "pool.ntp.org",
NtpServer3 = "time.google.com",
NtpServer4 = "0.pool.ntp.org",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumiverse.unifi.setting.Ntp;
import com.pulumiverse.unifi.setting.NtpArgs;
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 Ntp("example", NtpArgs.builder()
.mode("manual")
.ntpServer1("time.cloudflare.com")
.ntpServer2("pool.ntp.org")
.ntpServer3("time.google.com")
.ntpServer4("0.pool.ntp.org")
.build());
}
}
resources:
example:
type: unifi:setting:Ntp
properties:
mode: manual
ntpServer1: time.cloudflare.com
ntpServer2: pool.ntp.org
ntpServer3: time.google.com
ntpServer4: 0.pool.ntp.org
Create Ntp Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Ntp(name: string, args?: NtpArgs, opts?: CustomResourceOptions);@overload
def Ntp(resource_name: str,
args: Optional[NtpArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Ntp(resource_name: str,
opts: Optional[ResourceOptions] = None,
mode: Optional[str] = None,
ntp_server1: Optional[str] = None,
ntp_server2: Optional[str] = None,
ntp_server3: Optional[str] = None,
ntp_server4: Optional[str] = None,
site: Optional[str] = None)func NewNtp(ctx *Context, name string, args *NtpArgs, opts ...ResourceOption) (*Ntp, error)public Ntp(string name, NtpArgs? args = null, CustomResourceOptions? opts = null)type: unifi:setting:Ntp
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 NtpArgs
- 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 NtpArgs
- 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 NtpArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NtpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NtpArgs
- 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 ntpResource = new Unifi.Setting.Ntp("ntpResource", new()
{
Mode = "string",
NtpServer1 = "string",
NtpServer2 = "string",
NtpServer3 = "string",
NtpServer4 = "string",
Site = "string",
});
example, err := setting.NewNtp(ctx, "ntpResource", &setting.NtpArgs{
Mode: pulumi.String("string"),
NtpServer1: pulumi.String("string"),
NtpServer2: pulumi.String("string"),
NtpServer3: pulumi.String("string"),
NtpServer4: pulumi.String("string"),
Site: pulumi.String("string"),
})
var ntpResource = new Ntp("ntpResource", NtpArgs.builder()
.mode("string")
.ntpServer1("string")
.ntpServer2("string")
.ntpServer3("string")
.ntpServer4("string")
.site("string")
.build());
ntp_resource = unifi.setting.Ntp("ntpResource",
mode="string",
ntp_server1="string",
ntp_server2="string",
ntp_server3="string",
ntp_server4="string",
site="string")
const ntpResource = new unifi.setting.Ntp("ntpResource", {
mode: "string",
ntpServer1: "string",
ntpServer2: "string",
ntpServer3: "string",
ntpServer4: "string",
site: "string",
});
type: unifi:setting:Ntp
properties:
mode: string
ntpServer1: string
ntpServer2: string
ntpServer3: string
ntpServer4: string
site: string
Ntp 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 Ntp resource accepts the following input properties:
- Mode string
- NTP server configuration mode. Valid values are:
- Ntp
Server1 string - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - Ntp
Server2 string - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - Ntp
Server3 string - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - Ntp
Server4 string - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - Site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- Mode string
- NTP server configuration mode. Valid values are:
- Ntp
Server1 string - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - Ntp
Server2 string - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - Ntp
Server3 string - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - Ntp
Server4 string - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - Site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- mode String
- NTP server configuration mode. Valid values are:
- ntp
Server1 String - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server2 String - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server3 String - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - ntp
Server4 String - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - site String
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- mode string
- NTP server configuration mode. Valid values are:
- ntp
Server1 string - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server2 string - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server3 string - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - ntp
Server4 string - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- mode str
- NTP server configuration mode. Valid values are:
- ntp_
server1 str - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp_
server2 str - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp_
server3 str - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - ntp_
server4 str - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - site str
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- mode String
- NTP server configuration mode. Valid values are:
- ntp
Server1 String - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server2 String - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server3 String - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - ntp
Server4 String - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - site String
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Ntp 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 Ntp Resource
Get an existing Ntp 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?: NtpState, opts?: CustomResourceOptions): Ntp@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
mode: Optional[str] = None,
ntp_server1: Optional[str] = None,
ntp_server2: Optional[str] = None,
ntp_server3: Optional[str] = None,
ntp_server4: Optional[str] = None,
site: Optional[str] = None) -> Ntpfunc GetNtp(ctx *Context, name string, id IDInput, state *NtpState, opts ...ResourceOption) (*Ntp, error)public static Ntp Get(string name, Input<string> id, NtpState? state, CustomResourceOptions? opts = null)public static Ntp get(String name, Output<String> id, NtpState state, CustomResourceOptions options)resources: _: type: unifi:setting:Ntp 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.
- Mode string
- NTP server configuration mode. Valid values are:
- Ntp
Server1 string - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - Ntp
Server2 string - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - Ntp
Server3 string - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - Ntp
Server4 string - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - Site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- Mode string
- NTP server configuration mode. Valid values are:
- Ntp
Server1 string - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - Ntp
Server2 string - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - Ntp
Server3 string - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - Ntp
Server4 string - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - Site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- mode String
- NTP server configuration mode. Valid values are:
- ntp
Server1 String - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server2 String - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server3 String - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - ntp
Server4 String - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - site String
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- mode string
- NTP server configuration mode. Valid values are:
- ntp
Server1 string - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server2 string - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server3 string - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - ntp
Server4 string - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - site string
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- mode str
- NTP server configuration mode. Valid values are:
- ntp_
server1 str - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp_
server2 str - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp_
server3 str - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - ntp_
server4 str - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - site str
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
- mode String
- NTP server configuration mode. Valid values are:
- ntp
Server1 String - Primary NTP server hostname or IP address. Must be a valid hostname (e.g.,
pool.ntp.org) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server2 String - Secondary NTP server hostname or IP address. Must be a valid hostname (e.g.,
time.google.com) or IPv4 address. Only applicable whenmodeis set tomanual. - ntp
Server3 String - Tertiary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - ntp
Server4 String - Quaternary NTP server hostname or IP address. Must be a valid hostname or IPv4 address. Only applicable when
modeis set tomanual. - site String
- The name of the UniFi site where this resource should be applied. If not specified, the default site will be used.
Package Details
- Repository
- unifi pulumiverse/pulumi-unifi
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
unifiTerraform Provider.
published on Tuesday, Feb 17, 2026 by Pulumiverse
