1. Packages
  2. Selectel Provider
  3. API Docs
  4. IamServiceuserV1
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

selectel.IamServiceuserV1

Explore with Pulumi AI

selectel logo
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const serviceuser1 = new selectel.IamServiceuserV1("serviceuser1", {
        password: "password",
        roles: [
            {
                roleName: "member",
                scope: "account",
            },
            {
                roleName: "iam_admin",
                scope: "account",
            },
        ],
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    serviceuser1 = selectel.IamServiceuserV1("serviceuser1",
        password="password",
        roles=[
            {
                "role_name": "member",
                "scope": "account",
            },
            {
                "role_name": "iam_admin",
                "scope": "account",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v6/selectel"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := selectel.NewIamServiceuserV1(ctx, "serviceuser1", &selectel.IamServiceuserV1Args{
    			Password: pulumi.String("password"),
    			Roles: selectel.IamServiceuserV1RoleArray{
    				&selectel.IamServiceuserV1RoleArgs{
    					RoleName: pulumi.String("member"),
    					Scope:    pulumi.String("account"),
    				},
    				&selectel.IamServiceuserV1RoleArgs{
    					RoleName: pulumi.String("iam_admin"),
    					Scope:    pulumi.String("account"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Selectel = Pulumi.Selectel;
    
    return await Deployment.RunAsync(() => 
    {
        var serviceuser1 = new Selectel.IamServiceuserV1("serviceuser1", new()
        {
            Password = "password",
            Roles = new[]
            {
                new Selectel.Inputs.IamServiceuserV1RoleArgs
                {
                    RoleName = "member",
                    Scope = "account",
                },
                new Selectel.Inputs.IamServiceuserV1RoleArgs
                {
                    RoleName = "iam_admin",
                    Scope = "account",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.IamServiceuserV1;
    import com.pulumi.selectel.IamServiceuserV1Args;
    import com.pulumi.selectel.inputs.IamServiceuserV1RoleArgs;
    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 serviceuser1 = new IamServiceuserV1("serviceuser1", IamServiceuserV1Args.builder()
                .password("password")
                .roles(            
                    IamServiceuserV1RoleArgs.builder()
                        .roleName("member")
                        .scope("account")
                        .build(),
                    IamServiceuserV1RoleArgs.builder()
                        .roleName("iam_admin")
                        .scope("account")
                        .build())
                .build());
    
        }
    }
    
    resources:
      serviceuser1:
        type: selectel:IamServiceuserV1
        properties:
          password: password
          roles:
            - roleName: member
              scope: account
            - roleName: iam_admin
              scope: account
    

    Create IamServiceuserV1 Resource

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

    Constructor syntax

    new IamServiceuserV1(name: string, args: IamServiceuserV1Args, opts?: CustomResourceOptions);
    @overload
    def IamServiceuserV1(resource_name: str,
                         args: IamServiceuserV1Args,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamServiceuserV1(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         password: Optional[str] = None,
                         enabled: Optional[bool] = None,
                         iam_serviceuser_v1_id: Optional[str] = None,
                         name: Optional[str] = None,
                         roles: Optional[Sequence[IamServiceuserV1RoleArgs]] = None)
    func NewIamServiceuserV1(ctx *Context, name string, args IamServiceuserV1Args, opts ...ResourceOption) (*IamServiceuserV1, error)
    public IamServiceuserV1(string name, IamServiceuserV1Args args, CustomResourceOptions? opts = null)
    public IamServiceuserV1(String name, IamServiceuserV1Args args)
    public IamServiceuserV1(String name, IamServiceuserV1Args args, CustomResourceOptions options)
    
    type: selectel:IamServiceuserV1
    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 IamServiceuserV1Args
    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 IamServiceuserV1Args
    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 IamServiceuserV1Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamServiceuserV1Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamServiceuserV1Args
    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 iamServiceuserV1Resource = new Selectel.IamServiceuserV1("iamServiceuserV1Resource", new()
    {
        Password = "string",
        Enabled = false,
        IamServiceuserV1Id = "string",
        Name = "string",
        Roles = new[]
        {
            new Selectel.Inputs.IamServiceuserV1RoleArgs
            {
                RoleName = "string",
                Scope = "string",
                ProjectId = "string",
            },
        },
    });
    
    example, err := selectel.NewIamServiceuserV1(ctx, "iamServiceuserV1Resource", &selectel.IamServiceuserV1Args{
    	Password:           pulumi.String("string"),
    	Enabled:            pulumi.Bool(false),
    	IamServiceuserV1Id: pulumi.String("string"),
    	Name:               pulumi.String("string"),
    	Roles: selectel.IamServiceuserV1RoleArray{
    		&selectel.IamServiceuserV1RoleArgs{
    			RoleName:  pulumi.String("string"),
    			Scope:     pulumi.String("string"),
    			ProjectId: pulumi.String("string"),
    		},
    	},
    })
    
    var iamServiceuserV1Resource = new IamServiceuserV1("iamServiceuserV1Resource", IamServiceuserV1Args.builder()
        .password("string")
        .enabled(false)
        .iamServiceuserV1Id("string")
        .name("string")
        .roles(IamServiceuserV1RoleArgs.builder()
            .roleName("string")
            .scope("string")
            .projectId("string")
            .build())
        .build());
    
    iam_serviceuser_v1_resource = selectel.IamServiceuserV1("iamServiceuserV1Resource",
        password="string",
        enabled=False,
        iam_serviceuser_v1_id="string",
        name="string",
        roles=[{
            "role_name": "string",
            "scope": "string",
            "project_id": "string",
        }])
    
    const iamServiceuserV1Resource = new selectel.IamServiceuserV1("iamServiceuserV1Resource", {
        password: "string",
        enabled: false,
        iamServiceuserV1Id: "string",
        name: "string",
        roles: [{
            roleName: "string",
            scope: "string",
            projectId: "string",
        }],
    });
    
    type: selectel:IamServiceuserV1
    properties:
        enabled: false
        iamServiceuserV1Id: string
        name: string
        password: string
        roles:
            - projectId: string
              roleName: string
              scope: string
    

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

    Password string
    Password of the service user.
    Enabled bool
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    IamServiceuserV1Id string
    Name string
    Name of the service user.
    Roles List<IamServiceuserV1Role>
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    Password string
    Password of the service user.
    Enabled bool
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    IamServiceuserV1Id string
    Name string
    Name of the service user.
    Roles []IamServiceuserV1RoleArgs
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    password String
    Password of the service user.
    enabled Boolean
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    iamServiceuserV1Id String
    name String
    Name of the service user.
    roles List<IamServiceuserV1Role>
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    password string
    Password of the service user.
    enabled boolean
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    iamServiceuserV1Id string
    name string
    Name of the service user.
    roles IamServiceuserV1Role[]
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    password str
    Password of the service user.
    enabled bool
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    iam_serviceuser_v1_id str
    name str
    Name of the service user.
    roles Sequence[IamServiceuserV1RoleArgs]
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    password String
    Password of the service user.
    enabled Boolean
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    iamServiceuserV1Id String
    name String
    Name of the service user.
    roles List<Property Map>
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.

    Outputs

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

    Get an existing IamServiceuserV1 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?: IamServiceuserV1State, opts?: CustomResourceOptions): IamServiceuserV1
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            iam_serviceuser_v1_id: Optional[str] = None,
            name: Optional[str] = None,
            password: Optional[str] = None,
            roles: Optional[Sequence[IamServiceuserV1RoleArgs]] = None) -> IamServiceuserV1
    func GetIamServiceuserV1(ctx *Context, name string, id IDInput, state *IamServiceuserV1State, opts ...ResourceOption) (*IamServiceuserV1, error)
    public static IamServiceuserV1 Get(string name, Input<string> id, IamServiceuserV1State? state, CustomResourceOptions? opts = null)
    public static IamServiceuserV1 get(String name, Output<String> id, IamServiceuserV1State state, CustomResourceOptions options)
    resources:  _:    type: selectel:IamServiceuserV1    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.
    The following state arguments are supported:
    Enabled bool
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    IamServiceuserV1Id string
    Name string
    Name of the service user.
    Password string
    Password of the service user.
    Roles List<IamServiceuserV1Role>
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    Enabled bool
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    IamServiceuserV1Id string
    Name string
    Name of the service user.
    Password string
    Password of the service user.
    Roles []IamServiceuserV1RoleArgs
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    enabled Boolean
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    iamServiceuserV1Id String
    name String
    Name of the service user.
    password String
    Password of the service user.
    roles List<IamServiceuserV1Role>
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    enabled boolean
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    iamServiceuserV1Id string
    name string
    Name of the service user.
    password string
    Password of the service user.
    roles IamServiceuserV1Role[]
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    enabled bool
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    iam_serviceuser_v1_id str
    name str
    Name of the service user.
    password str
    Password of the service user.
    roles Sequence[IamServiceuserV1RoleArgs]
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    enabled Boolean
    Specifies if you can create a Keystone token for the service user. Boolean flag, the default value is true. Learn more about Keystone tokens.
    iamServiceuserV1Id String
    name String
    Name of the service user.
    password String
    Password of the service user.
    roles List<Property Map>
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.

    Supporting Types

    IamServiceuserV1Role, IamServiceuserV1RoleArgs

    RoleName string
    Role name. Available role names are iam_admin, member, reader, billing, object_storage:admin, and object_storage_user.
    Scope string
    Scope of the role. Available scopes are account and project. If scope is project, the project_id argument is required.
    ProjectId string
    Unique identifier of the associated project. Changing this creates a new service user. If scope is project, the project_id argument is required. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    RoleName string
    Role name. Available role names are iam_admin, member, reader, billing, object_storage:admin, and object_storage_user.
    Scope string
    Scope of the role. Available scopes are account and project. If scope is project, the project_id argument is required.
    ProjectId string
    Unique identifier of the associated project. Changing this creates a new service user. If scope is project, the project_id argument is required. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    roleName String
    Role name. Available role names are iam_admin, member, reader, billing, object_storage:admin, and object_storage_user.
    scope String
    Scope of the role. Available scopes are account and project. If scope is project, the project_id argument is required.
    projectId String
    Unique identifier of the associated project. Changing this creates a new service user. If scope is project, the project_id argument is required. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    roleName string
    Role name. Available role names are iam_admin, member, reader, billing, object_storage:admin, and object_storage_user.
    scope string
    Scope of the role. Available scopes are account and project. If scope is project, the project_id argument is required.
    projectId string
    Unique identifier of the associated project. Changing this creates a new service user. If scope is project, the project_id argument is required. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    role_name str
    Role name. Available role names are iam_admin, member, reader, billing, object_storage:admin, and object_storage_user.
    scope str
    Scope of the role. Available scopes are account and project. If scope is project, the project_id argument is required.
    project_id str
    Unique identifier of the associated project. Changing this creates a new service user. If scope is project, the project_id argument is required. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    roleName String
    Role name. Available role names are iam_admin, member, reader, billing, object_storage:admin, and object_storage_user.
    scope String
    Scope of the role. Available scopes are account and project. If scope is project, the project_id argument is required.
    projectId String
    Unique identifier of the associated project. Changing this creates a new service user. If scope is project, the project_id argument is required. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.

    Import

    You can import a service user:

    export OS_DOMAIN_NAME=<account_id>

    export OS_USERNAME=

    export OS_PASSWORD=

    $ pulumi import selectel:index/iamServiceuserV1:IamServiceuserV1 serviceuser_1 <user_id>
    

    where:

    • <account_id> — Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.

    • <username> — Name of the service user. To get the name, in the Control panel, go to Identity & Access ManagementUser management ⟶ the Service users tab ⟶ copy the name of the required user. Learn more about Service Users.

    • <password> — Password of the service user.

    • <user_id> — Unique identifier of the service user to import, for example, abc1bb378ac84e1234b869b77aadd2ab. To get the ID, in the Control panel, go to Identity & Access ManagementUser management ⟶ the Service users tab ⟶ copy the ID under the user name.

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

    Package Details

    Repository
    selectel selectel/terraform-provider-selectel
    License
    Notes
    This Pulumi package is based on the selectel Terraform Provider.
    selectel logo
    selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel