Skip to content

azurermStorageQueue

Manages a Queue within an Azure Storage Account.

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-resources",
  }
);
const azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
  this,
  "example_1",
  {
    account_replication_type: "LRS",
    account_tier: "Standard",
    location: azurermResourceGroupExample.location,
    name: "examplestorageacc",
    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 azurermStorageQueueExample = new azurerm.storageQueue.StorageQueue(
  this,
  "example_2",
  {
    name: "mysamplequeue",
    storage_account_name: azurermStorageAccountExample.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.*/
azurermStorageQueueExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the Queue which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.

  • storageAccountName - (Required) Specifies the Storage Account in which the Storage Queue should exist. Changing this forces a new resource to be created.

  • metadata - (Optional) A mapping of MetaData which should be assigned to this Storage Queue.

Attributes Reference

The following attributes are exported in addition to the arguments listed above:

  • id - The ID of the Storage Queue.

  • resourceManagerId - The Resource Manager ID of this Storage Queue.

Timeouts

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

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

Import

Storage Queue's can be imported using the resourceId, e.g.

terraform import azurerm_storage_queue.queue1 https://example.queue.core.windows.net/queue1