Azure Automation Credential

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

azurerm_automation_credential (Terraform)

The Credential in Automation can be configured in Terraform with the resource name azurerm_automation_credential. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub

module.tf#L1
resource "azurerm_automation_credential" "credential" {
  name                    = var.name
  resource_group_name     = var.resource_group_name
  automation_account_name = var.automation_account_name
  username                = var.username
  password                = var.password
main.tf#L7
resource "azurerm_automation_credential" "this" {
  automation_account_name = var.automation_account_name
  description             = var.description
  name                    = var.name
  password                = var.password
  resource_group_name     = var.resource_group_name
main.tf#L7
resource "azurerm_automation_credential" "this" {
  automation_account_name = var.automation_account_name
  description             = var.description
  name                    = var.name
  password                = var.password
  resource_group_name     = var.resource_group_name

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 a Automation Credential.

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

The automationAccounts/credentials in Microsoft.Automation can be configured in Azure Resource Manager with the resource name Microsoft.Automation/automationAccounts/credentials. 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 Credential?

Azure Automation Credential 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 Credential?

For Terraform, the BrettOJ/azuread_adfs_jwt_token, kevinhead/azurerm and niveklabs/azurerm source code examples are useful. See the Terraform Example section for further details.