1. Packages
  2. Azure Classic
  3. API Docs
  4. automation
  5. Module

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages a Automation Module.

    Example Usage

    Example coming soon!

    Example coming soon!

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleAccount = new azure.automation.Account("exampleAccount", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        sku: [{
            name: "Basic",
        }],
    });
    const exampleModule = new azure.automation.Module("exampleModule", {
        resourceGroupName: exampleResourceGroup.name,
        automationAccountName: exampleAccount.name,
        moduleLink: {
            uri: "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
        },
    });
    

    Example coming soon!

    Example coming soon!

    Create Module Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Module(name: string, args: ModuleArgs, opts?: CustomResourceOptions);
    @overload
    def Module(resource_name: str,
               args: ModuleArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Module(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               automation_account_name: Optional[str] = None,
               module_link: Optional[ModuleModuleLinkArgs] = None,
               resource_group_name: Optional[str] = None,
               name: Optional[str] = None)
    func NewModule(ctx *Context, name string, args ModuleArgs, opts ...ResourceOption) (*Module, error)
    public Module(string name, ModuleArgs args, CustomResourceOptions? opts = null)
    public Module(String name, ModuleArgs args)
    public Module(String name, ModuleArgs args, CustomResourceOptions options)
    
    type: azure:automation:Module
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ModuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ModuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ModuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ModuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ModuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var moduleResource = new Azure.Automation.Module("moduleResource", new()
    {
        AutomationAccountName = "string",
        ModuleLink = new Azure.Automation.Inputs.ModuleModuleLinkArgs
        {
            Uri = "string",
            Hash = new Azure.Automation.Inputs.ModuleModuleLinkHashArgs
            {
                Algorithm = "string",
                Value = "string",
            },
        },
        ResourceGroupName = "string",
        Name = "string",
    });
    
    example, err := automation.NewModule(ctx, "moduleResource", &automation.ModuleArgs{
    	AutomationAccountName: pulumi.String("string"),
    	ModuleLink: &automation.ModuleModuleLinkArgs{
    		Uri: pulumi.String("string"),
    		Hash: &automation.ModuleModuleLinkHashArgs{
    			Algorithm: pulumi.String("string"),
    			Value:     pulumi.String("string"),
    		},
    	},
    	ResourceGroupName: pulumi.String("string"),
    	Name:              pulumi.String("string"),
    })
    
    var moduleResource = new com.pulumi.azure.automation.Module("moduleResource", com.pulumi.azure.automation.ModuleArgs.builder()
        .automationAccountName("string")
        .moduleLink(ModuleModuleLinkArgs.builder()
            .uri("string")
            .hash(ModuleModuleLinkHashArgs.builder()
                .algorithm("string")
                .value("string")
                .build())
            .build())
        .resourceGroupName("string")
        .name("string")
        .build());
    
    module_resource = azure.automation.Module("moduleResource",
        automation_account_name="string",
        module_link={
            "uri": "string",
            "hash": {
                "algorithm": "string",
                "value": "string",
            },
        },
        resource_group_name="string",
        name="string")
    
    const moduleResource = new azure.automation.Module("moduleResource", {
        automationAccountName: "string",
        moduleLink: {
            uri: "string",
            hash: {
                algorithm: "string",
                value: "string",
            },
        },
        resourceGroupName: "string",
        name: "string",
    });
    
    type: azure:automation:Module
    properties:
        automationAccountName: string
        moduleLink:
            hash:
                algorithm: string
                value: string
            uri: string
        name: string
        resourceGroupName: string
    

    Module Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Module resource accepts the following input properties:

    AutomationAccountName string
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    ModuleLink ModuleModuleLink
    The published Module link.
    ResourceGroupName string
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    AutomationAccountName string
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    ModuleLink ModuleModuleLinkArgs
    The published Module link.
    ResourceGroupName string
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automationAccountName String
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    moduleLink ModuleModuleLink
    The published Module link.
    resourceGroupName String
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automationAccountName string
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    moduleLink ModuleModuleLink
    The published Module link.
    resourceGroupName string
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automation_account_name str
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    module_link ModuleModuleLinkArgs
    The published Module link.
    resource_group_name str
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automationAccountName String
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    moduleLink Property Map
    The published Module link.
    resourceGroupName String
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Module. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Module resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Module Resource

    Get an existing Module resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ModuleState, opts?: CustomResourceOptions): Module
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            automation_account_name: Optional[str] = None,
            module_link: Optional[ModuleModuleLinkArgs] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None) -> Module
    func GetModule(ctx *Context, name string, id IDInput, state *ModuleState, opts ...ResourceOption) (*Module, error)
    public static Module Get(string name, Input<string> id, ModuleState? state, CustomResourceOptions? opts = null)
    public static Module get(String name, Output<String> id, ModuleState state, CustomResourceOptions options)
    resources:  _:    type: azure:automation:Module    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AutomationAccountName string
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    ModuleLink ModuleModuleLink
    The published Module link.
    Name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
    AutomationAccountName string
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    ModuleLink ModuleModuleLinkArgs
    The published Module link.
    Name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
    automationAccountName String
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    moduleLink ModuleModuleLink
    The published Module link.
    name String
    Specifies the name of the Module. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
    automationAccountName string
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    moduleLink ModuleModuleLink
    The published Module link.
    name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
    automation_account_name str
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    module_link ModuleModuleLinkArgs
    The published Module link.
    name str
    Specifies the name of the Module. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
    automationAccountName String
    The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
    moduleLink Property Map
    The published Module link.
    name String
    Specifies the name of the Module. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which the Module is created. Changing this forces a new resource to be created.

    Supporting Types

    Uri string
    The uri of the module content (zip or nupkg).
    Hash ModuleModuleLinkHash
    Uri string
    The uri of the module content (zip or nupkg).
    Hash ModuleModuleLinkHash
    uri String
    The uri of the module content (zip or nupkg).
    hash ModuleModuleLinkHash
    uri string
    The uri of the module content (zip or nupkg).
    hash ModuleModuleLinkHash
    uri str
    The uri of the module content (zip or nupkg).
    hash ModuleModuleLinkHash
    uri String
    The uri of the module content (zip or nupkg).
    hash Property Map

    ModuleModuleLinkHash, ModuleModuleLinkHashArgs

    Algorithm string
    Value string
    Algorithm string
    Value string
    algorithm String
    value String
    algorithm string
    value string
    algorithm String
    value String

    Import

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

     $ pulumi import azure:automation/module:Module module1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/modules/module1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.