如何解决使用Terraform配置Azure媒体服务:具有Widervine DRM的特定内容密钥策略
我正在尝试使用Terraform配置Azure媒体服务,并且可以使主要批量工作例如资源组,存储帐户等,但是找不到任何文档或创建带有DRM(Widervine)和JWT令牌的内容密钥策略的示例,我还需要为许可证设置添加以下json:
{
"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
文件:
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("","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("","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
}
解决方法
您可以在以下位置找到Widevine许可证的文档:Media Services v3 with Widevine license template overview和here,以及其他内容保护信息。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。