azurerm_automation_connection_certificate

Manages an Automation Connection with type Azure.

Example Usage

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "resourceGroup-example"
  location = "West Europe"
}

data "azurerm_client_config" "example" {}

resource "azurerm_automation_account" "example" {
  name                = "account-example"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku_name            = "Basic"
}

resource "azurerm_automation_certificate" "example" {
  name                    = "certificate-example"
  resource_group_name     = azurerm_resource_group.example.name
  automation_account_name = azurerm_automation_account.example.name
  base64                  = filebase64("certificate.pfx")
}

resource "azurerm_automation_connection_certificate" "example" {
  name                        = "connection-example"
  resource_group_name         = azurerm_resource_group.example.name
  automation_account_name     = azurerm_automation_account.example.name
  automation_certificate_name = azurerm_automation_certificate.example.name
  subscription_id             = data.azurerm_client_config.example.subscription_id
}

Argument Reference

The following arguments are supported:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Automation Connection can be imported using the resource id, e.g.

terraform import azurerm_automation_connection_certificate.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/connections/conn1