ScopeRbacRoleBinding

class ScopeRbacRoleBinding : KotlinCustomResource

RBACRoleBinding represents a rbacrolebinding across the Fleet. To get more information about ScopeRBACRoleBinding, see:

Example Usage

Gkehub Scope Rbac Role Binding Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const scope = new gcp.gkehub.Scope("scope", {scopeId: "tf-test-scope_2067"});
const scopeRbacRoleBinding = new gcp.gkehub.ScopeRbacRoleBinding("scope_rbac_role_binding", {
scopeRbacRoleBindingId: "tf-test-scope-rbac-role-binding_40785",
scopeId: scope.scopeId,
user: "test-email@gmail.com",
role: {
predefinedRole: "ADMIN",
},
labels: {
key: "value",
},
}, {
dependsOn: [scope],
});
import pulumi
import pulumi_gcp as gcp
scope = gcp.gkehub.Scope("scope", scope_id="tf-test-scope_2067")
scope_rbac_role_binding = gcp.gkehub.ScopeRbacRoleBinding("scope_rbac_role_binding",
scope_rbac_role_binding_id="tf-test-scope-rbac-role-binding_40785",
scope_id=scope.scope_id,
user="test-email@gmail.com",
role={
"predefined_role": "ADMIN",
},
labels={
"key": "value",
},
opts = pulumi.ResourceOptions(depends_on=[scope]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var scope = new Gcp.GkeHub.Scope("scope", new()
{
ScopeId = "tf-test-scope_2067",
});
var scopeRbacRoleBinding = new Gcp.GkeHub.ScopeRbacRoleBinding("scope_rbac_role_binding", new()
{
ScopeRbacRoleBindingId = "tf-test-scope-rbac-role-binding_40785",
ScopeId = scope.ScopeId,
User = "test-email@gmail.com",
Role = new Gcp.GkeHub.Inputs.ScopeRbacRoleBindingRoleArgs
{
PredefinedRole = "ADMIN",
},
Labels =
{
{ "key", "value" },
},
}, new CustomResourceOptions
{
DependsOn =
{
scope,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/gkehub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
scope, err := gkehub.NewScope(ctx, "scope", &gkehub.ScopeArgs{
ScopeId: pulumi.String("tf-test-scope_2067"),
})
if err != nil {
return err
}
_, err = gkehub.NewScopeRbacRoleBinding(ctx, "scope_rbac_role_binding", &gkehub.ScopeRbacRoleBindingArgs{
ScopeRbacRoleBindingId: pulumi.String("tf-test-scope-rbac-role-binding_40785"),
ScopeId: scope.ScopeId,
User: pulumi.String("test-email@gmail.com"),
Role: &gkehub.ScopeRbacRoleBindingRoleArgs{
PredefinedRole: pulumi.String("ADMIN"),
},
Labels: pulumi.StringMap{
"key": pulumi.String("value"),
},
}, pulumi.DependsOn([]pulumi.Resource{
scope,
}))
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.gkehub.Scope;
import com.pulumi.gcp.gkehub.ScopeArgs;
import com.pulumi.gcp.gkehub.ScopeRbacRoleBinding;
import com.pulumi.gcp.gkehub.ScopeRbacRoleBindingArgs;
import com.pulumi.gcp.gkehub.inputs.ScopeRbacRoleBindingRoleArgs;
import com.pulumi.resources.CustomResourceOptions;
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 scope = new Scope("scope", ScopeArgs.builder()
.scopeId("tf-test-scope_2067")
.build());
var scopeRbacRoleBinding = new ScopeRbacRoleBinding("scopeRbacRoleBinding", ScopeRbacRoleBindingArgs.builder()
.scopeRbacRoleBindingId("tf-test-scope-rbac-role-binding_40785")
.scopeId(scope.scopeId())
.user("test-email@gmail.com")
.role(ScopeRbacRoleBindingRoleArgs.builder()
.predefinedRole("ADMIN")
.build())
.labels(Map.of("key", "value"))
.build(), CustomResourceOptions.builder()
.dependsOn(scope)
.build());
}
}
resources:
scope:
type: gcp:gkehub:Scope
properties:
scopeId: tf-test-scope_2067
scopeRbacRoleBinding:
type: gcp:gkehub:ScopeRbacRoleBinding
name: scope_rbac_role_binding
properties:
scopeRbacRoleBindingId: tf-test-scope-rbac-role-binding_40785
scopeId: ${scope.scopeId}
user: test-email@gmail.com
role:
predefinedRole: ADMIN
labels:
key: value
options:
dependsOn:
- ${scope}

Import

ScopeRBACRoleBinding can be imported using any of these accepted formats:

  • projects/{{project}}/locations/global/scopes/{{scope_id}}/rbacrolebindings/{{scope_rbac_role_binding_id}}

  • {{project}}/{{scope_id}}/{{scope_rbac_role_binding_id}}

  • {{scope_id}}/{{scope_rbac_role_binding_id}} When using the pulumi import command, ScopeRBACRoleBinding can be imported using one of the formats above. For example:

$ pulumi import gcp:gkehub/scopeRbacRoleBinding:ScopeRbacRoleBinding default projects/{{project}}/locations/global/scopes/{{scope_id}}/rbacrolebindings/{{scope_rbac_role_binding_id}}
$ pulumi import gcp:gkehub/scopeRbacRoleBinding:ScopeRbacRoleBinding default {{project}}/{{scope_id}}/{{scope_rbac_role_binding_id}}
$ pulumi import gcp:gkehub/scopeRbacRoleBinding:ScopeRbacRoleBinding default {{scope_id}}/{{scope_rbac_role_binding_id}}

Properties

Link copied to clipboard
val createTime: Output<String>

Time the RBAC Role Binding was created in UTC.

Link copied to clipboard
val deleteTime: Output<String>

Time the RBAC Role Binding was deleted in UTC.

Link copied to clipboard

All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.

Link copied to clipboard
val group: Output<String>?

Principal that is be authorized in the cluster (at least of one the oneof is required). Updating one will unset the other automatically. group is the group, as seen by the kubernetes cluster.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<Map<String, String>>?

Labels for this ScopeRBACRoleBinding. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.

Link copied to clipboard
val name: Output<String>

The resource name for the RBAC Role Binding

Link copied to clipboard
val project: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
val pulumiLabels: Output<Map<String, String>>

The combination of labels configured directly on the resource and default labels configured on the provider.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Role to bind to the principal. Structure is documented below.

Link copied to clipboard
val scopeId: Output<String>

Id of the scope

Link copied to clipboard

The client-provided identifier of the RBAC Role Binding.

Link copied to clipboard

State of the RBAC Role Binding resource. Structure is documented below.

Link copied to clipboard
val uid: Output<String>

Google-generated UUID for this resource.

Link copied to clipboard
val updateTime: Output<String>

Time the RBAC Role Binding was updated in UTC.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val user: Output<String>?

Principal that is be authorized in the cluster (at least of one the oneof is required). Updating one will unset the other automatically. user is the name of the user as seen by the kubernetes cluster, example "alice" or "alice@domain.tld"