Skip to content

azurermVideoAnalyzerEdgeModule

Manages a Video Analyzer Edge Module.

!> Video Analyzer (Preview) is now Deprecated and will be Retired on 2022-11-30 - as such the azurermVideoAnalyzerEdgeModule 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: [
      `\${${azurermUserAssignedIdentityExample.fqn}}`,
      `\${${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");
const azurermVideoAnalyzerEdgeModuleExample =
  new azurerm.videoAnalyzerEdgeModule.VideoAnalyzerEdgeModule(
    this,
    "example_6",
    {
      name: "example-edge-module",
      resource_group_name: azurermResourceGroupExample.name,
      video_analyzer_name: azurermVideoAnalyzerExample.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.*/
azurermVideoAnalyzerEdgeModuleExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

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

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

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


Attributes Reference

The following attributes are exported:

  • id - The ID of the Video Analyzer Edge Module.

Timeouts

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

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

Import

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

terraform import azurerm_video_analyzer_edge_module.edge /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Media/videoAnalyzers/analyzer1/edgeModules/edge1