How to Update a Role

Updated on 01 June, 2026

Update an existing IAM role in your Vultr organization. Modify the role name, description, or type configuration through the Vultr API or the Console.


Updating a role allows you to change its name, description, type, or session duration. This is useful when you need to adjust access levels or rebrand a role to reflect its current purpose. You can also convert an assignable role to an assumable role or vice versa by changing the role_type field.

Follow this guide to update a role using the Vultr Console, the Vultr API, or Terraform.

  • Vultr Console
  • Vultr API
  • Terraform
  1. Log in to the Vultr Console.
  2. Click the organization name in the top navigation bar.
  3. Click Manage Organization.
  4. Click the Roles tab.
  5. Click the name of the role you want to update.
  6. Click the Edit icon in the Details section.
  7. Update the Name or Description as needed.
  8. Click Save Changes.
  1. Send a GET request to the List Roles endpoint to retrieve all roles in your organization.

    console
    $ curl "https://api.vultr.com/v2/roles" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    

    Note the id of the role you want to update.

  2. Send a GET request to the Read Role endpoint to retrieve the current role details. Replace {role-id} with the id you retrieved in the previous step.

    console
    $ curl "https://api.vultr.com/v2/roles/{role-id}" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  3. Send a PUT request to the Update Role endpoint to update the role. Replace the values with your updated role details.

    console
    $ curl "https://api.vultr.com/v2/roles/{role-id}" \
        -X PUT \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        -d '{
            "name": "NEW-ROLE-NAME",
            "description": "NEW-ROLE-DESCRIPTION",
            "role_type": "assignable",
            "max_session_duration": 7200
        }'
    
  4. Send a GET request to the Read Role endpoint to retrieve the updated details.

    console
    $ curl "https://api.vultr.com/v2/roles/{role-id}" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    

    Verify that the role details reflect the new values.

  1. Ensure the Vultr Terraform provider is configured in your Terraform project.

  2. Open the role resource configuration and modify the name, description, type, or max_session_duration field.

    console
    $ nano roles.tf
    
  3. Apply the changes.

    console
    $ terraform apply
    

    Verify that the output shows vultr_organization_role.my_role: Modifications complete.

Comments