Account Args
Manages an Azure Batch account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "testbatch",
location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
name: "teststorage",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleAccount2 = new azure.batch.Account("example", {
name: "testbatchaccount",
resourceGroupName: example.name,
location: example.location,
poolAllocationMode: "BatchService",
storageAccountId: exampleAccount.id,
storageAccountAuthenticationMode: "StorageKeys",
tags: {
env: "test",
},
});import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="testbatch",
location="West Europe")
example_account = azure.storage.Account("example",
name="teststorage",
resource_group_name=example.name,
location=example.location,
account_tier="Standard",
account_replication_type="LRS")
example_account2 = azure.batch.Account("example",
name="testbatchaccount",
resource_group_name=example.name,
location=example.location,
pool_allocation_mode="BatchService",
storage_account_id=example_account.id,
storage_account_authentication_mode="StorageKeys",
tags={
"env": "test",
})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 = "testbatch",
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "teststorage",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleAccount2 = new Azure.Batch.Account("example", new()
{
Name = "testbatchaccount",
ResourceGroupName = example.Name,
Location = example.Location,
PoolAllocationMode = "BatchService",
StorageAccountId = exampleAccount.Id,
StorageAccountAuthenticationMode = "StorageKeys",
Tags =
{
{ "env", "test" },
},
});
});package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
"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("testbatch"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("teststorage"),
ResourceGroupName: example.Name,
Location: example.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
_, err = batch.NewAccount(ctx, "example", &batch.AccountArgs{
Name: pulumi.String("testbatchaccount"),
ResourceGroupName: example.Name,
Location: example.Location,
PoolAllocationMode: pulumi.String("BatchService"),
StorageAccountId: exampleAccount.ID(),
StorageAccountAuthenticationMode: pulumi.String("StorageKeys"),
Tags: pulumi.StringMap{
"env": pulumi.String("test"),
},
})
if err != nil {
return err
}
return nil
})
}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.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.batch.Account;
import com.pulumi.azure.batch.AccountArgs;
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("testbatch")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("teststorage")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleAccount2 = new Account("exampleAccount2", AccountArgs.builder()
.name("testbatchaccount")
.resourceGroupName(example.name())
.location(example.location())
.poolAllocationMode("BatchService")
.storageAccountId(exampleAccount.id())
.storageAccountAuthenticationMode("StorageKeys")
.tags(Map.of("env", "test"))
.build());
}
}resources:
example:
type: azure:core:ResourceGroup
properties:
name: testbatch
location: West Europe
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: teststorage
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: LRS
exampleAccount2:
type: azure:batch:Account
name: example
properties:
name: testbatchaccount
resourceGroupName: ${example.name}
location: ${example.location}
poolAllocationMode: BatchService
storageAccountId: ${exampleAccount.id}
storageAccountAuthenticationMode: StorageKeys
tags:
env: testImport
Batch Account can be imported using the resource id, e.g.
$ pulumi import azure:batch/account:Account example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Batch/batchAccounts/account1Constructors
Properties
Specifies the allowed authentication mode for the Batch account. Possible values include AAD, SharedKey or TaskAuthenticationToken.
Specifies if customer managed key encryption should be used to encrypt batch account data. One encryption block as defined below.
An identity block as defined below.
A key_vault_reference block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the UserSubscription pool allocation mode.
A network_profile block as defined below.
Specifies the mode to use for pool allocation. Possible values are BatchService or UserSubscription. Defaults to BatchService.
Whether public network access is allowed for this server. Defaults to true.
The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
Specifies the storage account authentication mode. Possible values include StorageKeys, BatchAccountManagedIdentity.
Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
Specifies the user assigned identity for the storage account.