azurerm_automation_software_update_configuration

Manages an Automation Software Update Configuraion.

Example Usage

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "example-rg"
  location = "East US"
}

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

resource "azurerm_automation_runbook" "example" {
  name                    = "Get-AzureVMTutorial"
  location                = azurerm_resource_group.example.location
  resource_group_name     = azurerm_resource_group.example.name
  automation_account_name = azurerm_automation_account.example.name

  log_verbose  = "true"
  log_progress = "true"
  description  = "This is a example runbook for terraform acceptance example"
  runbook_type = "Python3"

  content = <<CONTENT
# Some example content
# for Terraform acceptance example
CONTENT
  tags = {
    ENV = "runbook_test"
  }
}

resource "azurerm_automation_software_update_configuration" "example" {
  name                  = "example"
  automation_account_id = azurerm_automation_account.example.id
  operating_system      = "Linux"

  linux {
    classification_included = "Security"
    excluded_packages       = ["apt"]
    included_packages       = ["vim"]
    reboot                  = "IfRequired"
  }

  pre_task {
    source = azurerm_automation_runbook.example.name
    parameters = {
      COMPUTER_NAME = "Foo"
    }
  }

  duration = "PT2H2M2S"
}

Arguments Reference

The following arguments are supported:



A linux block supports the following:


A windows block supports the following:


A target block supports the following:


A azure_query block supports the following:


A tags block supports the following:


A non_azure_query block supports the following:


A pre_task block supports the following:


A post_task block supports the following:


A schedule block supports the following:


The monthly_occurrence block supports the following:

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

Automations Software Update Configuration can be imported using the resource id, e.g.

terraform import azurerm_automation_software_update_configuration.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/softwareUpdateConfigurations/suc1