cyral.RoleSsoGroups
Explore with Pulumi AI
Manages mapping SSO groups to specific roles on Cyral control plane. See also: Role.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cyral from "@pulumi/cyral";
//## Role with Single SSO Group
const someIdpOktaIntegrationIdpOkta = new cyral.IntegrationIdpOkta("someIdpOktaIntegrationIdpOkta", {samlp: {
config: {
singleSignOnServiceUrl: "https://some-sso-url.com",
},
}});
const someRoleRole = new cyral.Role("someRoleRole", {});
const someRoleSsoGroupsRoleSsoGroups = new cyral.RoleSsoGroups("someRoleSsoGroupsRoleSsoGroups", {
roleId: someRoleRole.id,
ssoGroups: [{
groupName: "Everyone",
idpId: someIdpOktaIntegrationIdpOkta.id,
}],
});
//## Role with Multiple SSO Groups
const someIdpOktaIndex_integrationIdpOktaIntegrationIdpOkta = new cyral.IntegrationIdpOkta("someIdpOktaIndex/integrationIdpOktaIntegrationIdpOkta", {samlp: {
config: {
singleSignOnServiceUrl: "https://some-sso-url.com",
},
}});
const someRoleIndex_roleRole = new cyral.Role("someRoleIndex/roleRole", {});
const someRoleSsoGroupsIndex_roleSsoGroupsRoleSsoGroups = new cyral.RoleSsoGroups("someRoleSsoGroupsIndex/roleSsoGroupsRoleSsoGroups", {
roleId: someRoleRole.id,
ssoGroups: [
{
groupName: "Admin",
idpId: someIdpOktaIntegrationIdpOkta.id,
},
{
groupName: "Dev",
idpId: someIdpOktaIntegrationIdpOkta.id,
},
],
});
import pulumi
import pulumi_cyral as cyral
### Role with Single SSO Group
some_idp_okta_integration_idp_okta = cyral.IntegrationIdpOkta("someIdpOktaIntegrationIdpOkta", samlp={
"config": {
"single_sign_on_service_url": "https://some-sso-url.com",
},
})
some_role_role = cyral.Role("someRoleRole")
some_role_sso_groups_role_sso_groups = cyral.RoleSsoGroups("someRoleSsoGroupsRoleSsoGroups",
role_id=some_role_role.id,
sso_groups=[{
"group_name": "Everyone",
"idp_id": some_idp_okta_integration_idp_okta.id,
}])
### Role with Multiple SSO Groups
some_idp_okta_index_integration_idp_okta_integration_idp_okta = cyral.IntegrationIdpOkta("someIdpOktaIndex/integrationIdpOktaIntegrationIdpOkta", samlp={
"config": {
"single_sign_on_service_url": "https://some-sso-url.com",
},
})
some_role_index_role_role = cyral.Role("someRoleIndex/roleRole")
some_role_sso_groups_index_role_sso_groups_role_sso_groups = cyral.RoleSsoGroups("someRoleSsoGroupsIndex/roleSsoGroupsRoleSsoGroups",
role_id=some_role_role.id,
sso_groups=[
{
"group_name": "Admin",
"idp_id": some_idp_okta_integration_idp_okta.id,
},
{
"group_name": "Dev",
"idp_id": some_idp_okta_integration_idp_okta.id,
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/cyral/v4/cyral"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// ## Role with Single SSO Group
someIdpOktaIntegrationIdpOkta, err := cyral.NewIntegrationIdpOkta(ctx, "someIdpOktaIntegrationIdpOkta", &cyral.IntegrationIdpOktaArgs{
Samlp: &cyral.IntegrationIdpOktaSamlpArgs{
Config: &cyral.IntegrationIdpOktaSamlpConfigArgs{
SingleSignOnServiceUrl: pulumi.String("https://some-sso-url.com"),
},
},
})
if err != nil {
return err
}
someRoleRole, err := cyral.NewRole(ctx, "someRoleRole", nil)
if err != nil {
return err
}
_, err = cyral.NewRoleSsoGroups(ctx, "someRoleSsoGroupsRoleSsoGroups", &cyral.RoleSsoGroupsArgs{
RoleId: someRoleRole.ID(),
SsoGroups: cyral.RoleSsoGroupsSsoGroupArray{
&cyral.RoleSsoGroupsSsoGroupArgs{
GroupName: pulumi.String("Everyone"),
IdpId: someIdpOktaIntegrationIdpOkta.ID(),
},
},
})
if err != nil {
return err
}
// ## Role with Multiple SSO Groups
_, err = cyral.NewIntegrationIdpOkta(ctx, "someIdpOktaIndex/integrationIdpOktaIntegrationIdpOkta", &cyral.IntegrationIdpOktaArgs{
Samlp: &cyral.IntegrationIdpOktaSamlpArgs{
Config: &cyral.IntegrationIdpOktaSamlpConfigArgs{
SingleSignOnServiceUrl: pulumi.String("https://some-sso-url.com"),
},
},
})
if err != nil {
return err
}
_, err = cyral.NewRole(ctx, "someRoleIndex/roleRole", nil)
if err != nil {
return err
}
_, err = cyral.NewRoleSsoGroups(ctx, "someRoleSsoGroupsIndex/roleSsoGroupsRoleSsoGroups", &cyral.RoleSsoGroupsArgs{
RoleId: someRoleRole.ID(),
SsoGroups: cyral.RoleSsoGroupsSsoGroupArray{
&cyral.RoleSsoGroupsSsoGroupArgs{
GroupName: pulumi.String("Admin"),
IdpId: someIdpOktaIntegrationIdpOkta.ID(),
},
&cyral.RoleSsoGroupsSsoGroupArgs{
GroupName: pulumi.String("Dev"),
IdpId: someIdpOktaIntegrationIdpOkta.ID(),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cyral = Pulumi.Cyral;
return await Deployment.RunAsync(() =>
{
//## Role with Single SSO Group
var someIdpOktaIntegrationIdpOkta = new Cyral.IntegrationIdpOkta("someIdpOktaIntegrationIdpOkta", new()
{
Samlp = new Cyral.Inputs.IntegrationIdpOktaSamlpArgs
{
Config = new Cyral.Inputs.IntegrationIdpOktaSamlpConfigArgs
{
SingleSignOnServiceUrl = "https://some-sso-url.com",
},
},
});
var someRoleRole = new Cyral.Role("someRoleRole");
var someRoleSsoGroupsRoleSsoGroups = new Cyral.RoleSsoGroups("someRoleSsoGroupsRoleSsoGroups", new()
{
RoleId = someRoleRole.Id,
SsoGroups = new[]
{
new Cyral.Inputs.RoleSsoGroupsSsoGroupArgs
{
GroupName = "Everyone",
IdpId = someIdpOktaIntegrationIdpOkta.Id,
},
},
});
//## Role with Multiple SSO Groups
var someIdpOktaIndex_integrationIdpOktaIntegrationIdpOkta = new Cyral.IntegrationIdpOkta("someIdpOktaIndex/integrationIdpOktaIntegrationIdpOkta", new()
{
Samlp = new Cyral.Inputs.IntegrationIdpOktaSamlpArgs
{
Config = new Cyral.Inputs.IntegrationIdpOktaSamlpConfigArgs
{
SingleSignOnServiceUrl = "https://some-sso-url.com",
},
},
});
var someRoleIndex_roleRole = new Cyral.Role("someRoleIndex/roleRole");
var someRoleSsoGroupsIndex_roleSsoGroupsRoleSsoGroups = new Cyral.RoleSsoGroups("someRoleSsoGroupsIndex/roleSsoGroupsRoleSsoGroups", new()
{
RoleId = someRoleRole.Id,
SsoGroups = new[]
{
new Cyral.Inputs.RoleSsoGroupsSsoGroupArgs
{
GroupName = "Admin",
IdpId = someIdpOktaIntegrationIdpOkta.Id,
},
new Cyral.Inputs.RoleSsoGroupsSsoGroupArgs
{
GroupName = "Dev",
IdpId = someIdpOktaIntegrationIdpOkta.Id,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cyral.IntegrationIdpOkta;
import com.pulumi.cyral.IntegrationIdpOktaArgs;
import com.pulumi.cyral.inputs.IntegrationIdpOktaSamlpArgs;
import com.pulumi.cyral.inputs.IntegrationIdpOktaSamlpConfigArgs;
import com.pulumi.cyral.Role;
import com.pulumi.cyral.RoleSsoGroups;
import com.pulumi.cyral.RoleSsoGroupsArgs;
import com.pulumi.cyral.inputs.RoleSsoGroupsSsoGroupArgs;
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) {
//## Role with Single SSO Group
var someIdpOktaIntegrationIdpOkta = new IntegrationIdpOkta("someIdpOktaIntegrationIdpOkta", IntegrationIdpOktaArgs.builder()
.samlp(IntegrationIdpOktaSamlpArgs.builder()
.config(IntegrationIdpOktaSamlpConfigArgs.builder()
.singleSignOnServiceUrl("https://some-sso-url.com")
.build())
.build())
.build());
var someRoleRole = new Role("someRoleRole");
var someRoleSsoGroupsRoleSsoGroups = new RoleSsoGroups("someRoleSsoGroupsRoleSsoGroups", RoleSsoGroupsArgs.builder()
.roleId(someRoleRole.id())
.ssoGroups(RoleSsoGroupsSsoGroupArgs.builder()
.groupName("Everyone")
.idpId(someIdpOktaIntegrationIdpOkta.id())
.build())
.build());
//## Role with Multiple SSO Groups
var someIdpOktaIndex_integrationIdpOktaIntegrationIdpOkta = new IntegrationIdpOkta("someIdpOktaIndex/integrationIdpOktaIntegrationIdpOkta", IntegrationIdpOktaArgs.builder()
.samlp(IntegrationIdpOktaSamlpArgs.builder()
.config(IntegrationIdpOktaSamlpConfigArgs.builder()
.singleSignOnServiceUrl("https://some-sso-url.com")
.build())
.build())
.build());
var someRoleIndex_roleRole = new Role("someRoleIndex/roleRole");
var someRoleSsoGroupsIndex_roleSsoGroupsRoleSsoGroups = new RoleSsoGroups("someRoleSsoGroupsIndex/roleSsoGroupsRoleSsoGroups", RoleSsoGroupsArgs.builder()
.roleId(someRoleRole.id())
.ssoGroups(
RoleSsoGroupsSsoGroupArgs.builder()
.groupName("Admin")
.idpId(someIdpOktaIntegrationIdpOkta.id())
.build(),
RoleSsoGroupsSsoGroupArgs.builder()
.groupName("Dev")
.idpId(someIdpOktaIntegrationIdpOkta.id())
.build())
.build());
}
}
resources:
### Role with Single SSO Group
someIdpOktaIntegrationIdpOkta:
type: cyral:IntegrationIdpOkta
properties:
samlp:
config:
singleSignOnServiceUrl: https://some-sso-url.com
someRoleRole:
type: cyral:Role
someRoleSsoGroupsRoleSsoGroups:
type: cyral:RoleSsoGroups
properties:
roleId: ${someRoleRole.id}
ssoGroups:
- groupName: Everyone
idpId: ${someIdpOktaIntegrationIdpOkta.id}
### Role with Multiple SSO Groups
someIdpOktaIndex/integrationIdpOktaIntegrationIdpOkta:
type: cyral:IntegrationIdpOkta
properties:
samlp:
config:
singleSignOnServiceUrl: https://some-sso-url.com
someRoleIndex/roleRole:
type: cyral:Role
someRoleSsoGroupsIndex/roleSsoGroupsRoleSsoGroups:
type: cyral:RoleSsoGroups
properties:
roleId: ${someRoleRole.id}
ssoGroups:
- groupName: Admin
idpId: ${someIdpOktaIntegrationIdpOkta.id}
- groupName: Dev
idpId: ${someIdpOktaIntegrationIdpOkta.id}
Create RoleSsoGroups Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RoleSsoGroups(name: string, args: RoleSsoGroupsArgs, opts?: CustomResourceOptions);
@overload
def RoleSsoGroups(resource_name: str,
args: RoleSsoGroupsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RoleSsoGroups(resource_name: str,
opts: Optional[ResourceOptions] = None,
role_id: Optional[str] = None,
sso_groups: Optional[Sequence[RoleSsoGroupsSsoGroupArgs]] = None,
role_sso_groups_id: Optional[str] = None)
func NewRoleSsoGroups(ctx *Context, name string, args RoleSsoGroupsArgs, opts ...ResourceOption) (*RoleSsoGroups, error)
public RoleSsoGroups(string name, RoleSsoGroupsArgs args, CustomResourceOptions? opts = null)
public RoleSsoGroups(String name, RoleSsoGroupsArgs args)
public RoleSsoGroups(String name, RoleSsoGroupsArgs args, CustomResourceOptions options)
type: cyral:RoleSsoGroups
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 RoleSsoGroupsArgs
- 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 RoleSsoGroupsArgs
- 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 RoleSsoGroupsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoleSsoGroupsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RoleSsoGroupsArgs
- 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 roleSsoGroupsResource = new Cyral.RoleSsoGroups("roleSsoGroupsResource", new()
{
RoleId = "string",
SsoGroups = new[]
{
new Cyral.Inputs.RoleSsoGroupsSsoGroupArgs
{
GroupName = "string",
IdpId = "string",
Id = "string",
IdpName = "string",
},
},
RoleSsoGroupsId = "string",
});
example, err := cyral.NewRoleSsoGroups(ctx, "roleSsoGroupsResource", &cyral.RoleSsoGroupsArgs{
RoleId: pulumi.String("string"),
SsoGroups: cyral.RoleSsoGroupsSsoGroupArray{
&cyral.RoleSsoGroupsSsoGroupArgs{
GroupName: pulumi.String("string"),
IdpId: pulumi.String("string"),
Id: pulumi.String("string"),
IdpName: pulumi.String("string"),
},
},
RoleSsoGroupsId: pulumi.String("string"),
})
var roleSsoGroupsResource = new RoleSsoGroups("roleSsoGroupsResource", RoleSsoGroupsArgs.builder()
.roleId("string")
.ssoGroups(RoleSsoGroupsSsoGroupArgs.builder()
.groupName("string")
.idpId("string")
.id("string")
.idpName("string")
.build())
.roleSsoGroupsId("string")
.build());
role_sso_groups_resource = cyral.RoleSsoGroups("roleSsoGroupsResource",
role_id="string",
sso_groups=[{
"group_name": "string",
"idp_id": "string",
"id": "string",
"idp_name": "string",
}],
role_sso_groups_id="string")
const roleSsoGroupsResource = new cyral.RoleSsoGroups("roleSsoGroupsResource", {
roleId: "string",
ssoGroups: [{
groupName: "string",
idpId: "string",
id: "string",
idpName: "string",
}],
roleSsoGroupsId: "string",
});
type: cyral:RoleSsoGroups
properties:
roleId: string
roleSsoGroupsId: string
ssoGroups:
- groupName: string
id: string
idpId: string
idpName: string
RoleSsoGroups 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 RoleSsoGroups resource accepts the following input properties:
- Role
Id string - The ID of the role resource that will be configured.
- Sso
Groups List<RoleSso Groups Sso Group> - A block responsible for mapping an SSO group to a role.
- Role
Sso stringGroups Id - The ID of this resource.
- Role
Id string - The ID of the role resource that will be configured.
- Sso
Groups []RoleSso Groups Sso Group Args - A block responsible for mapping an SSO group to a role.
- Role
Sso stringGroups Id - The ID of this resource.
- role
Id String - The ID of the role resource that will be configured.
- sso
Groups List<RoleSso Groups Sso Group> - A block responsible for mapping an SSO group to a role.
- role
Sso StringGroups Id - The ID of this resource.
- role
Id string - The ID of the role resource that will be configured.
- sso
Groups RoleSso Groups Sso Group[] - A block responsible for mapping an SSO group to a role.
- role
Sso stringGroups Id - The ID of this resource.
- role_
id str - The ID of the role resource that will be configured.
- sso_
groups Sequence[RoleSso Groups Sso Group Args] - A block responsible for mapping an SSO group to a role.
- role_
sso_ strgroups_ id - The ID of this resource.
- role
Id String - The ID of the role resource that will be configured.
- sso
Groups List<Property Map> - A block responsible for mapping an SSO group to a role.
- role
Sso StringGroups Id - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the RoleSsoGroups 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 RoleSsoGroups Resource
Get an existing RoleSsoGroups 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?: RoleSsoGroupsState, opts?: CustomResourceOptions): RoleSsoGroups
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
role_id: Optional[str] = None,
role_sso_groups_id: Optional[str] = None,
sso_groups: Optional[Sequence[RoleSsoGroupsSsoGroupArgs]] = None) -> RoleSsoGroups
func GetRoleSsoGroups(ctx *Context, name string, id IDInput, state *RoleSsoGroupsState, opts ...ResourceOption) (*RoleSsoGroups, error)
public static RoleSsoGroups Get(string name, Input<string> id, RoleSsoGroupsState? state, CustomResourceOptions? opts = null)
public static RoleSsoGroups get(String name, Output<String> id, RoleSsoGroupsState state, CustomResourceOptions options)
resources: _: type: cyral:RoleSsoGroups 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.
- Role
Id string - The ID of the role resource that will be configured.
- Role
Sso stringGroups Id - The ID of this resource.
- Sso
Groups List<RoleSso Groups Sso Group> - A block responsible for mapping an SSO group to a role.
- Role
Id string - The ID of the role resource that will be configured.
- Role
Sso stringGroups Id - The ID of this resource.
- Sso
Groups []RoleSso Groups Sso Group Args - A block responsible for mapping an SSO group to a role.
- role
Id String - The ID of the role resource that will be configured.
- role
Sso StringGroups Id - The ID of this resource.
- sso
Groups List<RoleSso Groups Sso Group> - A block responsible for mapping an SSO group to a role.
- role
Id string - The ID of the role resource that will be configured.
- role
Sso stringGroups Id - The ID of this resource.
- sso
Groups RoleSso Groups Sso Group[] - A block responsible for mapping an SSO group to a role.
- role_
id str - The ID of the role resource that will be configured.
- role_
sso_ strgroups_ id - The ID of this resource.
- sso_
groups Sequence[RoleSso Groups Sso Group Args] - A block responsible for mapping an SSO group to a role.
- role
Id String - The ID of the role resource that will be configured.
- role
Sso StringGroups Id - The ID of this resource.
- sso
Groups List<Property Map> - A block responsible for mapping an SSO group to a role.
Supporting Types
RoleSsoGroupsSsoGroup, RoleSsoGroupsSsoGroupArgs
- group_
name str - The name of the SSO group to be mapped.
- idp_
id str - The ID of the identity provider integration to be mapped.
- id str
- The ID of an SSO group mapping.
- idp_
name str - The name of the identity provider integration of an SSO group mapping.
Package Details
- Repository
- cyral cyralinc/terraform-provider-cyral
- License
- Notes
- This Pulumi package is based on the
cyral
Terraform Provider.