--- page_title: "ona_automation_role_assignment Resource - ona" subcategory: "Identity and Access" description: |- Ona role assignment granting a group access to one Automation. --- # ona_automation_role_assignment (Resource) Ona role assignment granting a group access to one Automation. Use this resource to manage one group's access to one Automation. Sharing an Automation with a custom group requires the Enterprise plan. For product context, see [Share automations](https://ona.com/docs/ona/automations/sharing-automations) and [Manage groups](https://ona.com/docs/ona/organizations/groups). ## Example Usage ```terraform variable "automation_id" { type = string description = "ID of an existing Ona Automation." } resource "ona_group" "automation_executors" { name = "Automation Executors" description = "Service accounts and users allowed to run the Automation." } resource "ona_automation_role_assignment" "executors" { automation_id = var.automation_id group_id = ona_group.automation_executors.id role = "executor" } ``` ## Schema ### Required - `automation_id` (String) Automation ID receiving the group access. Changing this value replaces the assignment. - `group_id` (String) Group ID receiving access to the Automation. Changing this value replaces the assignment. - `role` (String) Automation role. Supported values are `viewer`, `executor`, and `admin`. Changing this value replaces the assignment. ### Read-Only - `id` (String) Role assignment ID. ## Import Import is supported using the following syntax: The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example: ```shell #!/usr/bin/env sh terraform import ona_automation_role_assignment.executors bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb/22222222-2222-4222-8222-222222222222/executor ```