Access Control (IAM)
Manage who can do what in your NetActuate account with the NetActuate Terraform provider v2. Define custom roles from individual permissions, assign roles to team members, and grant single permissions directly.
Requirements
- NetActuate Terraform provider 0.4.11 or later.
- The account owner's API key, or a team member's API key with
access.role.manage. Team members also need delegation rights for the permissions and scopes they grant through a role, assignment, or direct grant. The API checks revocation rights when removing permissions. Federated tokens cannot manage access.
Permissions and Scopes
Every action in the account is covered by a permission key, such as dns.read or account.ssh-key.manage. Each grant of a key has a scope:
| Scope | Covers |
|---|---|
account | Everything on the account |
own | The holder's own resources, as defined by the permission. For account.api-acl.manage, this is the holder's personal allowlist |
Not every key offers both scopes. Use the permission catalog to see each key's scopes, description and risk level.
Baseline Permissions
Every principal holds these keys automatically, so they are never listed in a role or grant:
| Key | Allows |
|---|---|
cloud.reference.read | Read the catalog a deployment is chosen from: locations, sizes, kernels, pools, accelerators |
platform.reference.read | View locations, plans, operating systems and other catalog data |
dedicated.reference.read | View dedicated hardware locations, plans and operating systems |
cloud.image.read | View the OS and custom images available to the account |
tag.read | View tags and what they are applied to |
account.profile.read | View the account profile, company details, status and trust level |
account.news.read | View product news and announcements |
alerting.notification.read | View the notifications delivered to the signed-in person |
account.document.sign | Sign legal agreements on behalf of the account |
account.api-key.rotate | Issue a new personal API key, invalidating the previous one |
Owner-Only Permissions
These keys are held only by the account owner and cannot be given through a role or grant:
account.settings.manageaccount.saml.manageaccount.ownership.transferaccount.contact.adminaccess.api-token.manageaccess.federation.manage
Look Up Permissions, Roles and Team Members
data "netactuate_iam_permission_catalog" "all" {}
data "netactuate_iam_roles" "all" {}
data "netactuate_iam_team_members" "all" {}
| Data Source | Returns |
|---|---|
netactuate_iam_permission_catalog | permissions: each key with its label, description, group, scopes, baseline, owner_only and risk. baseline: the baseline keys |
netactuate_iam_roles | roles: system and custom roles with their id, slug, name, description, is_system and assignable |
netactuate_iam_team_members | members: each team member's sub_id, email, first_name, last_name and roles |
Custom Roles
resource "netactuate_iam_role" "net_ops" {
name = "Network Operations"
slug = "net-ops"
description = "Manages DNS, SSH keys and API access"
permissions = {
"dns.read" = "account"
"account.ssh-key.manage" = "account"
"account.api-acl.manage" = "own"
}
delegable_permissions = ["account.api-acl.manage"]
session_idle_timeout = 30
session_max_duration = 480
}
The ACL permission in this example covers the role holder's personal entries. The account owner can manage other team members' entries. See API Allowlist.
| Argument | Description | Required |
|---|---|---|
name | Role name, unique on the account | Yes |
slug | Role identifier. Changing it replaces the role | Yes |
description | Role description | No |
permissions | Map of permission key to scope (own or account) | No |
delegable_permissions | Keys from permissions that holders may also hand out to others | No |
session_idle_timeout | Minutes of inactivity before a holder's portal session ends: 30, 45 or 60 | No |
session_max_duration | Longest a holder's portal session lasts, in minutes: 30, 60, 120, 240, 480 or 720 | No |
The role also exports effective_permissions, every permission it grants including the baseline.
Role Assignments
Give a team member a role. Use one resource per role.
resource "netactuate_iam_role_assignment" "alice_net_ops" {
member = "alice@example.com"
role = netactuate_iam_role.net_ops.slug
expires_at = "2027-01-31T00:00:00Z"
}
| Argument | Description | Required |
|---|---|---|
member | Team member's email address or sub_id | Yes |
role | Role slug or ID, for a system role such as viewer or a custom role | Yes |
expires_at | When the assignment ends, in RFC 3339 form | No |
Note: A team member's first role assignment replaces the roles they started with. Removing the assignment does not restore them.
Direct Grants
Give a team member a single permission without a role.
resource "netactuate_iam_grant" "bob_usage" {
member = "bob@example.com"
key = "cloud.usage.read"
scope = "account"
delegate = false
expires_at = "2027-01-31T00:00:00Z"
}
| Argument | Description | Required |
|---|---|---|
member | Team member's email address or sub_id | Yes |
key | Permission key | Yes |
scope | own or account | Yes |
delegate | Whether the member may also hand the permission out to others | No |
expires_at | When the grant ends, in RFC 3339 form | No |
When an expires_at passes, the assignment or grant ends. A time in the past is rejected at plan.
Roles for Automation
A custom role can also define what a federated identity's tokens may do. See Federated Authentication on Google Cloud.
resource "netactuate_iam_federated_identity" "terraform" {
# ...
role_ids = [tonumber(netactuate_iam_role.net_ops.id)]
}
Import
| Resource | Import ID | Example |
|---|---|---|
netactuate_iam_role | Role ID | terraform import netactuate_iam_role.net_ops 42 |
netactuate_iam_role_assignment | sub_id/role_id | terraform import netactuate_iam_role_assignment.alice_net_ops 1234/42 |
netactuate_iam_grant | sub_id/permission key | terraform import netactuate_iam_grant.bob_usage 1234/cloud.usage.read |
Roles created in the portal keep their ID when imported.
Need Help?
If you need assistance with access control, visit our support page.