首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Terraform配置Azure媒体服务:特别是使用Widervine DRM的内容密钥策略

使用Terraform配置Azure媒体服务:特别是使用Widervine DRM的内容密钥策略
EN

Stack Overflow用户
提问于 2020-10-16 19:14:11
回答 1查看 103关注 0票数 0

我正在尝试使用Terraform配置Azure媒体服务,可以获得主要的批量工作,例如资源组、存储帐户等,但找不到任何创建内容密钥策略的文档或示例,使用DRM (Widervine) & JWT令牌,我还需要添加此json以进行许可证设置:

代码语言:javascript
复制
{
  "allowed_track_types": "SD_HD",
  "content_key_specs": [
    {
      "track_type": "SD",
      "security_level": 1,
      "required_output_protection": {
        "hdcp": "HDCP_NONE",
        "cgms_flags": null
      }
    }
  ],
  "policy_overrides": {
    "can_play": true,
    "can_persist": true,
    "can_renew": false,
    "rental_duration_seconds": 2592000,
    "playback_duration_seconds": 10800,
    "license_duration_seconds": 604800
  }
}

当前main.tf文件:

代码语言:javascript
复制
terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = ">= 2.26"
    }
  }
}

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "rg" {
  name     = join("", [ var.prefix, "mediaservices" ])
  location = var.location
}

resource "azurerm_storage_account" "sa" {
  name                     = join("", [ var.prefix, "storageaccount" ])
  resource_group_name      = azurerm_resource_group.rg.name
  location                 = azurerm_resource_group.rg.location
  account_tier             = "Standard"
  account_replication_type = "LRS"

  tags = {
    environment = "staging"
  }
}

resource "azurerm_storage_container" "sc1" {
  name                  = "archive"
  storage_account_name  = azurerm_storage_account.sa.name
  container_access_type = "private"
}

resource "azurerm_storage_container" "sc2" {
  name                  = "tobeprocessed"
  storage_account_name  = azurerm_storage_account.sa.name
  container_access_type = "private"
}

resource "azurerm_media_services_account" "ams" {
  name                = join("", [ var.prefix, "mediaservices" ])
  location            = azurerm_resource_group.rg.location
  resource_group_name = azurerm_resource_group.rg.name

  storage_account {
    id         = azurerm_storage_account.sa.id
    is_primary = true
  }
}

output "resourceGroupName" {
  value = azurerm_resource_group.rg.name
}

output "containerConnectionString" {
  value = azurerm_storage_account.sa.primary_connection_string
}

data "azurerm_subscriptions" "available" {
}

output "subscriptionId" {
  value = data.azurerm_subscriptions.available.subscriptions[ 0 ].subscription_id
}
EN

回答 1

Stack Overflow用户

发布于 2020-10-30 03:43:37

您可以在此处找到Widevine许可证的文档:Media Services v3 with Widevine license template overviewhere以及其他内容保护信息。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64388053

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档