Skip to content

azurermBatchApplication

Manages Azure Batch Application instance.

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-rg",
  }
);
const azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
  this,
  "example_1",
  {
    account_replication_type: "LRS",
    account_tier: "Standard",
    location: azurermResourceGroupExample.location,
    name: "examplesa",
    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.*/
azurermStorageAccountExample.overrideLogicalId("example");
const azurermBatchAccountExample = new azurerm.batchAccount.BatchAccount(
  this,
  "example_2",
  {
    location: azurermResourceGroupExample.location,
    name: "exampleba",
    pool_allocation_mode: "BatchService",
    resource_group_name: azurermResourceGroupExample.name,
    storage_account_id: azurermStorageAccountExample.id,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermBatchAccountExample.overrideLogicalId("example");
const azurermBatchApplicationExample =
  new azurerm.batchApplication.BatchApplication(this, "example_3", {
    account_name: azurermBatchAccountExample.name,
    name: "example-batch-application",
    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.*/
azurermBatchApplicationExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the application. This must be unique within the account. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.

  • accountName - (Required) The name of the Batch account. Changing this forces a new resource to be created.

  • allowUpdates - (Optional) A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.

  • defaultVersion - (Optional) The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.

  • displayName - (Optional) The display name for the application.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Batch Application.

Timeouts

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

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

Import

Batch Applications can be imported using the resourceId, e.g.

terraform import azurerm_batch_application.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Batch/batchAccounts/exampleba/applications/example-batch-application