1. Packages
  2. Routeros Provider
  3. API Docs
  4. UserManagerUserGroup
routeros 1.83.0 published on Wednesday, Apr 16, 2025 by terraform-routeros

routeros.UserManagerUserGroup

Explore with Pulumi AI

Example Usage

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

const mikrotikWirelessComment = new routeros.UserManagerAttribute("mikrotikWirelessComment", {
    typeId: 21,
    valueType: "string",
});
const mikrotikWirelessVlanid = new routeros.UserManagerAttribute("mikrotikWirelessVlanid", {
    typeId: 26,
    valueType: "uint32",
});
const test = new routeros.UserManagerUserGroup("test", {
    attributes: [
        pulumi.interpolate`${mikrotikWirelessComment.name}:Test Group`,
        pulumi.interpolate`${mikrotikWirelessVlanid.name}:100`,
    ],
    innerAuths: [
        "ttls-chap",
        "ttls-pap",
    ],
    outerAuths: [
        "chap",
        "pap",
    ],
});
Copy
import pulumi
import pulumi_routeros as routeros

mikrotik_wireless_comment = routeros.UserManagerAttribute("mikrotikWirelessComment",
    type_id=21,
    value_type="string")
mikrotik_wireless_vlanid = routeros.UserManagerAttribute("mikrotikWirelessVlanid",
    type_id=26,
    value_type="uint32")
