selectel.IamGroupV1
Explore with Pulumi AI
Creates and manages a user group for Selectel products using public API v1. Selectel products support Identity and Access Management (IAM). For more information about user groups, see the official Selectel documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as selectel from "@pulumi/selectel";
const group1 = new selectel.IamGroupV1("group1", {
description: "My test group",
roles: [{
roleName: "member",
scope: "account",
}],
});
import pulumi
import pulumi_selectel as selectel
group1 = selectel.IamGroupV1("group1",
description="My test group",
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.NewIamGroupV1(ctx, "group1", &selectel.IamGroupV1Args{
Description: pulumi.String("My test group"),
Roles: selectel.IamGroupV1RoleArray{
&selectel.IamGroupV1RoleArgs{
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 group1 = new Selectel.IamGroupV1("group1", new()
{
Description = "My test group",
Roles = new[]
{
new Selectel.Inputs.IamGroupV1RoleArgs
{
RoleName = "member",
Scope = "account",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.selectel.IamGroupV1;
import com.pulumi.selectel.IamGroupV1Args;
import com.pulumi.selectel.inputs.IamGroupV1RoleArgs;
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 group1 = new IamGroupV1("group1", IamGroupV1Args.builder()
.description("My test group")
.roles(IamGroupV1RoleArgs.builder()
.roleName("member")
.scope("account")
.build())
.build());
}
}
resources:
group1:
type: selectel:IamGroupV1
properties:
description: My test group
roles:
- roleName: member
scope: account
Create IamGroupV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IamGroupV1(name: string, args?: IamGroupV1Args, opts?: CustomResourceOptions);
@overload
def IamGroupV1(resource_name: str,
args: Optional[IamGroupV1Args] = None,
opts: Optional[ResourceOptions] = None)
@overload
def IamGroupV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
iam_group_v1_id: Optional[str] = None,
name: Optional[str] = None,
roles: Optional[Sequence[IamGroupV1RoleArgs]] = None)
func NewIamGroupV1(ctx *Context, name string, args *IamGroupV1Args, opts ...ResourceOption) (*IamGroupV1, error)
public IamGroupV1(string name, IamGroupV1Args? args = null, CustomResourceOptions? opts = null)
public IamGroupV1(String name, IamGroupV1Args args)
public IamGroupV1(String name, IamGroupV1Args args, CustomResourceOptions options)
type: selectel:IamGroupV1
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 IamGroupV1Args
- 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 IamGroupV1Args
- 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 IamGroupV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamGroupV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamGroupV1Args
- 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 iamGroupV1Resource = new Selectel.IamGroupV1("iamGroupV1Resource", new()
{
Description = "string",
IamGroupV1Id = "string",
Name = "string",
Roles = new[]
{
new Selectel.Inputs.IamGroupV1RoleArgs
{
RoleName = "string",
Scope = "string",
ProjectId = "string",
},
},
});
example, err := selectel.NewIamGroupV1(ctx, "iamGroupV1Resource", &selectel.IamGroupV1Args{
Description: pulumi.String("string"),
IamGroupV1Id: pulumi.String("string"),
Name: pulumi.String("string"),
Roles: selectel.IamGroupV1RoleArray{
&selectel.IamGroupV1RoleArgs{
RoleName: pulumi.String("string"),
Scope: pulumi.String("string"),
ProjectId: pulumi.String("string"),
},
},
})
var iamGroupV1Resource = new IamGroupV1("iamGroupV1Resource", IamGroupV1Args.builder()
.description("string")
.iamGroupV1Id("string")
.name("string")
.roles(IamGroupV1RoleArgs.builder()
.roleName("string")
.scope("string")
.projectId("string")
.build())
.build());
iam_group_v1_resource = selectel.IamGroupV1("iamGroupV1Resource",
description="string",
iam_group_v1_id="string",
name="string",
roles=[{
"role_name": "string",
"scope": "string",
"project_id": "string",
}])
const iamGroupV1Resource = new selectel.IamGroupV1("iamGroupV1Resource", {
description: "string",
iamGroupV1Id: "string",
name: "string",
roles: [{
roleName: "string",
scope: "string",
projectId: "string",
}],
});
type: selectel:IamGroupV1
properties:
description: string
iamGroupV1Id: string
name: string
roles:
- projectId: string
roleName: string
scope: string
IamGroupV1 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 IamGroupV1 resource accepts the following input properties:
- Description string
- Group description.
- Iam
Group stringV1Id - Name string
- Group name.
- Roles
List<Iam
Group V1Role> - Manages group roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
- Description string
- Group description.
- Iam
Group stringV1Id - Name string
- Group name.
- Roles
[]Iam
Group V1Role Args - Manages group roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
- description String
- Group description.
- iam
Group StringV1Id - name String
- Group name.
- roles
List<Iam
Group V1Role> - Manages group roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
- description string
- Group description.
- iam
Group stringV1Id - name string
- Group name.
- roles
Iam
Group V1Role[] - Manages group roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
- description str
- Group description.
- iam_
group_ strv1_ id - name str
- Group name.
- roles
Sequence[Iam
Group V1Role Args] - Manages group roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
- description String
- Group description.
- iam
Group StringV1Id - name String
- Group name.
- roles List<Property Map>
- Manages group 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 IamGroupV1 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 IamGroupV1 Resource
Get an existing IamGroupV1 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?: IamGroupV1State, opts?: CustomResourceOptions): IamGroupV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
iam_group_v1_id: Optional[str] = None,
name: Optional[str] = None,
roles: Optional[Sequence[IamGroupV1RoleArgs]] = None) -> IamGroupV1
func GetIamGroupV1(ctx *Context, name string, id IDInput, state *IamGroupV1State, opts ...ResourceOption) (*IamGroupV1, error)
public static IamGroupV1 Get(string name, Input<string> id, IamGroupV1State? state, CustomResourceOptions? opts = null)
public static IamGroupV1 get(String name, Output<String> id, IamGroupV1State state, CustomResourceOptions options)
resources: _: type: selectel:IamGroupV1 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.
- Description string
- Group description.
- Iam
Group stringV1Id - Name string
- Group name.
- Roles
List<Iam
Group V1Role> - Manages group roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
- Description string
- Group description.
- Iam
Group stringV1Id - Name string
- Group name.
- Roles
[]Iam
Group V1Role Args - Manages group roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
- description String
- Group description.
- iam
Group StringV1Id - name String
- Group name.
- roles
List<Iam
Group V1Role> - Manages group roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
- description string
- Group description.
- iam
Group stringV1Id - name string
- Group name.
- roles
Iam
Group V1Role[] - Manages group roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
- description str
- Group description.
- iam_
group_ strv1_ id - name str
- Group name.
- roles
Sequence[Iam
Group V1Role Args] - Manages group roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
- description String
- Group description.
- iam
Group StringV1Id - name String
- Group name.
- roles List<Property Map>
- Manages group roles. You can add multiple roles – each role in a separate block. For more information about roles, see the Roles section.
Supporting Types
IamGroupV1Role, IamGroupV1RoleArgs
- Role
Name string - Role name. Available role names are
iam_admin
,member
,reader
, andbilling
. - Scope string
- Scope of the role. Available scopes are
account
andproject
. Ifscope
isproject
, theproject_id
argument is required. - Project
Id string - Unique identifier of the associated project. If
scope
isproject
, theproject_id
argument is required. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Role
Name string - Role name. Available role names are
iam_admin
,member
,reader
, andbilling
. - Scope string
- Scope of the role. Available scopes are
account
andproject
. Ifscope
isproject
, theproject_id
argument is required. - Project
Id string - Unique identifier of the associated project. If
scope
isproject
, theproject_id
argument is required. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- role
Name String - Role name. Available role names are
iam_admin
,member
,reader
, andbilling
. - scope String
- Scope of the role. Available scopes are
account
andproject
. Ifscope
isproject
, theproject_id
argument is required. - project
Id String - Unique identifier of the associated project. If
scope
isproject
, theproject_id
argument is required. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- role
Name string - Role name. Available role names are
iam_admin
,member
,reader
, andbilling
. - scope string
- Scope of the role. Available scopes are
account
andproject
. Ifscope
isproject
, theproject_id
argument is required. - project
Id string - Unique identifier of the associated project. If
scope
isproject
, theproject_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
, andbilling
. - scope str
- Scope of the role. Available scopes are
account
andproject
. Ifscope
isproject
, theproject_id
argument is required. - project_
id str - Unique identifier of the associated project. If
scope
isproject
, theproject_id
argument is required. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- role
Name String - Role name. Available role names are
iam_admin
,member
,reader
, andbilling
. - scope String
- Scope of the role. Available scopes are
account
andproject
. Ifscope
isproject
, theproject_id
argument is required. - project
Id String - Unique identifier of the associated project. If
scope
isproject
, theproject_id
argument is required. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
Import
You can import a group:
export OS_DOMAIN_NAME=<account_id>
export OS_USERNAME=
export OS_PASSWORD=
$ pulumi import selectel:index/iamGroupV1:IamGroupV1 group_1 <group_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 Management ⟶ User management ⟶ the Service users tab ⟶ copy the name of the required user. Learn more about Service Users.<password>
— Password of the service user.<group_id>
— Unique identifier of the group, for example,abc1bb378ac84e1234b869b77aadd2ab
. To get the group 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.