Skip to content

azurermVideoAnalyzer

Manages a Video Analyzer.

!> Video Analyzer (Preview) is now Deprecated and will be Retired on 2022-11-30 - as such the azurermVideoAnalyzer resource is deprecated and will be removed in v4.0 of the AzureRM Provider.

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: "video-analyzer-resources",
  }
);
const azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
  this,
  "example_1",
  {
    account_replication_type: "GRS",
    account_tier: "Standard",
    location: azurermResourceGroupExample.location,
    name: "examplestoracc",
    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 azurermUserAssignedIdentityExample =
  new azurerm.userAssignedIdentity.UserAssignedIdentity(this, "example_2", {
    location: azurermResourceGroupExample.location,
    name: "exampleidentity",
    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.*/
azurermUserAssignedIdentityExample.overrideLogicalId("example");
const azurermRoleAssignmentContributor =
  new azurerm.roleAssignment.RoleAssignment(this, "contributor", {
    principal_id: azurermUserAssignedIdentityExample.principalId,
    role_definition_name: "Storage Blob Data Contributor",
    scope: azurermStorageAccountExample.id,
  });
const azurermRoleAssignmentReader = new azurerm.roleAssignment.RoleAssignment(
  this,
  "reader",
  {
    principal_id: azurermUserAssignedIdentityExample.principalId,
    role_definition_name: "Reader",
    scope: azurermStorageAccountExample.id,
  }
);
const azurermVideoAnalyzerExample = new azurerm.videoAnalyzer.VideoAnalyzer(
  this,
  "example_5",
  {
    depends_on: [
      `\${${azurermRoleAssignmentContributor.fqn}}`,
      `\${${azurermRoleAssignmentReader.fqn}}`,
    ],
    identity: [
      {
        identity_ids: [azurermUserAssignedIdentityExample.id],
        type: "UserAssigned",
      },
    ],
    location: azurermResourceGroupExample.location,
    name: "exampleanalyzer",
    resource_group_name: azurermResourceGroupExample.name,
    storage_account: [
      {
        id: azurermStorageAccountExample.id,
        user_assigned_identity_id: azurermUserAssignedIdentityExample.id,
      },
    ],
    tags: {
      environment: "staging",
    },
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermVideoAnalyzerExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the Video Analyzer. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the resource group in which to create the Video Analyzer. Changing this forces a new resource to be created.

  • location - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • storageAccount - (Required) A storageAccount block as defined below.

  • identity - (Required) An identity block as defined below.

  • tags - (Optional) A mapping of tags assigned to the resource.


A storageAccount block supports the following:

  • id - (Required) Specifies the ID of the Storage Account that will be associated with the Video Analyzer instance.

  • userAssignedIdentityId - (Required) Specifies the User Assigned Identity ID which should be assigned to access this Storage Account.


A identity block supports the following:

  • type - (Required) Specifies the type of Managed Service Identity that should be configured on this Video Analyzer instance. Only possible value is userAssigned.

  • identityIds - (Required) Specifies a list of User Assigned Managed Identity IDs to be assigned to this Video Analyzer instance.


Attributes Reference

The following attributes are exported:

  • id - The ID of the Video Analyzer.

Timeouts

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

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

Import

Video Analyzer can be imported using the resourceId, e.g.

terraform import azurerm_video_analyzer.analyzer /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Media/videoAnalyzers/analyzer1