1. Packages
  2. Confluent Provider
  3. API Docs
  4. RoleBinding
Confluent v2.23.0 published on Tuesday, Apr 1, 2025 by Pulumi

confluentcloud.RoleBinding

Explore with Pulumi AI

General Availability

confluentcloud.RoleBinding provides a Role Binding resource that enables creating, reading, and deleting role bindings on Confluent Cloud.

Note: For more information on the Role Bindings, see Predefined RBAC roles in Confluent Cloud.

Create RoleBinding Resource

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

Constructor syntax

new RoleBinding(name: string, args: RoleBindingArgs, opts?: CustomResourceOptions);
@overload
def RoleBinding(resource_name: str,
                args: RoleBindingArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def RoleBinding(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                crn_pattern: Optional[str] = None,
                principal: Optional[str] = None,
                role_name: Optional[str] = None)
func NewRoleBinding(ctx *Context, name string, args RoleBindingArgs, opts ...ResourceOption) (*RoleBinding, error)
public RoleBinding(string name, RoleBindingArgs args, CustomResourceOptions? opts = null)
public RoleBinding(String name, RoleBindingArgs args)
public RoleBinding(String name, RoleBindingArgs args, CustomResourceOptions options)
type: confluentcloud:RoleBinding
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RoleBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RoleBindingArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RoleBindingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RoleBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RoleBindingArgs
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 roleBindingResource = new ConfluentCloud.RoleBinding("roleBindingResource", new()
{
    CrnPattern = "string",
    Principal = "string",
    RoleName = "string",
});
Copy
example, err := confluentcloud.NewRoleBinding(ctx, "roleBindingResource", &confluentcloud.RoleBindingArgs{
	CrnPattern: pulumi.String("string"),
	Principal:  pulumi.String("string"),
	RoleName:   pulumi.String("string"),
})
Copy
var roleBindingResource = new RoleBinding("roleBindingResource", RoleBindingArgs.builder()
    .crnPattern("string")
    .principal("string")
    .roleName("string")
    .build());
Copy
role_binding_resource = confluentcloud.RoleBinding("roleBindingResource",
    crn_pattern="string",
    principal="string",
    role_name="string")
Copy
const roleBindingResource = new confluentcloud.RoleBinding("roleBindingResource", {
    crnPattern: "string",
    principal: "string",
    roleName: "string",
});
Copy
type: confluentcloud:RoleBinding
properties:
    crnPattern: string
    principal: string
    roleName: string
Copy

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

CrnPattern
This property is required.
Changes to this property will trigger replacement.
string
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
Principal
This property is required.
Changes to this property will trigger replacement.
string
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
RoleName
This property is required.
Changes to this property will trigger replacement.
string
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
CrnPattern
This property is required.
Changes to this property will trigger replacement.
string
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
Principal
This property is required.
Changes to this property will trigger replacement.
string
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
RoleName
This property is required.
Changes to this property will trigger replacement.
string
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crnPattern
This property is required.
Changes to this property will trigger replacement.
String
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
principal
This property is required.
Changes to this property will trigger replacement.
String
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
roleName
This property is required.
Changes to this property will trigger replacement.
String
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crnPattern
This property is required.
Changes to this property will trigger replacement.
string
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
principal
This property is required.
Changes to this property will trigger replacement.
string
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
roleName
This property is required.
Changes to this property will trigger replacement.
string
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crn_pattern
This property is required.
Changes to this property will trigger replacement.
str
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
principal
This property is required.
Changes to this property will trigger replacement.
str
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
role_name
This property is required.
Changes to this property will trigger replacement.
str
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crnPattern
This property is required.
Changes to this property will trigger replacement.
String
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
principal
This property is required.
Changes to this property will trigger replacement.
String
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
roleName
This property is required.
Changes to this property will trigger replacement.
String
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.

Outputs

All input properties are implicitly available as output properties. Additionally, the RoleBinding 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 RoleBinding Resource

Get an existing RoleBinding 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?: RoleBindingState, opts?: CustomResourceOptions): RoleBinding
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        crn_pattern: Optional[str] = None,
        principal: Optional[str] = None,
        role_name: Optional[str] = None) -> RoleBinding
func GetRoleBinding(ctx *Context, name string, id IDInput, state *RoleBindingState, opts ...ResourceOption) (*RoleBinding, error)
public static RoleBinding Get(string name, Input<string> id, RoleBindingState? state, CustomResourceOptions? opts = null)
public static RoleBinding get(String name, Output<String> id, RoleBindingState state, CustomResourceOptions options)
resources:  _:    type: confluentcloud:RoleBinding    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CrnPattern Changes to this property will trigger replacement. string
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
Principal Changes to this property will trigger replacement. string
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
RoleName Changes to this property will trigger replacement. string
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
CrnPattern Changes to this property will trigger replacement. string
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
Principal Changes to this property will trigger replacement. string
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
RoleName Changes to this property will trigger replacement. string
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crnPattern Changes to this property will trigger replacement. String
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
principal Changes to this property will trigger replacement. String
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
roleName Changes to this property will trigger replacement. String
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crnPattern Changes to this property will trigger replacement. string
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
principal Changes to this property will trigger replacement. string
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
roleName Changes to this property will trigger replacement. string
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crn_pattern Changes to this property will trigger replacement. str
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
principal Changes to this property will trigger replacement. str
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
role_name Changes to this property will trigger replacement. str
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crnPattern Changes to this property will trigger replacement. String
A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
principal Changes to this property will trigger replacement. String
A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
roleName Changes to this property will trigger replacement. String
A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.

Import

You can import a Role Binding by using Role Binding ID, for example:

$ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"

$ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"

$ pulumi import confluentcloud:index/roleBinding:RoleBinding my_rb rb-f3a90de
Copy

!> Warning: Do not forget to delete terminal command history afterwards for security purposes.

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Confluent Cloud pulumi/pulumi-confluentcloud
License
Apache-2.0
Notes
This Pulumi package is based on the confluent Terraform Provider.