Enabling Azure Services

Azure services in Guardrails involve two separate configurations:

Each Azure service has an Enabled policy (e.g., Azure > Storage > Enabled) that controls whether the service is considered "in use" for governance purposes. By default, all services are Disabled.

What the Enabled Policy Controls

Guardrails Permissions

When the Enabled policy is set to Disabled, Guardrails does not create permission grants for that service. Users who receive their cloud permissions through Guardrails will not be able to access the service's resources.

[!NOTE] This only affects users whose permissions are managed through Guardrails IAM. If your users get permissions directly from Azure (outside of Guardrails), the Enabled policy does not restrict their access.

Approved Controls

The Approved > Usage sub-policy for each resource type defaults to Approved if Azure > {Service} > Enabled. When the service Enabled policy is Disabled (or Enabled: Metadata Only), the Approved control marks resources as Not approved.

For example, if Azure > Storage > Enabled is set to Disabled and Azure > Storage > Storage Account > Approved is set to Check: Approved, then every Storage Account in the subscription will show an Alarm because the resource's Approved > Usage evaluates to "Not approved: Storage service is disabled."

If the Approved policy is set to an enforce mode, Guardrails takes action on the unapproved resources.

What the Enabled Policy Does NOT Control

The Enabled policy does not control CMDB or Discovery. Resources are discovered and tracked in the Guardrails CMDB regardless of the Enabled setting. CMDB and Discovery have their own policies (Azure > {Service} > {Resource} > CMDB).

Policy Values

ValueDescription
EnabledFull governance. Guardrails grants permissions for the service and considers resources approved for use.
Enabled: Metadata OnlyGuardrails grants metadata-level (read-only) permissions only. Resources are treated as unapproved by the Approved > Usage control.
DisabledNo Guardrails permissions are granted for the service. Resources are treated as unapproved by the Approved > Usage control.

Enable a Service

Navigate to Policies and click New Policy Setting. Search for the service's Enabled policy, set the resource scope (subscription, folder, or workspace root), and set the value to Enabled.

Common service Enabled policies:

PolicyDescription
Azure > Active Directory > EnabledMicrosoft Entra ID (directories, users, groups, applications). Required for tenant imports.
Azure > Compute > EnabledVirtual machines, scale sets, disks, snapshots, images.
Azure > Storage > EnabledStorage accounts, blob containers, file shares, queues, tables.
Azure > SQL > EnabledAzure SQL servers, databases, elastic pools.
Azure > Network > EnabledVirtual networks, subnets, NSGs, public IPs, route tables.
Azure > Key Vault > EnabledKey Vaults (vaults, keys, secrets, certificates).
Azure > Monitor > EnabledAzure Monitor, required if you use event polling or event handlers.
Azure > AKS > EnabledAzure Kubernetes Service (clusters, node pools).
Azure > App Service > EnabledApp Services (web apps, function apps, plans).
Azure > Cosmos DB > EnabledCosmos DB accounts, databases, containers.

[!TIP] Set Enabled policies at a folder or workspace root level to apply to all subscriptions at once. You can then override at the subscription level for exceptions.

[!TIP] For automating service enablement across many services at once, see the azure_service_enabled baseline in the Guardrails Samples repository.

Terraform Example

# Azure > Storage > Enabled
resource "turbot_policy_setting" "azure_storage_enabled" {
  resource = "id-of-subscription-or-folder"
  type     = "tmod:@turbot/azure-storage#/policy/types/storageEnabled"
  value    = "Enabled"
}

Registering Service Providers

Separately from the Enabled policy, Azure requires resource providers to be registered in a subscription before their APIs can be used. Guardrails can manage this registration for you.

To register a provider, set the relevant Azure > Provider > {Provider} > Registered policy to Enforce: Registered:

[!NOTE] A single Azure provider may support multiple services. They do not map 1:1.

If a provider is not registered in Azure, CMDB and Discovery controls for the dependent services will be in Error because the APIs are not accessible. You can eliminate these errors by either registering the provider or setting the relevant CMDB policies to Skip (which also causes Discovery controls to skip).

Terraform Example

# Azure > Provider > Storage > Registered
resource "turbot_policy_setting" "provider_registration_enable" {
  resource = "id-of-subscription-or-folder"
  type     = "tmod:@turbot/azure-provider#/policy/types/storageRegistered"
  value    = "Enforce: Registered"
}