Azure Automation Connection Service Principal

This page shows how to write Terraform and Azure Resource Manager for Automation Connection Service Principal and write them securely.

azurerm_automation_connection_service_principal (Terraform)

The Connection Service Principal in Automation can be configured in Terraform with the resource name azurerm_automation_connection_service_principal. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

automationaccount.tf#L125
resource "azurerm_automation_connection_service_principal" "test" {
  name                    = "AzureRunAsConnection"
  resource_group_name     = azurerm_automation_account.test.resource_group_name
  automation_account_name = azurerm_automation_account.test.name
  application_id          = azuread_service_principal.test.application_id
  tenant_id               = data.azurerm_client_config.current.tenant_id
main.tf#L5
resource "azurerm_automation_connection_service_principal" "auto_conn_sp" {
  name                      = var.name
  resource_group_name       = var.resource_group_name
  automation_account_name   = var.automation_account_name
  description               = var.description

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages an Automation Connection with type AzureServicePrincipal.

Microsoft.Automation/automationAccounts/connections (Azure Resource Manager)

The automationAccounts/connections in Microsoft.Automation can be configured in Azure Resource Manager with the resource name Microsoft.Automation/automationAccounts/connections. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Frequently asked questions

What is Azure Automation Connection Service Principal?

Azure Automation Connection Service Principal is a resource for Automation of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Automation Connection Service Principal?

For Terraform, the mifurm/AZNetWorkshop and scalair/terraform-azure-automation-connection source code examples are useful. See the Terraform Example section for further details.