sysdig.GroupMapping
Explore with Pulumi AI
Example Usage
Regular users
import * as pulumi from "@pulumi/pulumi";
import * as sysdig from "@pulumi/sysdig";
const myGroup = new sysdig.GroupMapping("myGroup", {
groupName: "my-group",
role: "ROLE_TEAM_STANDARD",
systemRole: "ROLE_USER",
teamMap: {
allTeams: false,
teamIds: [
sysdig_secure_team.my_team.id,
sysdig_monitor_team.my_team.id,
],
},
weight: 10,
});
import pulumi
import pulumi_sysdig as sysdig
my_group = sysdig.GroupMapping("myGroup",
group_name="my-group",
role="ROLE_TEAM_STANDARD",
system_role="ROLE_USER",
team_map={
"all_teams": False,
"team_ids": [
sysdig_secure_team["my_team"]["id"],
sysdig_monitor_team["my_team"]["id"],
],
},
weight=10)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sysdig/sysdig"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sysdig.NewGroupMapping(ctx, "myGroup", &sysdig.GroupMappingArgs{
GroupName: pulumi.String("my-group"),
Role: pulumi.String("ROLE_TEAM_STANDARD"),
SystemRole: pulumi.String("ROLE_USER"),
TeamMap: &sysdig.GroupMappingTeamMapArgs{
AllTeams: pulumi.Bool(false),
TeamIds: pulumi.Float64Array{
sysdig_secure_team.My_team.Id,
sysdig_monitor_team.My_team.Id,
},
},
Weight: pulumi.Float64(10),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sysdig = Pulumi.Sysdig;
return await Deployment.RunAsync(() =>
{
var myGroup = new Sysdig.GroupMapping("myGroup", new()
{
GroupName = "my-group",
Role = "ROLE_TEAM_STANDARD",
SystemRole = "ROLE_USER",
TeamMap = new Sysdig.Inputs.GroupMappingTeamMapArgs
{
AllTeams = false,
TeamIds = new[]
{
sysdig_secure_team.My_team.Id,
sysdig_monitor_team.My_team.Id,
},
},
Weight = 10,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sysdig.GroupMapping;
import com.pulumi.sysdig.GroupMappingArgs;
import com.pulumi.sysdig.inputs.GroupMappingTeamMapArgs;
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 myGroup = new GroupMapping("myGroup", GroupMappingArgs.builder()
.groupName("my-group")
.role("ROLE_TEAM_STANDARD")
.systemRole("ROLE_USER")
.teamMap(GroupMappingTeamMapArgs.builder()
.allTeams(false)
.teamIds(
sysdig_secure_team.my_team().id(),
sysdig_monitor_team.my_team().id())
.build())
.weight(10)
.build());
}
}
resources:
myGroup:
type: sysdig:GroupMapping
properties:
groupName: my-group
role: ROLE_TEAM_STANDARD
systemRole: ROLE_USER
teamMap:
allTeams: false
teamIds:
- ${sysdig_secure_team.my_team.id}
- ${sysdig_monitor_team.my_team.id}
weight: 10
This way, we define a group mapping named “my-group” for a user who will have a standard role in two teams.
Admin users
If the group members should assume the Sysdig administrator role the mapping should be created this way
import * as pulumi from "@pulumi/pulumi";
import * as sysdig from "@pulumi/sysdig";
const admin = new sysdig.GroupMapping("admin", {
groupName: "admin",
role: "ROLE_TEAM_MANAGER",
systemRole: "ROLE_CUSTOMER",
teamMap: {
allTeams: true,
teamIds: [],
},
});
import pulumi
import pulumi_sysdig as sysdig
admin = sysdig.GroupMapping("admin",
group_name="admin",
role="ROLE_TEAM_MANAGER",
system_role="ROLE_CUSTOMER",
team_map={
"all_teams": True,
"team_ids": [],
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sysdig/sysdig"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sysdig.NewGroupMapping(ctx, "admin", &sysdig.GroupMappingArgs{
GroupName: pulumi.String("admin"),
Role: pulumi.String("ROLE_TEAM_MANAGER"),
SystemRole: pulumi.String("ROLE_CUSTOMER"),
TeamMap: &sysdig.GroupMappingTeamMapArgs{
AllTeams: pulumi.Bool(true),
TeamIds: pulumi.Float64Array{},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sysdig = Pulumi.Sysdig;
return await Deployment.RunAsync(() =>
{
var admin = new Sysdig.GroupMapping("admin", new()
{
GroupName = "admin",
Role = "ROLE_TEAM_MANAGER",
SystemRole = "ROLE_CUSTOMER",
TeamMap = new Sysdig.Inputs.GroupMappingTeamMapArgs
{
AllTeams = true,
TeamIds = new() { },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sysdig.GroupMapping;
import com.pulumi.sysdig.GroupMappingArgs;
import com.pulumi.sysdig.inputs.GroupMappingTeamMapArgs;
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 admin = new GroupMapping("admin", GroupMappingArgs.builder()
.groupName("admin")
.role("ROLE_TEAM_MANAGER")
.systemRole("ROLE_CUSTOMER")
.teamMap(GroupMappingTeamMapArgs.builder()
.allTeams(true)
.teamIds()
.build())
.build());
}
}
resources:
admin:
type: sysdig:GroupMapping
properties:
groupName: admin
role: ROLE_TEAM_MANAGER
systemRole: ROLE_CUSTOMER
teamMap:
allTeams: true
teamIds: []
The name doesn’t necessarily have to be “admin,” it’s just an example. The important aspects are the roles and the team_map
Create GroupMapping Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GroupMapping(name: string, args: GroupMappingArgs, opts?: CustomResourceOptions);
@overload
def GroupMapping(resource_name: str,
args: GroupMappingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GroupMapping(resource_name: str,
opts: Optional[ResourceOptions] = None,
group_name: Optional[str] = None,
role: Optional[str] = None,
team_map: Optional[GroupMappingTeamMapArgs] = None,
group_mapping_id: Optional[str] = None,
system_role: Optional[str] = None,
timeouts: Optional[GroupMappingTimeoutsArgs] = None,
weight: Optional[float] = None)
func NewGroupMapping(ctx *Context, name string, args GroupMappingArgs, opts ...ResourceOption) (*GroupMapping, error)
public GroupMapping(string name, GroupMappingArgs args, CustomResourceOptions? opts = null)
public GroupMapping(String name, GroupMappingArgs args)
public GroupMapping(String name, GroupMappingArgs args, CustomResourceOptions options)
type: sysdig:GroupMapping
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 GroupMappingArgs
- 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 GroupMappingArgs
- 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 GroupMappingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupMappingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GroupMappingArgs
- 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 groupMappingResource = new Sysdig.GroupMapping("groupMappingResource", new()
{
GroupName = "string",
Role = "string",
TeamMap = new Sysdig.Inputs.GroupMappingTeamMapArgs
{
AllTeams = false,
TeamIds = new[]
{
0,
},
},
GroupMappingId = "string",
SystemRole = "string",
Timeouts = new Sysdig.Inputs.GroupMappingTimeoutsArgs
{
Create = "string",
Delete = "string",
Read = "string",
Update = "string",
},
Weight = 0,
});
example, err := sysdig.NewGroupMapping(ctx, "groupMappingResource", &sysdig.GroupMappingArgs{
GroupName: pulumi.String("string"),
Role: pulumi.String("string"),
TeamMap: &sysdig.GroupMappingTeamMapArgs{
AllTeams: pulumi.Bool(false),
TeamIds: pulumi.Float64Array{
pulumi.Float64(0),
},
},
GroupMappingId: pulumi.String("string"),
SystemRole: pulumi.String("string"),
Timeouts: &sysdig.GroupMappingTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
Weight: pulumi.Float64(0),
})
var groupMappingResource = new GroupMapping("groupMappingResource", GroupMappingArgs.builder()
.groupName("string")
.role("string")
.teamMap(GroupMappingTeamMapArgs.builder()
.allTeams(false)
.teamIds(0)
.build())
.groupMappingId("string")
.systemRole("string")
.timeouts(GroupMappingTimeoutsArgs.builder()
.create("string")
.delete("string")
.read("string")
.update("string")
.build())
.weight(0)
.build());
group_mapping_resource = sysdig.GroupMapping("groupMappingResource",
group_name="string",
role="string",
team_map={
"all_teams": False,
"team_ids": [0],
},
group_mapping_id="string",
system_role="string",
timeouts={
"create": "string",
"delete": "string",
"read": "string",
"update": "string",
},
weight=0)
const groupMappingResource = new sysdig.GroupMapping("groupMappingResource", {
groupName: "string",
role: "string",
teamMap: {
allTeams: false,
teamIds: [0],
},
groupMappingId: "string",
systemRole: "string",
timeouts: {
create: "string",
"delete": "string",
read: "string",
update: "string",
},
weight: 0,
});
type: sysdig:GroupMapping
properties:
groupMappingId: string
groupName: string
role: string
systemRole: string
teamMap:
allTeams: false
teamIds:
- 0
timeouts:
create: string
delete: string
read: string
update: string
weight: 0
GroupMapping 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 GroupMapping resource accepts the following input properties:
- Group
Name string - The group name to be mapped.
- Role string
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- Team
Map GroupMapping Team Map - Block to define team mapping.
- Group
Mapping stringId - System
Role string - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- Timeouts
Group
Mapping Timeouts - Weight double
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
- Group
Name string - The group name to be mapped.
- Role string
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- Team
Map GroupMapping Team Map Args - Block to define team mapping.
- Group
Mapping stringId - System
Role string - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- Timeouts
Group
Mapping Timeouts Args - Weight float64
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
- group
Name String - The group name to be mapped.
- role String
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- team
Map GroupMapping Team Map - Block to define team mapping.
- group
Mapping StringId - system
Role String - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- timeouts
Group
Mapping Timeouts - weight Double
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
- group
Name string - The group name to be mapped.
- role string
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- team
Map GroupMapping Team Map - Block to define team mapping.
- group
Mapping stringId - system
Role string - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- timeouts
Group
Mapping Timeouts - weight number
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
- group_
name str - The group name to be mapped.
- role str
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- team_
map GroupMapping Team Map Args - Block to define team mapping.
- group_
mapping_ strid - system_
role str - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- timeouts
Group
Mapping Timeouts Args - weight float
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
- group
Name String - The group name to be mapped.
- role String
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- team
Map Property Map - Block to define team mapping.
- group
Mapping StringId - system
Role String - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- timeouts Property Map
- weight Number
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
Outputs
All input properties are implicitly available as output properties. Additionally, the GroupMapping 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 GroupMapping Resource
Get an existing GroupMapping 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?: GroupMappingState, opts?: CustomResourceOptions): GroupMapping
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
group_mapping_id: Optional[str] = None,
group_name: Optional[str] = None,
role: Optional[str] = None,
system_role: Optional[str] = None,
team_map: Optional[GroupMappingTeamMapArgs] = None,
timeouts: Optional[GroupMappingTimeoutsArgs] = None,
weight: Optional[float] = None) -> GroupMapping
func GetGroupMapping(ctx *Context, name string, id IDInput, state *GroupMappingState, opts ...ResourceOption) (*GroupMapping, error)
public static GroupMapping Get(string name, Input<string> id, GroupMappingState? state, CustomResourceOptions? opts = null)
public static GroupMapping get(String name, Output<String> id, GroupMappingState state, CustomResourceOptions options)
resources: _: type: sysdig:GroupMapping 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.
- Group
Mapping stringId - Group
Name string - The group name to be mapped.
- Role string
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- System
Role string - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- Team
Map GroupMapping Team Map - Block to define team mapping.
- Timeouts
Group
Mapping Timeouts - Weight double
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
- Group
Mapping stringId - Group
Name string - The group name to be mapped.
- Role string
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- System
Role string - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- Team
Map GroupMapping Team Map Args - Block to define team mapping.
- Timeouts
Group
Mapping Timeouts Args - Weight float64
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
- group
Mapping StringId - group
Name String - The group name to be mapped.
- role String
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- system
Role String - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- team
Map GroupMapping Team Map - Block to define team mapping.
- timeouts
Group
Mapping Timeouts - weight Double
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
- group
Mapping stringId - group
Name string - The group name to be mapped.
- role string
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- system
Role string - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- team
Map GroupMapping Team Map - Block to define team mapping.
- timeouts
Group
Mapping Timeouts - weight number
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
- group_
mapping_ strid - group_
name str - The group name to be mapped.
- role str
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- system_
role str - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- team_
map GroupMapping Team Map Args - Block to define team mapping.
- timeouts
Group
Mapping Timeouts Args - weight float
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
- group
Mapping StringId - group
Name String - The group name to be mapped.
- role String
- The role that is assigned to the users. It can be a standard role or a custom team role ID.
- system
Role String - The system role that is assigned to the users. The supported values are:
ROLE_USER
for regular users (Default if not specified)ROLE_CUSTOMER
for admin users
- team
Map Property Map - Block to define team mapping.
- timeouts Property Map
- weight Number
- The group mapping weight used to solve conflicts. Weight is a positive number, lower number has higher priority.
Supporting Types
GroupMappingTeamMap, GroupMappingTeamMapArgs
GroupMappingTimeouts, GroupMappingTimeoutsArgs
Import
Sysdig group mapping can be imported using the ID, e.g.
$ pulumi import sysdig:index/groupMapping:GroupMapping my_group 24267
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- sysdig sysdiglabs/terraform-provider-sysdig
- License
- Notes
- This Pulumi package is based on the
sysdig
Terraform Provider.