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

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.automation.Module

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Manages a Automation Module.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleAccount = new azure.automation.Account("example", {
        name: "account1",
        location: example.location,
        resourceGroupName: example.name,
        skuName: "Basic",
    });
    const exampleModule = new azure.automation.Module("example", {
        name: "xActiveDirectory",
        resourceGroupName: example.name,
        automationAccountName: exampleAccount.name,
        moduleLink: {
            uri: "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_account = azure.automation.Account("example",
        name="account1",
        location=example.location,
        resource_group_name=example.name,
        sku_name="Basic")
    example_module = azure.automation.Module("example",
        name="xActiveDirectory",
        resource_group_name=example.name,
        automation_account_name=example_account.name,
        module_link=azure.automation.ModuleModuleLinkArgs(
            uri="https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/automation"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
    			Name:              pulumi.String("account1"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			SkuName:           pulumi.String("Basic"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = automation.NewModule(ctx, "example", &automation.ModuleArgs{
    			Name:                  pulumi.String("xActiveDirectory"),
    			ResourceGroupName:     example.Name,
    			AutomationAccountName: exampleAccount.Name,
    			ModuleLink: &automation.ModuleModuleLinkArgs{
    				Uri: pulumi.String("https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleAccount = new Azure.Automation.Account("example", new()
        {
            Name = "account1",
            Location = example.Location,
            ResourceGroupName = example.Name,
            SkuName = "Basic",
        });
    
        var exampleModule = new Azure.Automation.Module("example", new()
        {
            Name = "xActiveDirectory",
            ResourceGroupName = example.Name,
            AutomationAccountName = exampleAccount.Name,
            ModuleLink = new Azure.Automation.Inputs.ModuleModuleLinkArgs
            {
                Uri = "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.automation.Account;
    import com.pulumi.azure.automation.AccountArgs;
    import com.pulumi.azure.automation.Module;
    import com.pulumi.azure.automation.ModuleArgs;
    import com.pulumi.azure.automation.inputs.ModuleModuleLinkArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleAccount = new Account("exampleAccount", AccountArgs.builder()        
                .name("account1")
                .location(example.location())
                .resourceGroupName(example.name())
                .skuName("Basic")
                .build());
    
            var exampleModule = new Module("exampleModule", ModuleArgs.builder()        
                .name("xActiveDirectory")
                .resourceGroupName(example.name())
                .automationAccountName(exampleAccount.name())
                .moduleLink(ModuleModuleLinkArgs.builder()
                    .uri("https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleAccount:
        type: azure:automation:Account
        name: example
        properties:
          name: account1
          location: ${example.location}
          resourceGroupName: ${example.name}
          skuName: Basic
      exampleModule:
        type: azure:automation:Module
        name: example
        properties:
          name: xActiveDirectory
          resourceGroupName: ${example.name}
          automationAccountName: ${exampleAccount.name}
          moduleLink:
            uri: https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg
    

    Create Module Resource

    new Module(name: string, args: ModuleArgs, opts?: CustomResourceOptions);
    @overload
    def Module(resource_name: 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)
    @overload
    def Module(resource_name: str,
               args: ModuleArgs,
               opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    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
    A module_link block as defined below.
    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
    A module_link block as defined below.
    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
    A module_link block as defined below.
    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
    A module_link block as defined below.
    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
    A module_link block as defined below.
    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
    A module_link block as defined below.
    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)
    Resource lookup is not supported in YAML
    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
    A module_link block as defined below.
    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
    A module_link block as defined below.
    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
    A module_link block as defined below.
    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
    A module_link block as defined below.
    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
    A module_link block as defined below.
    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
    A module_link block as defined below.
    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
    A hash block as defined below.
    Uri string
    The URI of the module content (zip or nupkg).
    Hash ModuleModuleLinkHash
    A hash block as defined below.
    uri String
    The URI of the module content (zip or nupkg).
    hash ModuleModuleLinkHash
    A hash block as defined below.
    uri string
    The URI of the module content (zip or nupkg).
    hash ModuleModuleLinkHash
    A hash block as defined below.
    uri str
    The URI of the module content (zip or nupkg).
    hash ModuleModuleLinkHash
    A hash block as defined below.
    uri String
    The URI of the module content (zip or nupkg).
    hash Property Map
    A hash block as defined below.

    ModuleModuleLinkHash, ModuleModuleLinkHashArgs

    Algorithm string
    Specifies the algorithm used for the hash content.
    Value string
    The hash value of the content.
    Algorithm string
    Specifies the algorithm used for the hash content.
    Value string
    The hash value of the content.
    algorithm String
    Specifies the algorithm used for the hash content.
    value String
    The hash value of the content.
    algorithm string
    Specifies the algorithm used for the hash content.
    value string
    The hash value of the content.
    algorithm str
    Specifies the algorithm used for the hash content.
    value str
    The hash value of the content.
    algorithm String
    Specifies the algorithm used for the hash content.
    value String
    The hash value of the content.

    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
    

    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.

    Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi