Skip to main content

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:

ScopeCovers
accountEverything on the account
ownThe 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:

KeyAllows
cloud.reference.readRead the catalog a deployment is chosen from: locations, sizes, kernels, pools, accelerators
platform.reference.readView locations, plans, operating systems and other catalog data
dedicated.reference.readView dedicated hardware locations, plans and operating systems
cloud.image.readView the OS and custom images available to the account
tag.readView tags and what they are applied to
account.profile.readView the account profile, company details, status and trust level
account.news.readView product news and announcements
alerting.notification.readView the notifications delivered to the signed-in person
account.document.signSign legal agreements on behalf of the account
account.api-key.rotateIssue 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.manage
  • account.saml.manage
  • account.ownership.transfer
  • account.contact.admin
  • access.api-token.manage
  • access.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 SourceReturns
netactuate_iam_permission_catalogpermissions: each key with its label, description, group, scopes, baseline, owner_only and risk. baseline: the baseline keys
netactuate_iam_rolesroles: system and custom roles with their id, slug, name, description, is_system and assignable
netactuate_iam_team_membersmembers: 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.

ArgumentDescriptionRequired
nameRole name, unique on the accountYes
slugRole identifier. Changing it replaces the roleYes
descriptionRole descriptionNo
permissionsMap of permission key to scope (own or account)No
delegable_permissionsKeys from permissions that holders may also hand out to othersNo
session_idle_timeoutMinutes of inactivity before a holder's portal session ends: 30, 45 or 60No
session_max_durationLongest a holder's portal session lasts, in minutes: 30, 60, 120, 240, 480 or 720No

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"
}
ArgumentDescriptionRequired
memberTeam member's email address or sub_idYes
roleRole slug or ID, for a system role such as viewer or a custom roleYes
expires_atWhen the assignment ends, in RFC 3339 formNo

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"
}
ArgumentDescriptionRequired
memberTeam member's email address or sub_idYes
keyPermission keyYes
scopeown or accountYes
delegateWhether the member may also hand the permission out to othersNo
expires_atWhen the grant ends, in RFC 3339 formNo

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​

ResourceImport IDExample
netactuate_iam_roleRole IDterraform import netactuate_iam_role.net_ops 42
netactuate_iam_role_assignmentsub_id/role_idterraform import netactuate_iam_role_assignment.alice_net_ops 1234/42
netactuate_iam_grantsub_id/permission keyterraform 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.