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

selectel.IamUserV1

Explore with Pulumi AI

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

    Creates and manages a control panel (local) user or a federated user using public API v1. Selectel products support Identity and Access Management (IAM). For more information about users, see the official Selectel documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const user1 = new selectel.IamUserV1("user1", {
        email: "mail@example.com",
        roles: [{
            roleName: "member",
            scope: "account",
        }],
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    user1 = selectel.IamUserV1("user1",
        email="mail@example.com",
        roles=[{
            "role_name": "member",
            "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.NewIamUserV1(ctx, "user1", &selectel.IamUserV1Args{
    			Email: pulumi.String("mail@example.com"),
    			Roles: selectel.IamUserV1RoleArray{
    				&selectel.IamUserV1RoleArgs{
    					RoleName: pulumi.String("member"),
    					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 user1 = new Selectel.IamUserV1("user1", new()
        {
            Email = "mail@example.com",
            Roles = new[]
            {
                new Selectel.Inputs.IamUserV1RoleArgs
                {
                    RoleName = "member",
                    Scope = "account",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.IamUserV1;
    import com.pulumi.selectel.IamUserV1Args;
    import com.pulumi.selectel.inputs.IamUserV1RoleArgs;
    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 user1 = new IamUserV1("user1", IamUserV1Args.builder()
                .email("mail@example.com")
                .roles(IamUserV1RoleArgs.builder()
                    .roleName("member")
                    .scope("account")
                    .build())
                .build());
    
        }
    }
    
    resources:
      user1:
        type: selectel:IamUserV1
        properties:
          email: mail@example.com
          roles:
            - roleName: member
              scope: account
    

    Create IamUserV1 Resource

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

    Constructor syntax

    new IamUserV1(name: string, args: IamUserV1Args, opts?: CustomResourceOptions);
    @overload
    def IamUserV1(resource_name: str,
                  args: IamUserV1Args,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamUserV1(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  email: Optional[str] = None,
                  federation: Optional[IamUserV1FederationArgs] = None,
                  iam_user_v1_id: Optional[str] = None,
                  roles: Optional[Sequence[IamUserV1RoleArgs]] = None)
    func NewIamUserV1(ctx *Context, name string, args IamUserV1Args, opts ...ResourceOption) (*IamUserV1, error)
    public IamUserV1(string name, IamUserV1Args args, CustomResourceOptions? opts = null)
    public IamUserV1(String name, IamUserV1Args args)
    public IamUserV1(String name, IamUserV1Args args, CustomResourceOptions options)
    
    type: selectel:IamUserV1
    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 IamUserV1Args
    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 IamUserV1Args
    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 IamUserV1Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamUserV1Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamUserV1Args
    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 iamUserV1Resource = new Selectel.IamUserV1("iamUserV1Resource", new()
    {
        Email = "string",
        Federation = new Selectel.Inputs.IamUserV1FederationArgs
        {
            ExternalId = "string",
            Id = "string",
        },
        IamUserV1Id = "string",
        Roles = new[]
        {
            new Selectel.Inputs.IamUserV1RoleArgs
            {
                RoleName = "string",
                Scope = "string",
                ProjectId = "string",
            },
        },
    });
    
    example, err := selectel.NewIamUserV1(ctx, "iamUserV1Resource", &selectel.IamUserV1Args{
    	Email: pulumi.String("string"),
    	Federation: &selectel.IamUserV1FederationArgs{
    		ExternalId: pulumi.String("string"),
    		Id:         pulumi.String("string"),
    	},
    	IamUserV1Id: pulumi.String("string"),
    	Roles: selectel.IamUserV1RoleArray{
    		&selectel.IamUserV1RoleArgs{
    			RoleName:  pulumi.String("string"),
    			Scope:     pulumi.String("string"),
    			ProjectId: pulumi.String("string"),
    		},
    	},
    })
    
    var iamUserV1Resource = new IamUserV1("iamUserV1Resource", IamUserV1Args.builder()
        .email("string")
        .federation(IamUserV1FederationArgs.builder()
            .externalId("string")
            .id("string")
            .build())
        .iamUserV1Id("string")
        .roles(IamUserV1RoleArgs.builder()
            .roleName("string")
            .scope("string")
            .projectId("string")
            .build())
        .build());
    
    iam_user_v1_resource = selectel.IamUserV1("iamUserV1Resource",
        email="string",
        federation={
            "external_id": "string",
            "id": "string",
        },
        iam_user_v1_id="string",
        roles=[{
            "role_name": "string",
            "scope": "string",
            "project_id": "string",
        }])
    
    const iamUserV1Resource = new selectel.IamUserV1("iamUserV1Resource", {
        email: "string",
        federation: {
            externalId: "string",
            id: "string",
        },
        iamUserV1Id: "string",
        roles: [{
            roleName: "string",
            scope: "string",
            projectId: "string",
        }],
    });
    
    type: selectel:IamUserV1
    properties:
        email: string
        federation:
            externalId: string
            id: string
        iamUserV1Id: string
        roles:
            - projectId: string
              roleName: string
              scope: string
    

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

    Email string
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    Federation IamUserV1Federation
    Information about the federation. auth_type must be set to federated.
    IamUserV1Id string
    Roles List<IamUserV1Role>
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    Email string
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    Federation IamUserV1FederationArgs
    Information about the federation. auth_type must be set to federated.
    IamUserV1Id string
    Roles []IamUserV1RoleArgs
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    email String
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    federation IamUserV1Federation
    Information about the federation. auth_type must be set to federated.
    iamUserV1Id String
    roles List<IamUserV1Role>
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    email string
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    federation IamUserV1Federation
    Information about the federation. auth_type must be set to federated.
    iamUserV1Id string
    roles IamUserV1Role[]
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    email str
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    federation IamUserV1FederationArgs
    Information about the federation. auth_type must be set to federated.
    iam_user_v1_id str
    roles Sequence[IamUserV1RoleArgs]
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    email String
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    federation Property Map
    Information about the federation. auth_type must be set to federated.
    iamUserV1Id String
    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 IamUserV1 resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    KeystoneId string
    Unique Keystone identifier of the user.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeystoneId string
    Unique Keystone identifier of the user.
    id String
    The provider-assigned unique ID for this managed resource.
    keystoneId String
    Unique Keystone identifier of the user.
    id string
    The provider-assigned unique ID for this managed resource.
    keystoneId string
    Unique Keystone identifier of the user.
    id str
    The provider-assigned unique ID for this managed resource.
    keystone_id str
    Unique Keystone identifier of the user.
    id String
    The provider-assigned unique ID for this managed resource.
    keystoneId String
    Unique Keystone identifier of the user.

    Look up Existing IamUserV1 Resource

    Get an existing IamUserV1 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?: IamUserV1State, opts?: CustomResourceOptions): IamUserV1
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            email: Optional[str] = None,
            federation: Optional[IamUserV1FederationArgs] = None,
            iam_user_v1_id: Optional[str] = None,
            keystone_id: Optional[str] = None,
            roles: Optional[Sequence[IamUserV1RoleArgs]] = None) -> IamUserV1
    func GetIamUserV1(ctx *Context, name string, id IDInput, state *IamUserV1State, opts ...ResourceOption) (*IamUserV1, error)
    public static IamUserV1 Get(string name, Input<string> id, IamUserV1State? state, CustomResourceOptions? opts = null)
    public static IamUserV1 get(String name, Output<String> id, IamUserV1State state, CustomResourceOptions options)
    resources:  _:    type: selectel:IamUserV1    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:
    Email string
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    Federation IamUserV1Federation
    Information about the federation. auth_type must be set to federated.
    IamUserV1Id string
    KeystoneId string
    Unique Keystone identifier of the user.
    Roles List<IamUserV1Role>
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    Email string
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    Federation IamUserV1FederationArgs
    Information about the federation. auth_type must be set to federated.
    IamUserV1Id string
    KeystoneId string
    Unique Keystone identifier of the user.
    Roles []IamUserV1RoleArgs
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    email String
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    federation IamUserV1Federation
    Information about the federation. auth_type must be set to federated.
    iamUserV1Id String
    keystoneId String
    Unique Keystone identifier of the user.
    roles List<IamUserV1Role>
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    email string
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    federation IamUserV1Federation
    Information about the federation. auth_type must be set to federated.
    iamUserV1Id string
    keystoneId string
    Unique Keystone identifier of the user.
    roles IamUserV1Role[]
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    email str
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    federation IamUserV1FederationArgs
    Information about the federation. auth_type must be set to federated.
    iam_user_v1_id str
    keystone_id str
    Unique Keystone identifier of the user.
    roles Sequence[IamUserV1RoleArgs]
    Manages service user roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
    email String
    Email address of the user. Changing this creates a new user. We will send authentication instructions to this email.
    federation Property Map
    Information about the federation. auth_type must be set to federated.
    iamUserV1Id String
    keystoneId String
    Unique Keystone identifier of the 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

    IamUserV1Federation, IamUserV1FederationArgs

    ExternalId string
    Unique identifier of the user assigned by the Identity Provider.
    Id string
    Unique identifier of the federation.
    ExternalId string
    Unique identifier of the user assigned by the Identity Provider.
    Id string
    Unique identifier of the federation.
    externalId String
    Unique identifier of the user assigned by the Identity Provider.
    id String
    Unique identifier of the federation.
    externalId string
    Unique identifier of the user assigned by the Identity Provider.
    id string
    Unique identifier of the federation.
    external_id str
    Unique identifier of the user assigned by the Identity Provider.
    id str
    Unique identifier of the federation.
    externalId String
    Unique identifier of the user assigned by the Identity Provider.
    id String
    Unique identifier of the federation.

    IamUserV1Role, IamUserV1RoleArgs

    RoleName string
    Role name. Available role names are iam_admin, member, reader, and billing.
    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, and billing.
    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, and billing.
    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, and billing.
    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, and billing.
    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, and billing.
    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 user:

    export OS_DOMAIN_NAME=<account_id>

    export OS_USERNAME=

    export OS_PASSWORD=

    $ pulumi import selectel:index/iamUserV1:IamUserV1 user_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 user to import (not the Keystone ID), for example, 123456_5432. To get the ID, use either iam-go or IAM API.

    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