Skip to content

feat: allow creation of roles #628

Open
@rwlodarczyk-xealth

Description

@rwlodarczyk-xealth

Feature Request

Describe the Feature Request
Currently there is no way to create roles in Lacework via Terraform. It seems like users can be assigned to roles, but the roles need to be created in the UI first.

Is your feature request related to a problem? Please describe
We'd like to get all of our configuration for Lacework into Terraform so that we can track changes via git.

Describe Preferred Solution
Create:

resource "lacework_role" "read_only" {
  name = "Read only Role"

  alerts = ["READ"] # valid values: ["READ"], ["WRITE"], ["DELETE"], ["READ", "WRITE"], ["READ", "WRITE", "DELETE"]
  compliance = ["READ"]
  vulnerabilities = ["READ"]
  code_security = ["READ"]
  resources = ["READ"]
  policies = ["READ"]
  reports = ["READ"]
  subscription = ["READ"]
  identities = ["READ"]
  attack_path = ["READ"]

  notifications {
      channels = ["READ"]
      rules = ["READ"]
  }

  integrations {
      accounts = ["READ"]
      identity_providers = ["READ"]
      container_registries = ["READ"]
  }

  configuration {
      resource_groups = ["READ"]
      api_keys = ["READ"]
      agents = ["READ"]
      report_rules = ["READ"]
      data_export = ["READ"]
      ai_assistants = ["READ"]
      general = ["READ"]
  }

  usage {
      license = ["READ"]
      audit_logs = ["READ"]
      authentication = ["READ"]
  }

  access_control = ["READ"]
}

resource "lacework_team_member" "severus" {
  provider   = lacework.org
  first_name = "Severus"
  last_name  = "Snape"
  email      = "[email protected]"
  role       = "Read only Role"
}

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    featNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions