Package com.pulumi.gcp.bigtable
Class TableIamMember
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.gcp.bigtable.TableIamMember
-
public class TableIamMember extends com.pulumi.resources.CustomResource
Three different resources help you manage IAM policies on bigtable tables. Each of these resources serves a different use case: * `gcp.bigtable.TableIamPolicy`: Authoritative. Sets the IAM policy for the tables and replaces any existing policy already attached. * `gcp.bigtable.TableIamBinding`: 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 table are preserved. * `gcp.bigtable.TableIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the table are preserved. > **Note:** `gcp.bigtable.TableIamPolicy` **cannot** be used in conjunction with `gcp.bigtable.TableIamBinding` and `gcp.bigtable.TableIamMember` or they will fight over what your policy should be. In addition, be careful not to accidentally unset ownership of the table as `gcp.bigtable.TableIamPolicy` replaces the entire policy. > **Note:** `gcp.bigtable.TableIamBinding` resources **can be** used in conjunction with `gcp.bigtable.TableIamMember` resources **only if** they do not grant privilege to the same role. ## google\_bigtable\_table\_iam\_policy ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.organizations.OrganizationsFunctions; import com.pulumi.gcp.organizations.inputs.GetIAMPolicyArgs; import com.pulumi.gcp.bigtable.TableIamPolicy; import com.pulumi.gcp.bigtable.TableIamPolicyArgs; 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) { final var admin = OrganizationsFunctions.getIAMPolicy(GetIAMPolicyArgs.builder() .bindings(GetIAMPolicyBindingArgs.builder() .role("roles/bigtable.user") .members("user:[email protected]") .build()) .build()); var editor = new TableIamPolicy("editor", TableIamPolicyArgs.builder() .project("your-project") .instance("your-bigtable-instance") .table("your-bigtable-table") .policyData(admin.applyValue(getIAMPolicyResult -> getIAMPolicyResult.policyData())) .build()); } } ``` ## google\_bigtable\_table\_iam\_binding ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.bigtable.TableIamBinding; import com.pulumi.gcp.bigtable.TableIamBindingArgs; 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 editor = new TableIamBinding("editor", TableIamBindingArgs.builder() .instance("your-bigtable-instance") .members("user:[email protected]") .role("roles/bigtable.user") .table("your-bigtable-table") .build()); } } ``` ## google\_bigtable\_table\_iam\_member ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.bigtable.TableIamMember; import com.pulumi.gcp.bigtable.TableIamMemberArgs; 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 editor = new TableIamMember("editor", TableIamMemberArgs.builder() .instance("your-bigtable-instance") .member("user:[email protected]") .role("roles/bigtable.user") .table("your-bigtable-table") .build()); } } ``` ## Import ### Importing IAM policies IAM policy imports use the `table` identifier of the Bigtable Table resource only. For example* `"projects/{project}/tables/{table}"` An [`import` block](https://developer.hashicorp.com/terraform/language/import) (Terraform v1.5.0 and later) can be used to import IAM policiestf import { id = "projects/{project}/tables/{table}" to = google_bigtable_table_iam_policy.default } ```sh $ pulumi import gcp:bigtable/tableIamMember:TableIamMember The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can also be used ``` ```sh $ pulumi import gcp:bigtable/tableIamMember:TableIamMember default projects/{project}/tables/{table} ```
-
-
Constructor Summary
Constructors Constructor Description TableIamMember(java.lang.String name)
TableIamMember(java.lang.String name, TableIamMemberArgs args)
TableIamMember(java.lang.String name, TableIamMemberArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<TableIamMemberCondition>>
condition()
com.pulumi.core.Output<java.lang.String>
etag()
static TableIamMember
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, TableIamMemberState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
instance()
com.pulumi.core.Output<java.lang.String>
member()
com.pulumi.core.Output<java.lang.String>
project()
com.pulumi.core.Output<java.lang.String>
role()
com.pulumi.core.Output<java.lang.String>
table()
-
-
-
Constructor Detail
-
TableIamMember
public TableIamMember(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
TableIamMember
public TableIamMember(java.lang.String name, TableIamMemberArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
TableIamMember
public TableIamMember(java.lang.String name, TableIamMemberArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
condition
public com.pulumi.core.Output<java.util.Optional<TableIamMemberCondition>> condition()
-
etag
public com.pulumi.core.Output<java.lang.String> etag()
- Returns:
- (Computed) The etag of the tables's IAM policy.
-
instance
public com.pulumi.core.Output<java.lang.String> instance()
- Returns:
- The name or relative resource id of the instance that owns the table.
-
member
public com.pulumi.core.Output<java.lang.String> member()
-
project
public com.pulumi.core.Output<java.lang.String> project()
- Returns:
- The project in which the table belongs. If it is not provided, this provider will use the provider default.
-
role
public com.pulumi.core.Output<java.lang.String> role()
- Returns:
- The role that should be applied. Only one `gcp.bigtable.TableIamBinding` can be used per role. Note that custom roles must be of the format `[projects|organizations]/{parent-name}/roles/{role-name}`. Read more about roles [here](https://cloud.google.com/bigtable/docs/access-control#roles). `gcp.bigtable.TableIamPolicy` only:
-
table
public com.pulumi.core.Output<java.lang.String> table()
- Returns:
- The name or relative resource id of the table to manage IAM policies for. For `gcp.bigtable.TableIamMember` or `gcp.bigtable.TableIamBinding`: * `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values: * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account. * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account. * **user:{emailid}**: An email address that represents a specific Google account. For example, [email protected] or [email protected]. * **serviceAccount:{emailid}**: An email address that represents a service account. For example, [email protected]. * **group:{emailid}**: An email address that represents a Google group. For example, [email protected]. * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
-
get
public static TableIamMember get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable TableIamMemberState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-