Terrazure / terraform-azure-rbac

Terraform code to add RBAC to Azure resources.

Home Page:https://github.com/Terrazure/terraform-azure-rbac

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terraform Unit Tests Terraform Plan/Apply

Requirements

No requirements.

Providers

Name Version
azurerm n/a

Sample

Click to expand
module "role_assignment" {
  source = "../"

  role_mapping = [
    {
      role_definition_name = "Key Vault Administrator"
      principal_ids        = [data.azurerm_client_config.current.object_id, ]
    },
    {
      role_definition_name = "Key Vault Reader"
      principal_ids        = [data.azurerm_client_config.current.object_id, ]
    }
  ]

  scope_id = azurerm_key_vault.this.id
}

Inputs

Name Description Type Default Required
role_mapping Role and principle id mapping. This block requires the following inputs:
- role_definition_name: Role Name i.e. Key Vault Administrator
- principal_ids: List of ids.
list(object({
role_definition_name = string
principal_ids = list(string)
}))
n/a yes
scope_id The Id of the scope where the role should be assigned. string n/a yes

Outputs

No outputs.

Resources

Name Type
azurerm_role_assignment.role_assignment resource

Modules

No modules.

About

Terraform code to add RBAC to Azure resources.

https://github.com/Terrazure/terraform-azure-rbac


Languages

Language:HCL 100.0%