flexibleengine.IdentityRoleAssignmentV3
Explore with Pulumi AI
Manages a V3 Role assignment within group on FlexibleEngine IAM Service.
You must have admin privileges in your FlexibleEngine cloud to use this resource.
!> Warning: It has been deprecated, please use flexibleengine.IdentityGroupRoleAssignment
instead.
Example Usage
Assign Role On Project Level
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const project1 = flexibleengine.getIdentityProjectV3({
name: "eu-west-0_project_1",
});
const role1 = flexibleengine.getIdentityRoleV3({
name: "system_all_1",
});
const group1 = new flexibleengine.IdentityGroupV3("group1", {});
const roleAssignment1 = new flexibleengine.IdentityRoleAssignmentV3("roleAssignment1", {
groupId: group1.identityGroupV3Id,
projectId: project1.then(project1 => project1.id),
roleId: role1.then(role1 => role1.id),
});
import pulumi
import pulumi_flexibleengine as flexibleengine
project1 = flexibleengine.get_identity_project_v3(name="eu-west-0_project_1")
role1 = flexibleengine.get_identity_role_v3(name="system_all_1")
group1 = flexibleengine.IdentityGroupV3("group1")
role_assignment1 = flexibleengine.IdentityRoleAssignmentV3("roleAssignment1",
group_id=group1.identity_group_v3_id,
project_id=project1.id,
role_id=role1.id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project1, err := flexibleengine.LookupIdentityProjectV3(ctx, &flexibleengine.LookupIdentityProjectV3Args{
Name: pulumi.StringRef("eu-west-0_project_1"),
}, nil)
if err != nil {
return err
}
role1, err := flexibleengine.LookupIdentityRoleV3(ctx, &flexibleengine.LookupIdentityRoleV3Args{
Name: "system_all_1",
}, nil)
if err != nil {
return err
}
group1, err := flexibleengine.NewIdentityGroupV3(ctx, "group1", nil)
if err != nil {
return err
}
_, err = flexibleengine.NewIdentityRoleAssignmentV3(ctx, "roleAssignment1", &flexibleengine.IdentityRoleAssignmentV3Args{
GroupId: group1.IdentityGroupV3Id,
ProjectId: pulumi.String(project1.Id),
RoleId: pulumi.String(role1.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var project1 = Flexibleengine.GetIdentityProjectV3.Invoke(new()
{
Name = "eu-west-0_project_1",
});
var role1 = Flexibleengine.GetIdentityRoleV3.Invoke(new()
{
Name = "system_all_1",
});
var group1 = new Flexibleengine.IdentityGroupV3("group1");
var roleAssignment1 = new Flexibleengine.IdentityRoleAssignmentV3("roleAssignment1", new()
{
GroupId = group1.IdentityGroupV3Id,
ProjectId = project1.Apply(getIdentityProjectV3Result => getIdentityProjectV3Result.Id),
RoleId = role1.Apply(getIdentityRoleV3Result => getIdentityRoleV3Result.Id),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.FlexibleengineFunctions;
import com.pulumi.flexibleengine.inputs.GetIdentityProjectV3Args;
import com.pulumi.flexibleengine.inputs.GetIdentityRoleV3Args;
import com.pulumi.flexibleengine.IdentityGroupV3;
import com.pulumi.flexibleengine.IdentityRoleAssignmentV3;
import com.pulumi.flexibleengine.IdentityRoleAssignmentV3Args;
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) {
final var project1 = FlexibleengineFunctions.getIdentityProjectV3(GetIdentityProjectV3Args.builder()
.name("eu-west-0_project_1")
.build());
final var role1 = FlexibleengineFunctions.getIdentityRoleV3(GetIdentityRoleV3Args.builder()
.name("system_all_1")
.build());
var group1 = new IdentityGroupV3("group1");
var roleAssignment1 = new IdentityRoleAssignmentV3("roleAssignment1", IdentityRoleAssignmentV3Args.builder()
.groupId(group1.identityGroupV3Id())
.projectId(project1.applyValue(getIdentityProjectV3Result -> getIdentityProjectV3Result.id()))
.roleId(role1.applyValue(getIdentityRoleV3Result -> getIdentityRoleV3Result.id()))
.build());
}
}
resources:
group1:
type: flexibleengine:IdentityGroupV3
roleAssignment1:
type: flexibleengine:IdentityRoleAssignmentV3
properties:
groupId: ${group1.identityGroupV3Id}
projectId: ${project1.id}
roleId: ${role1.id}
variables:
project1:
fn::invoke:
function: flexibleengine:getIdentityProjectV3
arguments:
name: eu-west-0_project_1
role1:
fn::invoke:
function: flexibleengine:getIdentityRoleV3
arguments:
name: system_all_1
Assign Role On Domain Level
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const config = new pulumi.Config();
const domainId = config.get("domainId") || "01aafcf63744d988ebef2b1e04c5c34";
const group1 = new flexibleengine.IdentityGroupV3("group1", {});
const role1 = flexibleengine.getIdentityRoleV3({
name: "secu_admin",
});
const roleAssignment1 = new flexibleengine.IdentityRoleAssignmentV3("roleAssignment1", {
groupId: group1.identityGroupV3Id,
domainId: domainId,
roleId: role1.then(role1 => role1.id),
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
domain_id = config.get("domainId")
if domain_id is None:
domain_id = "01aafcf63744d988ebef2b1e04c5c34"
group1 = flexibleengine.IdentityGroupV3("group1")
role1 = flexibleengine.get_identity_role_v3(name="secu_admin")
role_assignment1 = flexibleengine.IdentityRoleAssignmentV3("roleAssignment1",
group_id=group1.identity_group_v3_id,
domain_id=domain_id,
role_id=role1.id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
domainId := "01aafcf63744d988ebef2b1e04c5c34"
if param := cfg.Get("domainId"); param != "" {
domainId = param
}
group1, err := flexibleengine.NewIdentityGroupV3(ctx, "group1", nil)
if err != nil {
return err
}
role1, err := flexibleengine.LookupIdentityRoleV3(ctx, &flexibleengine.LookupIdentityRoleV3Args{
Name: "secu_admin",
}, nil)
if err != nil {
return err
}
_, err = flexibleengine.NewIdentityRoleAssignmentV3(ctx, "roleAssignment1", &flexibleengine.IdentityRoleAssignmentV3Args{
GroupId: group1.IdentityGroupV3Id,
DomainId: pulumi.String(domainId),
RoleId: pulumi.String(role1.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var domainId = config.Get("domainId") ?? "01aafcf63744d988ebef2b1e04c5c34";
var group1 = new Flexibleengine.IdentityGroupV3("group1");
var role1 = Flexibleengine.GetIdentityRoleV3.Invoke(new()
{
Name = "secu_admin",
});
var roleAssignment1 = new Flexibleengine.IdentityRoleAssignmentV3("roleAssignment1", new()
{
GroupId = group1.IdentityGroupV3Id,
DomainId = domainId,
RoleId = role1.Apply(getIdentityRoleV3Result => getIdentityRoleV3Result.Id),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.IdentityGroupV3;
import com.pulumi.flexibleengine.FlexibleengineFunctions;
import com.pulumi.flexibleengine.inputs.GetIdentityRoleV3Args;
import com.pulumi.flexibleengine.IdentityRoleAssignmentV3;
import com.pulumi.flexibleengine.IdentityRoleAssignmentV3Args;
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) {
final var config = ctx.config();
final var domainId = config.get("domainId").orElse("01aafcf63744d988ebef2b1e04c5c34");
var group1 = new IdentityGroupV3("group1");
final var role1 = FlexibleengineFunctions.getIdentityRoleV3(GetIdentityRoleV3Args.builder()
.name("secu_admin")
.build());
var roleAssignment1 = new IdentityRoleAssignmentV3("roleAssignment1", IdentityRoleAssignmentV3Args.builder()
.groupId(group1.identityGroupV3Id())
.domainId(domainId)
.roleId(role1.applyValue(getIdentityRoleV3Result -> getIdentityRoleV3Result.id()))
.build());
}
}
configuration:
domainId:
type: string
default: 01aafcf63744d988ebef2b1e04c5c34
resources:
group1:
type: flexibleengine:IdentityGroupV3
roleAssignment1:
type: flexibleengine:IdentityRoleAssignmentV3
properties:
groupId: ${group1.identityGroupV3Id}
domainId: ${domainId}
roleId: ${role1.id}
variables:
role1:
fn::invoke:
function: flexibleengine:getIdentityRoleV3
arguments:
name: secu_admin
Create IdentityRoleAssignmentV3 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IdentityRoleAssignmentV3(name: string, args: IdentityRoleAssignmentV3Args, opts?: CustomResourceOptions);
@overload
def IdentityRoleAssignmentV3(resource_name: str,
args: IdentityRoleAssignmentV3Args,
opts: Optional[ResourceOptions] = None)
@overload
def IdentityRoleAssignmentV3(resource_name: str,
opts: Optional[ResourceOptions] = None,
group_id: Optional[str] = None,
role_id: Optional[str] = None,
domain_id: Optional[str] = None,
identity_role_assignment_v3_id: Optional[str] = None,
project_id: Optional[str] = None)
func NewIdentityRoleAssignmentV3(ctx *Context, name string, args IdentityRoleAssignmentV3Args, opts ...ResourceOption) (*IdentityRoleAssignmentV3, error)
public IdentityRoleAssignmentV3(string name, IdentityRoleAssignmentV3Args args, CustomResourceOptions? opts = null)
public IdentityRoleAssignmentV3(String name, IdentityRoleAssignmentV3Args args)
public IdentityRoleAssignmentV3(String name, IdentityRoleAssignmentV3Args args, CustomResourceOptions options)
type: flexibleengine:IdentityRoleAssignmentV3
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 IdentityRoleAssignmentV3Args
- 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 IdentityRoleAssignmentV3Args
- 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 IdentityRoleAssignmentV3Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IdentityRoleAssignmentV3Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IdentityRoleAssignmentV3Args
- 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 identityRoleAssignmentV3Resource = new Flexibleengine.IdentityRoleAssignmentV3("identityRoleAssignmentV3Resource", new()
{
GroupId = "string",
RoleId = "string",
DomainId = "string",
IdentityRoleAssignmentV3Id = "string",
ProjectId = "string",
});
example, err := flexibleengine.NewIdentityRoleAssignmentV3(ctx, "identityRoleAssignmentV3Resource", &flexibleengine.IdentityRoleAssignmentV3Args{
GroupId: pulumi.String("string"),
RoleId: pulumi.String("string"),
DomainId: pulumi.String("string"),
IdentityRoleAssignmentV3Id: pulumi.String("string"),
ProjectId: pulumi.String("string"),
})
var identityRoleAssignmentV3Resource = new IdentityRoleAssignmentV3("identityRoleAssignmentV3Resource", IdentityRoleAssignmentV3Args.builder()
.groupId("string")
.roleId("string")
.domainId("string")
.identityRoleAssignmentV3Id("string")
.projectId("string")
.build());
identity_role_assignment_v3_resource = flexibleengine.IdentityRoleAssignmentV3("identityRoleAssignmentV3Resource",
group_id="string",
role_id="string",
domain_id="string",
identity_role_assignment_v3_id="string",
project_id="string")
const identityRoleAssignmentV3Resource = new flexibleengine.IdentityRoleAssignmentV3("identityRoleAssignmentV3Resource", {
groupId: "string",
roleId: "string",
domainId: "string",
identityRoleAssignmentV3Id: "string",
projectId: "string",
});
type: flexibleengine:IdentityRoleAssignmentV3
properties:
domainId: string
groupId: string
identityRoleAssignmentV3Id: string
projectId: string
roleId: string
IdentityRoleAssignmentV3 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 IdentityRoleAssignmentV3 resource accepts the following input properties:
- Group
Id string - The group to assign the role in. Changing this will create a new resource.
- Role
Id string - The role to assign. Changing this will create a new resource.
- Domain
Id string - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - Identity
Role stringAssignment V3Id - Project
Id string - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource.
- Group
Id string - The group to assign the role in. Changing this will create a new resource.
- Role
Id string - The role to assign. Changing this will create a new resource.
- Domain
Id string - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - Identity
Role stringAssignment V3Id - Project
Id string - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource.
- group
Id String - The group to assign the role in. Changing this will create a new resource.
- role
Id String - The role to assign. Changing this will create a new resource.
- domain
Id String - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - identity
Role StringAssignment V3Id - project
Id String - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource.
- group
Id string - The group to assign the role in. Changing this will create a new resource.
- role
Id string - The role to assign. Changing this will create a new resource.
- domain
Id string - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - identity
Role stringAssignment V3Id - project
Id string - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource.
- group_
id str - The group to assign the role in. Changing this will create a new resource.
- role_
id str - The role to assign. Changing this will create a new resource.
- domain_
id str - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - identity_
role_ strassignment_ v3_ id - project_
id str - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource.
- group
Id String - The group to assign the role in. Changing this will create a new resource.
- role
Id String - The role to assign. Changing this will create a new resource.
- domain
Id String - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - identity
Role StringAssignment V3Id - project
Id String - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the IdentityRoleAssignmentV3 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 IdentityRoleAssignmentV3 Resource
Get an existing IdentityRoleAssignmentV3 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?: IdentityRoleAssignmentV3State, opts?: CustomResourceOptions): IdentityRoleAssignmentV3
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
domain_id: Optional[str] = None,
group_id: Optional[str] = None,
identity_role_assignment_v3_id: Optional[str] = None,
project_id: Optional[str] = None,
role_id: Optional[str] = None) -> IdentityRoleAssignmentV3
func GetIdentityRoleAssignmentV3(ctx *Context, name string, id IDInput, state *IdentityRoleAssignmentV3State, opts ...ResourceOption) (*IdentityRoleAssignmentV3, error)
public static IdentityRoleAssignmentV3 Get(string name, Input<string> id, IdentityRoleAssignmentV3State? state, CustomResourceOptions? opts = null)
public static IdentityRoleAssignmentV3 get(String name, Output<String> id, IdentityRoleAssignmentV3State state, CustomResourceOptions options)
resources: _: type: flexibleengine:IdentityRoleAssignmentV3 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.
- Domain
Id string - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - Group
Id string - The group to assign the role in. Changing this will create a new resource.
- Identity
Role stringAssignment V3Id - Project
Id string - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource. - Role
Id string - The role to assign. Changing this will create a new resource.
- Domain
Id string - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - Group
Id string - The group to assign the role in. Changing this will create a new resource.
- Identity
Role stringAssignment V3Id - Project
Id string - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource. - Role
Id string - The role to assign. Changing this will create a new resource.
- domain
Id String - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - group
Id String - The group to assign the role in. Changing this will create a new resource.
- identity
Role StringAssignment V3Id - project
Id String - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource. - role
Id String - The role to assign. Changing this will create a new resource.
- domain
Id string - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - group
Id string - The group to assign the role in. Changing this will create a new resource.
- identity
Role stringAssignment V3Id - project
Id string - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource. - role
Id string - The role to assign. Changing this will create a new resource.
- domain_
id str - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - group_
id str - The group to assign the role in. Changing this will create a new resource.
- identity_
role_ strassignment_ v3_ id - project_
id str - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource. - role_
id str - The role to assign. Changing this will create a new resource.
- domain
Id String - The domain to assign the role in.
It is Required if
project_id
is empty. Changing this will create a new resource. - group
Id String - The group to assign the role in. Changing this will create a new resource.
- identity
Role StringAssignment V3Id - project
Id String - The project to assign the role in.
It is Required if
domain_id
is empty. Changing this will create a new resource. - role
Id String - The role to assign. Changing this will create a new resource.
Import
IAM role assignment can be imported using the role assignment ID, e.g.
$ pulumi import flexibleengine:index/identityRoleAssignmentV3:IdentityRoleAssignmentV3 assignment_1 89c60255-9bd6-460c-822a-e2b959ede9d2
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.