Updates the project's IAM policy to bind a role to a new member. Existing bindings are preserved.
resource "hcp_project" "example" {
name = "example"
}
resource "hcp_service_principal" "sp" {
name = "example-sp"
parent = hcp_project.example.resource_name
}
resource "hcp_project_iam_binding" "example" {
project_id = hcp_project.example.resource_id
principal_id = hcp_service_principal.sp.resource_id
role = "roles/contributor"
}
principal_id
(String) The principal to bind to the given role.role
(String) The role name to bind to the given principal.project_id
(String) The ID of the HCP project to apply the IAM Policy to. If unspecified, the project configured on the provider is used.