1. Packages
  2. Fortimanager Provider
  3. API Docs
  4. SystemPasswordpolicy
fortimanager 1.14.0 published on Tuesday, Apr 15, 2025 by fortinetdev

fortimanager.SystemPasswordpolicy

Explore with Pulumi AI

Password policy.

Example Usage

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

const trname = new fortimanager.SystemPasswordpolicy("trname", {
    mustContains: ["terraform"],
    status: "enable",
});
Copy
import pulumi
import pulumi_fortimanager as fortimanager

trname = fortimanager.SystemPasswordpolicy("trname",
    must_contains=["terraform"],
    status="enable")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := fortimanager.NewSystemPasswordpolicy(ctx, "trname", &fortimanager.SystemPasswordpolicyArgs{
			MustContains: pulumi.StringArray{
				pulumi.String("terraform"),
			},
			Status: pulumi.String("enable"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortimanager = Pulumi.Fortimanager;

return await Deployment.RunAsync(() => 
{
    var trname = new Fortimanager.SystemPasswordpolicy("trname", new()
    {
        MustContains = new[]
        {
            "terraform",
        },
        Status = "enable",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortimanager.SystemPasswordpolicy;
import com.pulumi.fortimanager.SystemPasswordpolicyArgs;
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 trname = new SystemPasswordpolicy("trname", SystemPasswordpolicyArgs.builder()
            .mustContains("terraform")
            .status("enable")
            .build());

    }
}
Copy
resources:
  trname:
    type: fortimanager:SystemPasswordpolicy
    properties:
      mustContains:
        - terraform
      status: enable
Copy

Create SystemPasswordpolicy Resource

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

Constructor syntax

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

@overload
def SystemPasswordpolicy(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         change4_characters: Optional[str] = None,
                         expire: Optional[float] = None,
                         minimum_length: Optional[float] = None,
                         must_contains: Optional[Sequence[str]] = None,
                         password_history: Optional[float] = None,
                         status: Optional[str] = None,
                         system_passwordpolicy_id: Optional[str] = None)
func NewSystemPasswordpolicy(ctx *Context, name string, args *SystemPasswordpolicyArgs, opts ...ResourceOption) (*SystemPasswordpolicy, error)
public SystemPasswordpolicy(string name, SystemPasswordpolicyArgs? args = null, CustomResourceOptions? opts = null)
public SystemPasswordpolicy(String name, SystemPasswordpolicyArgs args)
public SystemPasswordpolicy(String name, SystemPasswordpolicyArgs args, CustomResourceOptions options)
type: fortimanager:SystemPasswordpolicy
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 SystemPasswordpolicyArgs
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 SystemPasswordpolicyArgs
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 SystemPasswordpolicyArgs
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 SystemPasswordpolicyArgs
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. SystemPasswordpolicyArgs
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 systemPasswordpolicyResource = new Fortimanager.SystemPasswordpolicy("systemPasswordpolicyResource", new()
{
    Change4Characters = "string",
    Expire = 0,
    MinimumLength = 0,
    MustContains = new[]
    {
        "string",
    },
    PasswordHistory = 0,
    Status = "string",
    SystemPasswordpolicyId = "string",
});
Copy
example, err := fortimanager.NewSystemPasswordpolicy(ctx, "systemPasswordpolicyResource", &fortimanager.SystemPasswordpolicyArgs{
	Change4Characters: pulumi.String("string"),
	Expire:            pulumi.Float64(0),
	MinimumLength:     pulumi.Float64(0),
	MustContains: pulumi.StringArray{
		pulumi.String("string"),
	},
	PasswordHistory:        pulumi.Float64(0),
	Status:                 pulumi.String("string"),
	SystemPasswordpolicyId: pulumi.String("string"),
})
Copy
var systemPasswordpolicyResource = new SystemPasswordpolicy("systemPasswordpolicyResource", SystemPasswordpolicyArgs.builder()
    .change4Characters("string")
    .expire(0)
    .minimumLength(0)
    .mustContains("string")
    .passwordHistory(0)
    .status("string")
    .systemPasswordpolicyId("string")
    .build());
Copy
system_passwordpolicy_resource = fortimanager.SystemPasswordpolicy("systemPasswordpolicyResource",
    change4_characters="string",
    expire=0,
    minimum_length=0,
    must_contains=["string"],
    password_history=0,
    status="string",
    system_passwordpolicy_id="string")
Copy
const systemPasswordpolicyResource = new fortimanager.SystemPasswordpolicy("systemPasswordpolicyResource", {
    change4Characters: "string",
    expire: 0,
    minimumLength: 0,
    mustContains: ["string"],
    passwordHistory: 0,
    status: "string",
    systemPasswordpolicyId: "string",
});
Copy
type: fortimanager:SystemPasswordpolicy
properties:
    change4Characters: string
    expire: 0
    minimumLength: 0
    mustContains:
        - string
    passwordHistory: 0
    status: string
    systemPasswordpolicyId: string
Copy

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

Change4Characters string
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
Expire double
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
MinimumLength double
Minimum password length.
MustContains List<string>
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
PasswordHistory double
Number of unique new passwords that must be used before old password can be reused (0 - 20).
Status string
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
SystemPasswordpolicyId string
an identifier for the resource.
Change4Characters string
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
Expire float64
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
MinimumLength float64
Minimum password length.
MustContains []string
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
PasswordHistory float64
Number of unique new passwords that must be used before old password can be reused (0 - 20).
Status string
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
SystemPasswordpolicyId string
an identifier for the resource.
change4Characters String
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
expire Double
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
minimumLength Double
Minimum password length.
mustContains List<String>
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
passwordHistory Double
Number of unique new passwords that must be used before old password can be reused (0 - 20).
status String
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
systemPasswordpolicyId String
an identifier for the resource.
change4Characters string
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
expire number
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
minimumLength number
Minimum password length.
mustContains string[]
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
passwordHistory number
Number of unique new passwords that must be used before old password can be reused (0 - 20).
status string
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
systemPasswordpolicyId string
an identifier for the resource.
change4_characters str
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
expire float
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
minimum_length float
Minimum password length.
must_contains Sequence[str]
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
password_history float
Number of unique new passwords that must be used before old password can be reused (0 - 20).
status str
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
system_passwordpolicy_id str
an identifier for the resource.
change4Characters String
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
expire Number
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
minimumLength Number
Minimum password length.
mustContains List<String>
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
passwordHistory Number
Number of unique new passwords that must be used before old password can be reused (0 - 20).
status String
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
systemPasswordpolicyId String
an identifier for the resource.

Outputs

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

Get an existing SystemPasswordpolicy 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?: SystemPasswordpolicyState, opts?: CustomResourceOptions): SystemPasswordpolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        change4_characters: Optional[str] = None,
        expire: Optional[float] = None,
        minimum_length: Optional[float] = None,
        must_contains: Optional[Sequence[str]] = None,
        password_history: Optional[float] = None,
        status: Optional[str] = None,
        system_passwordpolicy_id: Optional[str] = None) -> SystemPasswordpolicy
func GetSystemPasswordpolicy(ctx *Context, name string, id IDInput, state *SystemPasswordpolicyState, opts ...ResourceOption) (*SystemPasswordpolicy, error)
public static SystemPasswordpolicy Get(string name, Input<string> id, SystemPasswordpolicyState? state, CustomResourceOptions? opts = null)
public static SystemPasswordpolicy get(String name, Output<String> id, SystemPasswordpolicyState state, CustomResourceOptions options)
resources:  _:    type: fortimanager:SystemPasswordpolicy    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:
Change4Characters string
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
Expire double
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
MinimumLength double
Minimum password length.
MustContains List<string>
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
PasswordHistory double
Number of unique new passwords that must be used before old password can be reused (0 - 20).
Status string
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
SystemPasswordpolicyId string
an identifier for the resource.
Change4Characters string
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
Expire float64
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
MinimumLength float64
Minimum password length.
MustContains []string
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
PasswordHistory float64
Number of unique new passwords that must be used before old password can be reused (0 - 20).
Status string
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
SystemPasswordpolicyId string
an identifier for the resource.
change4Characters String
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
expire Double
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
minimumLength Double
Minimum password length.
mustContains List<String>
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
passwordHistory Double
Number of unique new passwords that must be used before old password can be reused (0 - 20).
status String
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
systemPasswordpolicyId String
an identifier for the resource.
change4Characters string
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
expire number
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
minimumLength number
Minimum password length.
mustContains string[]
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
passwordHistory number
Number of unique new passwords that must be used before old password can be reused (0 - 20).
status string
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
systemPasswordpolicyId string
an identifier for the resource.
change4_characters str
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
expire float
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
minimum_length float
Minimum password length.
must_contains Sequence[str]
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
password_history float
Number of unique new passwords that must be used before old password can be reused (0 - 20).
status str
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
system_passwordpolicy_id str
an identifier for the resource.
change4Characters String
Enable/disable changing at least 4 characters for new password. disable - Disable changing at least 4 characters for new password. enable - Enable changing at least 4 characters for new password. Valid values: disable, enable.
expire Number
Number of days after which admin users' password will expire (0 - 3650, 0 = never expire).
minimumLength Number
Minimum password length.
mustContains List<String>
Password character requirements. upper-case-letter - Require password to contain upper case letter. lower-case-letter - Require password to contain lower case letter. number - Require password to contain number. non-alphanumeric - Require password to contain non-alphanumeric characters. Valid values: upper-case-letter, lower-case-letter, number, non-alphanumeric.
passwordHistory Number
Number of unique new passwords that must be used before old password can be reused (0 - 20).
status String
Enable/disable password policy. disable - Disable password policy. enable - Enable password policy. Valid values: disable, enable.
systemPasswordpolicyId String
an identifier for the resource.

Import

System PasswordPolicy can be imported using any of these accepted formats:

$ export “FORTIMANAGER_IMPORT_TABLE”=“true”

$ pulumi import fortimanager:index/systemPasswordpolicy:SystemPasswordpolicy labelname SystemPasswordPolicy
Copy

$ unset “FORTIMANAGER_IMPORT_TABLE”

To learn more about importing existing cloud resources, see Importing resources.

Package Details

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