Show / Hide Table of Contents

Class InstanceIamBinding

Three different resources help you manage IAM policies on bigtable instances. Each of these resources serves a different use case:

  • gcp.bigtable.InstanceIamPolicy: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached.
  • gcp.bigtable.InstanceIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved.
  • gcp.bigtable.InstanceIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved.

Note: gcp.bigtable.InstanceIamPolicy cannot be used in conjunction with gcp.bigtable.InstanceIamBinding and gcp.bigtable.InstanceIamMember or they will fight over what your policy should be. In addition, be careful not to accidentally unset ownership of the instance as gcp.bigtable.InstanceIamPolicy replaces the entire policy.

Note: gcp.bigtable.InstanceIamBinding resources can be used in conjunction with gcp.bigtable.InstanceIamMember resources only if they do not grant privilege to the same role.

google_bigtable_instance_iam_policy

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
    {
        Binding = 
        {

            {
                { "role", "roles/editor" },
                { "members", 
                {
                    "user:jane@example.com",
                } },
            },
        },
    }));
    var editor = new Gcp.BigTable.InstanceIamPolicy("editor", new Gcp.BigTable.InstanceIamPolicyArgs
    {
        Project = "your-project",
        Instance = "your-bigtable-instance",
        PolicyData = admin.Apply(admin => admin.PolicyData),
    });
}

}

google_bigtable_instance_iam_binding

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var editor = new Gcp.BigTable.InstanceIamBinding("editor", new Gcp.BigTable.InstanceIamBindingArgs
    {
        Instance = "your-bigtable-instance",
        Members = 
        {
            "user:jane@example.com",
        },
        Role = "roles/editor",
    });
}

}

google_bigtable_instance_iam_member

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var editor = new Gcp.BigTable.InstanceIamMember("editor", new Gcp.BigTable.InstanceIamMemberArgs
    {
        Instance = "your-bigtable-instance",
        Member = "user:jane@example.com",
        Role = "roles/editor",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
InstanceIamBinding
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.BigTable
Assembly: Pulumi.Gcp.dll
Syntax
public class InstanceIamBinding : CustomResource

Constructors

View Source

InstanceIamBinding(String, InstanceIamBindingArgs, CustomResourceOptions)

Create a InstanceIamBinding resource with the given unique name, arguments, and options.

Declaration
public InstanceIamBinding(string name, InstanceIamBindingArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

InstanceIamBindingArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Condition

Declaration
public Output<InstanceIamBindingCondition> Condition { get; }
Property Value
Type Description
Output<InstanceIamBindingCondition>
View Source

Etag

(Computed) The etag of the instances's IAM policy.

Declaration
public Output<string> Etag { get; }
Property Value
Type Description
Output<System.String>
View Source

Instance

The name or relative resource id of the instance to manage IAM policies for.

Declaration
public Output<string> Instance { get; }
Property Value
Type Description
Output<System.String>
View Source

Members

Declaration
public Output<ImmutableArray<string>> Members { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Project

The project in which the instance belongs. If it is not provided, a default will be supplied.

Declaration
public Output<string> Project { get; }
Property Value
Type Description
Output<System.String>
View Source

Role

The role that should be applied. Only one gcp.bigtable.InstanceIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

Declaration
public Output<string> Role { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, InstanceIamBindingState, CustomResourceOptions)

Get an existing InstanceIamBinding resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static InstanceIamBinding Get(string name, Input<string> id, InstanceIamBindingState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

InstanceIamBindingState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
InstanceIamBinding
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.