We recommend using Azure Native.
azure.automation.Module
Explore with Pulumi AI
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={
"uri": "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
})
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
"github.com/pulumi/pulumi-azure/sdk/v6/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
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 Module("moduleResource", 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
The Module resource accepts the following input properties:
- Automation
Account stringName - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- Module
Link ModuleModule Link - A
module_link
block as defined below. - Resource
Group stringName - 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 stringName - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- Module
Link ModuleModule Link Args - A
module_link
block as defined below. - Resource
Group stringName - 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 StringName - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- module
Link ModuleModule Link - A
module_link
block as defined below. - resource
Group StringName - 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 stringName - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- module
Link ModuleModule Link - A
module_link
block as defined below. - resource
Group stringName - 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_ strname - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- module_
link ModuleModule Link Args - A
module_link
block as defined below. - resource_
group_ strname - 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.
- automation
Account StringName - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- module
Link Property Map - A
module_link
block as defined below. - resource
Group StringName - 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.
- Automation
Account stringName - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- Module
Link ModuleModule Link - A
module_link
block as defined below. - Name string
- Specifies the name of the Module. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
- Automation
Account stringName - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- Module
Link ModuleModule Link Args - A
module_link
block as defined below. - Name string
- Specifies the name of the Module. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
- automation
Account StringName - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- module
Link ModuleModule Link - A
module_link
block as defined below. - name String
- Specifies the name of the Module. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
- automation
Account stringName - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- module
Link ModuleModule Link - A
module_link
block as defined below. - name string
- Specifies the name of the Module. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
- automation_
account_ strname - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- module_
link ModuleModule Link Args - 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_ strname - The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
- automation
Account StringName - The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
- module
Link 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.
- resource
Group StringName - The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
Supporting Types
ModuleModuleLink, ModuleModuleLinkArgs
- Uri string
- The URI of the module content (zip or nupkg).
- Hash
Module
Module Link Hash - A
hash
block as defined below.
- Uri string
- The URI of the module content (zip or nupkg).
- Hash
Module
Module Link Hash - A
hash
block as defined below.
- uri String
- The URI of the module content (zip or nupkg).
- hash
Module
Module Link Hash - A
hash
block as defined below.
- uri string
- The URI of the module content (zip or nupkg).
- hash
Module
Module Link Hash - A
hash
block as defined below.
- uri str
- The URI of the module content (zip or nupkg).
- hash
Module
Module Link Hash - 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
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.