Skip to content

azurermAutomationModule

Manages a Automation Module.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-resources",
  }
);
const azurermAutomationAccountExample =
  new azurerm.automationAccount.AutomationAccount(this, "example_1", {
    location: azurermResourceGroupExample.location,
    name: "account1",
    resource_group_name: azurermResourceGroupExample.name,
    sku_name: "Basic",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermAutomationAccountExample.overrideLogicalId("example");
const azurermAutomationModuleExample =
  new azurerm.automationModule.AutomationModule(this, "example_2", {
    automation_account_name: azurermAutomationAccountExample.name,
    module_link: [
      {
        uri: "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
      },
    ],
    name: "xActiveDirectory",
    resource_group_name: azurermResourceGroupExample.name,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermAutomationModuleExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the Module. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the resource group in which the Module is created. Changing this forces a new resource to be created.

  • automationAccountName - (Required) The name of the automation account in which the Module is created. Changing this forces a new resource to be created.

  • moduleLink - (Required) A moduleLink block as defined below.


The moduleLink block supports the following:

  • uri - (Required) The URI of the module content (zip or nupkg).

  • hash - (Optional) A hash block as defined below.


The hash block supports the following:

  • algorithm - (Required) Specifies the algorithm used for the hash content.

  • value - (Required) The hash value of the content.

Attributes Reference

The following attributes are exported:

  • id - The Automation Module ID.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Automation Module.
  • update - (Defaults to 30 minutes) Used when updating the Automation Module.
  • read - (Defaults to 5 minutes) Used when retrieving the Automation Module.
  • delete - (Defaults to 30 minutes) Used when deleting the Automation Module.

Import

Automation Modules can be imported using the resourceId, e.g.

terraform import azurerm_automation_module.module1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/modules/module1