routeros.UserManagerUser
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 testUserManagerUserGroup = new routeros.UserManagerUserGroup("testUserManagerUserGroup", {});
const testUserManagerUser = new routeros.UserManagerUser("testUserManagerUser", {
attributes: [
pulumi.interpolate`${mikrotikWirelessComment.name}:Test Group`,
pulumi.interpolate`${mikrotikWirelessVlanid.name}:100`,
],
group: testUserManagerUserGroup.name,
password: "password",
});
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_user_manager_user_group = routeros.UserManagerUserGroup("testUserManagerUserGroup")
test_user_manager_user = routeros.UserManagerUser("testUserManagerUser",
attributes=[
mikrotik_wireless_comment.name.apply(lambda name: f"{name}:Test Group"),
mikrotik_wireless_vlanid.name.apply(lambda name: f"{name}:100"),
],
group=test_user_manager_user_group.name,
password="password")
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
}
testUserManagerUserGroup, err := routeros.NewUserManagerUserGroup(ctx, "testUserManagerUserGroup", nil)
if err != nil {
return err
}
_, err = routeros.NewUserManagerUser(ctx, "testUserManagerUser", &routeros.UserManagerUserArgs{
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),
},
Group: testUserManagerUserGroup.Name,
Password: pulumi.String("password"),
})
if err != nil {
return err
}
return nil
})
}
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 testUserManagerUserGroup = new Routeros.UserManagerUserGroup("testUserManagerUserGroup");
var testUserManagerUser = new Routeros.UserManagerUser("testUserManagerUser", new()
{
Attributes = new[]
{
mikrotikWirelessComment.Name.Apply(name => $"{name}:Test Group"),
mikrotikWirelessVlanid.Name.Apply(name => $"{name}:100"),
},
Group = testUserManagerUserGroup.Name,
Password = "password",
});
});
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.UserManagerUser;
import com.pulumi.routeros.UserManagerUserArgs;
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 testUserManagerUserGroup = new UserManagerUserGroup("testUserManagerUserGroup");
var testUserManagerUser = new UserManagerUser("testUserManagerUser", UserManagerUserArgs.builder()
.attributes(
mikrotikWirelessComment.name().applyValue(name -> String.format("%s:Test Group", name)),
mikrotikWirelessVlanid.name().applyValue(name -> String.format("%s:100", name)))
.group(testUserManagerUserGroup.name())
.password("password")
.build());
}
}
resources:
mikrotikWirelessComment:
type: routeros:UserManagerAttribute
properties:
typeId: 21
valueType: string
mikrotikWirelessVlanid:
type: routeros:UserManagerAttribute
properties:
typeId: 26
valueType: uint32
testUserManagerUserGroup:
type: routeros:UserManagerUserGroup
testUserManagerUser:
type: routeros:UserManagerUser
properties:
attributes:
- ${mikrotikWirelessComment.name}:Test Group
- ${mikrotikWirelessVlanid.name}:100
group: ${testUserManagerUserGroup.name}
password: password
Create UserManagerUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UserManagerUser(name: string, args?: UserManagerUserArgs, opts?: CustomResourceOptions);
@overload
def UserManagerUser(resource_name: str,
args: Optional[UserManagerUserArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def UserManagerUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
attributes: Optional[Sequence[str]] = None,
caller_id: Optional[str] = None,
comment: Optional[str] = None,
disabled: Optional[bool] = None,
group: Optional[str] = None,
name: Optional[str] = None,
otp_secret: Optional[str] = None,
password: Optional[str] = None,
shared_users: Optional[float] = None,
user_manager_user_id: Optional[str] = None)
func NewUserManagerUser(ctx *Context, name string, args *UserManagerUserArgs, opts ...ResourceOption) (*UserManagerUser, error)
public UserManagerUser(string name, UserManagerUserArgs? args = null, CustomResourceOptions? opts = null)
public UserManagerUser(String name, UserManagerUserArgs args)
public UserManagerUser(String name, UserManagerUserArgs args, CustomResourceOptions options)
type: routeros:UserManagerUser
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 UserManagerUserArgs
- 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 UserManagerUserArgs
- 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 UserManagerUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserManagerUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserManagerUserArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
UserManagerUser 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 UserManagerUser 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. - Caller
Id string - Allow user's authentication with a specific Calling-Station-Id value.
- Comment string
- Disabled bool
- Group string
- Name of the group the user is associated with.
- Name string
- Username for session authentication.
- Otp
Secret string - A token of a one-time code that will be attached to the password.
- Password string
- The password of the user for session authentication.
- double
- The total amount of sessions the user can simultaneously establish.
- User
Manager stringUser Id - 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. - Caller
Id string - Allow user's authentication with a specific Calling-Station-Id value.
- Comment string
- Disabled bool
- Group string
- Name of the group the user is associated with.
- Name string
- Username for session authentication.
- Otp
Secret string - A token of a one-time code that will be attached to the password.
- Password string
- The password of the user for session authentication.
- float64
- The total amount of sessions the user can simultaneously establish.
- User
Manager stringUser Id - 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. - caller
Id String - Allow user's authentication with a specific Calling-Station-Id value.
- comment String
- disabled Boolean
- group String
- Name of the group the user is associated with.
- name String
- Username for session authentication.
- otp
Secret String - A token of a one-time code that will be attached to the password.
- password String
- The password of the user for session authentication.
- Double
- The total amount of sessions the user can simultaneously establish.
- user
Manager StringUser Id - 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. - caller
Id string - Allow user's authentication with a specific Calling-Station-Id value.
- comment string
- disabled boolean
- group string
- Name of the group the user is associated with.
- name string
- Username for session authentication.
- otp
Secret string - A token of a one-time code that will be attached to the password.
- password string
- The password of the user for session authentication.
- number
- The total amount of sessions the user can simultaneously establish.
- user
Manager stringUser Id - 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. - caller_
id str - Allow user's authentication with a specific Calling-Station-Id value.
- comment str
- disabled bool
- group str
- Name of the group the user is associated with.
- name str
- Username for session authentication.
- otp_
secret str - A token of a one-time code that will be attached to the password.
- password str
- The password of the user for session authentication.
- float
- The total amount of sessions the user can simultaneously establish.
- user_
manager_ struser_ id - 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. - caller
Id String - Allow user's authentication with a specific Calling-Station-Id value.
- comment String
- disabled Boolean
- group String
- Name of the group the user is associated with.
- name String
- Username for session authentication.
- otp
Secret String - A token of a one-time code that will be attached to the password.
- password String
- The password of the user for session authentication.
- Number
- The total amount of sessions the user can simultaneously establish.
- user
Manager StringUser Id - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the UserManagerUser 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 UserManagerUser Resource
Get an existing UserManagerUser 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?: UserManagerUserState, opts?: CustomResourceOptions): UserManagerUser
@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,
caller_id: Optional[str] = None,
comment: Optional[str] = None,
disabled: Optional[bool] = None,
group: Optional[str] = None,
name: Optional[str] = None,
otp_secret: Optional[str] = None,
password: Optional[str] = None,
shared_users: Optional[float] = None,
user_manager_user_id: Optional[str] = None) -> UserManagerUser
func GetUserManagerUser(ctx *Context, name string, id IDInput, state *UserManagerUserState, opts ...ResourceOption) (*UserManagerUser, error)
public static UserManagerUser Get(string name, Input<string> id, UserManagerUserState? state, CustomResourceOptions? opts = null)
public static UserManagerUser get(String name, Output<String> id, UserManagerUserState state, CustomResourceOptions options)
resources: _: type: routeros:UserManagerUser 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.
- 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. - Caller
Id string - Allow user's authentication with a specific Calling-Station-Id value.
- Comment string
- Disabled bool
- Group string
- Name of the group the user is associated with.
- Name string
- Username for session authentication.
- Otp
Secret string - A token of a one-time code that will be attached to the password.
- Password string
- The password of the user for session authentication.
- double
- The total amount of sessions the user can simultaneously establish.
- User
Manager stringUser Id - 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. - Caller
Id string - Allow user's authentication with a specific Calling-Station-Id value.
- Comment string
- Disabled bool
- Group string
- Name of the group the user is associated with.
- Name string
- Username for session authentication.
- Otp
Secret string - A token of a one-time code that will be attached to the password.
- Password string
- The password of the user for session authentication.
- float64
- The total amount of sessions the user can simultaneously establish.
- User
Manager stringUser Id - 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. - caller
Id String - Allow user's authentication with a specific Calling-Station-Id value.
- comment String
- disabled Boolean
- group String
- Name of the group the user is associated with.
- name String
- Username for session authentication.
- otp
Secret String - A token of a one-time code that will be attached to the password.
- password String
- The password of the user for session authentication.
- Double
- The total amount of sessions the user can simultaneously establish.
- user
Manager StringUser Id - 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. - caller
Id string - Allow user's authentication with a specific Calling-Station-Id value.
- comment string
- disabled boolean
- group string
- Name of the group the user is associated with.
- name string
- Username for session authentication.
- otp
Secret string - A token of a one-time code that will be attached to the password.
- password string
- The password of the user for session authentication.
- number
- The total amount of sessions the user can simultaneously establish.
- user
Manager stringUser Id - 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. - caller_
id str - Allow user's authentication with a specific Calling-Station-Id value.
- comment str
- disabled bool
- group str
- Name of the group the user is associated with.
- name str
- Username for session authentication.
- otp_
secret str - A token of a one-time code that will be attached to the password.
- password str
- The password of the user for session authentication.
- float
- The total amount of sessions the user can simultaneously establish.
- user_
manager_ struser_ id - 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. - caller
Id String - Allow user's authentication with a specific Calling-Station-Id value.
- comment String
- disabled Boolean
- group String
- Name of the group the user is associated with.
- name String
- Username for session authentication.
- otp
Secret String - A token of a one-time code that will be attached to the password.
- password String
- The password of the user for session authentication.
- Number
- The total amount of sessions the user can simultaneously establish.
- user
Manager StringUser Id - 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 get [print show-ids]]
$ pulumi import routeros:index/userManagerUser:UserManagerUser test '*1'
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.