@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
229 lines (228 loc) • 8.27 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* ## Example Usage
*
* ### Gkehub Membership Rbac Role Binding Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const primary = new gcp.container.Cluster("primary", {
* name: "basic-cluster",
* location: "us-central1-a",
* initialNodeCount: 1,
* deletionProtection: true,
* network: "default",
* subnetwork: "default",
* });
* const membership = new gcp.gkehub.Membership("membership", {
* membershipId: "tf-test-membership_34535",
* endpoint: {
* gkeCluster: {
* resourceLink: pulumi.interpolate`//container.googleapis.com/${primary.id}`,
* },
* },
* }, {
* dependsOn: [primary],
* });
* const project = gcp.organizations.getProject({});
* const membershipRbacRoleBinding = new gcp.gkehub.MembershipRbacRoleBinding("membership_rbac_role_binding", {
* membershipRbacRoleBindingId: "tf-test-membership-rbac-role-binding_22375",
* membershipId: membership.membershipId,
* user: project.then(project => `service-${project.number}@gcp-sa-anthossupport.iam.gserviceaccount.com`),
* role: {
* predefinedRole: "ANTHOS_SUPPORT",
* },
* location: "global",
* }, {
* dependsOn: [membership],
* });
* ```
*
* ## Import
*
* MembershipRBACRoleBinding can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/memberships/{{membership_id}}/rbacrolebindings/{{membership_rbac_role_binding_id}}`
*
* * `{{project}}/{{location}}/{{membership_id}}/{{membership_rbac_role_binding_id}}`
*
* * `{{location}}/{{membership_id}}/{{membership_rbac_role_binding_id}}`
*
* When using the `pulumi import` command, MembershipRBACRoleBinding can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:gkehub/membershipRbacRoleBinding:MembershipRbacRoleBinding default projects/{{project}}/locations/{{location}}/memberships/{{membership_id}}/rbacrolebindings/{{membership_rbac_role_binding_id}}
* ```
*
* ```sh
* $ pulumi import gcp:gkehub/membershipRbacRoleBinding:MembershipRbacRoleBinding default {{project}}/{{location}}/{{membership_id}}/{{membership_rbac_role_binding_id}}
* ```
*
* ```sh
* $ pulumi import gcp:gkehub/membershipRbacRoleBinding:MembershipRbacRoleBinding default {{location}}/{{membership_id}}/{{membership_rbac_role_binding_id}}
* ```
*/
export declare class MembershipRbacRoleBinding extends pulumi.CustomResource {
/**
* Get an existing MembershipRbacRoleBinding resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MembershipRbacRoleBindingState, opts?: pulumi.CustomResourceOptions): MembershipRbacRoleBinding;
/**
* Returns true if the given object is an instance of MembershipRbacRoleBinding. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is MembershipRbacRoleBinding;
/**
* Time the RBAC Role Binding was created in UTC.
*/
readonly createTime: pulumi.Output<string>;
/**
* Time the RBAC Role Binding was deleted in UTC.
*/
readonly deleteTime: pulumi.Output<string>;
/**
* Location of the Membership
*/
readonly location: pulumi.Output<string>;
/**
* Id of the membership
*/
readonly membershipId: pulumi.Output<string>;
/**
* The client-provided identifier of the RBAC Role Binding.
*/
readonly membershipRbacRoleBindingId: pulumi.Output<string>;
/**
* The resource name for the RBAC Role Binding
*/
readonly name: pulumi.Output<string>;
readonly project: pulumi.Output<string>;
/**
* Role to bind to the principal.
* Structure is documented below.
*/
readonly role: pulumi.Output<outputs.gkehub.MembershipRbacRoleBindingRole>;
/**
* State of the RBAC Role Binding resource.
* Structure is documented below.
*/
readonly states: pulumi.Output<outputs.gkehub.MembershipRbacRoleBindingState[]>;
/**
* Google-generated UUID for this resource.
*/
readonly uid: pulumi.Output<string>;
/**
* Time the RBAC Role Binding was updated in UTC.
*/
readonly updateTime: pulumi.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"
*/
readonly user: pulumi.Output<string>;
/**
* Create a MembershipRbacRoleBinding resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: MembershipRbacRoleBindingArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering MembershipRbacRoleBinding resources.
*/
export interface MembershipRbacRoleBindingState {
/**
* Time the RBAC Role Binding was created in UTC.
*/
createTime?: pulumi.Input<string>;
/**
* Time the RBAC Role Binding was deleted in UTC.
*/
deleteTime?: pulumi.Input<string>;
/**
* Location of the Membership
*/
location?: pulumi.Input<string>;
/**
* Id of the membership
*/
membershipId?: pulumi.Input<string>;
/**
* The client-provided identifier of the RBAC Role Binding.
*/
membershipRbacRoleBindingId?: pulumi.Input<string>;
/**
* The resource name for the RBAC Role Binding
*/
name?: pulumi.Input<string>;
project?: pulumi.Input<string>;
/**
* Role to bind to the principal.
* Structure is documented below.
*/
role?: pulumi.Input<inputs.gkehub.MembershipRbacRoleBindingRole>;
/**
* State of the RBAC Role Binding resource.
* Structure is documented below.
*/
states?: pulumi.Input<pulumi.Input<inputs.gkehub.MembershipRbacRoleBindingState>[]>;
/**
* Google-generated UUID for this resource.
*/
uid?: pulumi.Input<string>;
/**
* Time the RBAC Role Binding was updated in UTC.
*/
updateTime?: pulumi.Input<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"
*/
user?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a MembershipRbacRoleBinding resource.
*/
export interface MembershipRbacRoleBindingArgs {
/**
* Location of the Membership
*/
location: pulumi.Input<string>;
/**
* Id of the membership
*/
membershipId: pulumi.Input<string>;
/**
* The client-provided identifier of the RBAC Role Binding.
*/
membershipRbacRoleBindingId: pulumi.Input<string>;
project?: pulumi.Input<string>;
/**
* Role to bind to the principal.
* Structure is documented below.
*/
role: pulumi.Input<inputs.gkehub.MembershipRbacRoleBindingRole>;
/**
* 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"
*/
user: pulumi.Input<string>;
}