Skip to main content

Overview

We have a Terraform Module hosted in the Terraform Registry that will allow you to connect your Azure account to Rad Security. The module will setup all of the necessary resources needed to scan resources within your Azure account.

Connection setup

If you navigate to the Settings icon you will find the Cloud Providers section. Click on Connect an Azure account to generate the Terraform needed to connect your account with Rad Security. Take the access_key_id and secret_key values from the Rad Security provider and replace it with the rad provider in the Terraform snippet below. Then, configure the azurerm and azuread providers.
terraform {
  required_providers {
    rad-security = {
      source = "rad-security/rad-security"
      version = "<version>"
    }
    azurerm = {
      source  = "hashicorp/azurerm"
      version = ">=3.0.0"
    }
    azuread = {
      source  = "hashicorp/azuread"
      version = ">= 1.0"
    }
  }
}

provider "azuread" {

}

provider "azurerm" {

}

provider "rad-security" {
    access_key_id        = "Your Rad Security access key here"
    secret_key           = "Your Rad Security secret key here"
    rad_security_api_url = "https://api.rad.security"
}

module "rad-security-connect" {
  source  = "rad-security/rad-security-connect/azurerm"
  version = "1.0.1"
}

Existing Service Principal

The module is not needed if an existing Service Principal is used. The Service Principal needs to have the necessary permissions required to be able to function properly within RAD. These permissions RAD uses can be found within the role definition within the module. This can change over time as new versions of the module get released over time. A new rad-security_azure_register resource needs to be created for each Azure Subscription you wish to connect with RAD. More information can be found within the Provider docs here.

Multiple Azure Subscriptions

Multiple Azure subscriptions can be added with the azure_subscriptions input variable in the rad-security-connect module. The input variable is a list of strings. The strings passed to the list need to be in the form /subscriptions/00000000-0000-0000-0000-000000000000.