test = routeros.UserManagerUserGroup("test",
    attributes=[
        mikrotik_wireless_comment.name.apply(lambda name: f"{name}:Test Group"),
        mikrotik_wireless_vlanid.name.apply(lambda name: f"{name}:100"),
    ],
    inner_auths=[
        "ttls-chap",
        "ttls-pap",
    ],
    outer_auths=[
        "chap",
        "pap",
    ])
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		mikrotikWirelessComment, err := routeros.NewUserManagerAttribute(ctx, "mikrotikWirelessComment", &routeros.UserManagerAttributeArgs{
			TypeId:    pulumi.Float64(21),
			ValueType: pulumi.String("string"),
		})
		if err != nil {
			return err
		}
		mikrotikWirelessVlanid, err := routeros.NewUserManagerAttribute(ctx, "mikrotikWirelessVlanid", &routeros.UserManagerAttributeArgs{
			TypeId:    pulumi.Float64(26),
			ValueType: pulumi.String("uint32"),
		})
		if err != nil {
			return err
		}
		_, err = routeros.NewUserManagerUserGroup(ctx, "test", &routeros.UserManagerUserGroupArgs{
			Attributes: pulumi.StringArray{
				mikrotikWirelessComment.Name.ApplyT(func(name string) (string, error) {
					return fmt.Sprintf("%v:Test Group", name), nil
				}).(pulumi.StringOutput),
				mikrotikWirelessVlanid.Name.ApplyT(func(name string) (string, error) {
					return fmt.Sprintf("%v:100", name), nil
				}).(pulumi.StringOutput),
			},
			InnerAuths: pulumi.StringArray{
				pulumi.String("ttls-chap"),
				pulumi.String("ttls-pap"),
			},
			OuterAuths: pulumi.StringArray{
				pulumi.String("chap"),
				pulumi.String("pap"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Routeros = Pulumi.Routeros;

return await Deployment.RunAsync(() => 
{
    var mikrotikWirelessComment = new Routeros.UserManagerAttribute("mikrotikWirelessComment", new()
    {
        TypeId = 21,
        ValueType = "string",
    });

    var mikrotikWirelessVlanid = new Routeros.UserManagerAttribute("mikrotikWirelessVlanid", new()
    {
        TypeId = 26,
        ValueType = "uint32",
    });

    var test = new Routeros.UserManagerUserGroup("test", new()
    {
        Attributes = new[]
        {
            mikrotikWirelessComment.Name.Apply(name => $"{name}:Test Group"),
            mikrotikWirelessVlanid.Name.Apply(name => $"{name}:100"),
        },
        InnerAuths = new[]
        {
            "ttls-chap",
            "ttls-pap",
        },
        OuterAuths = new[]
        {
            "chap",
            "pap",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.routeros.UserManagerAttribute;
import com.pulumi.routeros.UserManagerAttributeArgs;
import com.pulumi.routeros.UserManagerUserGroup;
import com.pulumi.routeros.UserManagerUserGroupArgs;
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 mikrotikWirelessComment = new UserManagerAttribute("mikrotikWirelessComment", UserManagerAttributeArgs.builder()
            .typeId(21)
            .valueType("string")
            .build());

        var mikrotikWirelessVlanid = new UserManagerAttribute("mikrotikWirelessVlanid", UserManagerAttributeArgs.builder()
            .typeId(26)
            .valueType("uint32")
            .build());

        var test = new UserManagerUserGroup("test", UserManagerUserGroupArgs.builder()
            .attributes(            
                mikrotikWirelessComment.name().applyValue(name -> String.format("%s:Test Group", name)),
                mikrotikWirelessVlanid.name().applyValue(name -> String.format("%s:100", name)))
            .innerAuths(            
                "ttls-chap",
                "ttls-pap")
            .outerAuths(            
                "chap",
                "pap")
            .build());

    }
}
Copy
resources:
  mikrotikWirelessComment:
    type: routeros:UserManagerAttribute
    properties:
      typeId: 21
      valueType: string
  mikrotikWirelessVlanid:
    type: routeros:UserManagerAttribute
    properties:
      typeId: 26
      valueType: uint32
  test:
    type: routeros:UserManagerUserGroup
    properties:
      attributes:
        - ${mikrotikWirelessComment.name}:Test Group
        - ${mikrotikWirelessVlanid.name}:100
      innerAuths:
        - ttls-chap
        - ttls-pap
      outerAuths:
        - chap
        - pap
Copy

Create UserManagerUserGroup Resource

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

Constructor syntax

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

@overload
def UserManagerUserGroup(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         ___id_: Optional[float] = None,
                         ___path_: Optional[str] = None,
                         attributes: Optional[Sequence[str]] = None,
                         inner_auths: Optional[Sequence[str]] = None,
                         name: Optional[str] = None,
                         outer_auths: Optional[Sequence[str]] = None,
                         user_manager_user_group_id: Optional[str] = None)
func NewUserManagerUserGroup(ctx *Context, name string, args *UserManagerUserGroupArgs, opts ...ResourceOption) (*UserManagerUserGroup, error)
public UserManagerUserGroup(string name, UserManagerUserGroupArgs? args = null, CustomResourceOptions? opts = null)
public UserManagerUserGroup(String name, UserManagerUserGroupArgs args)
public UserManagerUserGroup(String name, UserManagerUserGroupArgs args, CustomResourceOptions options)
type: routeros:UserManagerUserGroup
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 UserManagerUserGroupArgs
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 UserManagerUserGroupArgs
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 UserManagerUserGroupArgs
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 UserManagerUserGroupArgs
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. UserManagerUserGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Attributes List<string>
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
InnerAuths List<string>
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
Name string
Unique name of the group.
OuterAuths List<string>
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
UserManagerUserGroupId string
The ID of this resource.
___id_ double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
Attributes []string
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
InnerAuths []string
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
Name string
Unique name of the group.
OuterAuths []string
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
UserManagerUserGroupId string
The ID of this resource.
___id_ float64
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
___id_ Double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
attributes List<String>
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
innerAuths List<String>
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
name String
Unique name of the group.
outerAuths List<String>
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
userManagerUserGroupId String
The ID of this resource.
___id_ number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
attributes string[]
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
innerAuths string[]
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
name string
Unique name of the group.
outerAuths string[]
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
userManagerUserGroupId string
The ID of this resource.
___id_ float
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ str
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
attributes Sequence[str]
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
inner_auths Sequence[str]
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
name str
Unique name of the group.
outer_auths Sequence[str]
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
user_manager_user_group_id str
The ID of this resource.
___id_ Number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
attributes List<String>
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
innerAuths List<String>
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
name String
Unique name of the group.
outerAuths List<String>
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
userManagerUserGroupId String
The ID of this resource.

Outputs

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

Default bool
It's the default item.
DefaultName string
The default name of the group.
Id string
The provider-assigned unique ID for this managed resource.
Default bool
It's the default item.
DefaultName string
The default name of the group.
Id string
The provider-assigned unique ID for this managed resource.
defaultName String
The default name of the group.
default_ Boolean
It's the default item.
id String
The provider-assigned unique ID for this managed resource.
default boolean
It's the default item.
defaultName string
The default name of the group.
id string
The provider-assigned unique ID for this managed resource.
default bool
It's the default item.
default_name str
The default name of the group.
id str
The provider-assigned unique ID for this managed resource.
default Boolean
It's the default item.
defaultName String
The default name of the group.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing UserManagerUserGroup Resource

Get an existing UserManagerUserGroup 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?: UserManagerUserGroupState, opts?: CustomResourceOptions): UserManagerUserGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ___id_: Optional[float] = None,
        ___path_: Optional[str] = None,
        attributes: Optional[Sequence[str]] = None,
        default: Optional[bool] = None,
        default_name: Optional[str] = None,
        inner_auths: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        outer_auths: Optional[Sequence[str]] = None,
        user_manager_user_group_id: Optional[str] = None) -> UserManagerUserGroup
func GetUserManagerUserGroup(ctx *Context, name string, id IDInput, state *UserManagerUserGroupState, opts ...ResourceOption) (*UserManagerUserGroup, error)
public static UserManagerUserGroup Get(string name, Input<string> id, UserManagerUserGroupState? state, CustomResourceOptions? opts = null)
public static UserManagerUserGroup get(String name, Output<String> id, UserManagerUserGroupState state, CustomResourceOptions options)
resources:  _:    type: routeros:UserManagerUserGroup    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:
Attributes List<string>
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
Default bool
It's the default item.
DefaultName string
The default name of the group.
InnerAuths List<string>
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
Name string
Unique name of the group.
OuterAuths List<string>
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
UserManagerUserGroupId string
The ID of this resource.
___id_ double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
Attributes []string
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
Default bool
It's the default item.
DefaultName string
The default name of the group.
InnerAuths []string
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
Name string
Unique name of the group.
OuterAuths []string
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
UserManagerUserGroupId string
The ID of this resource.
___id_ float64
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
___id_ Double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
attributes List<String>
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
defaultName String
The default name of the group.
default_ Boolean
It's the default item.
innerAuths List<String>
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
name String
Unique name of the group.
outerAuths List<String>
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
userManagerUserGroupId String
The ID of this resource.
___id_ number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
attributes string[]
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
default boolean
It's the default item.
defaultName string
The default name of the group.
innerAuths string[]
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
name string
Unique name of the group.
outerAuths string[]
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
userManagerUserGroupId string
The ID of this resource.
___id_ float
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ str
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
attributes Sequence[str]
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
default bool
It's the default item.
default_name str
The default name of the group.
inner_auths Sequence[str]
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
name str
Unique name of the group.
outer_auths Sequence[str]
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
user_manager_user_group_id str
The ID of this resource.
___id_ Number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
attributes List<String>
A custom set of colon-separated attributes with their values will be added to Access-Accept messages for users in this group.
default Boolean
It's the default item.
defaultName String
The default name of the group.
innerAuths List<String>
A set of allowed authentication methods for tunneled authentication methods (ttls-pap, ttls-chap, ttls-mschap1, ttls-mschap2, peap-mschap2).
name String
Unique name of the group.
outerAuths List<String>
A set of allowed authentication methods (pap, chap, mschap1, mschap2, eap-tls, eap-ttls, eap-peap, eap-mschap2).
userManagerUserGroupId String
The ID of this resource.

Import

#The ID can be found via API or the terminal

#The command for the terminal is -> :put [/user-manager/user/group get [print show-ids]]

$ pulumi import routeros:index/userManagerUserGroup:UserManagerUserGroup test '*1'
Copy

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

Package Details

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