azurermMediaServicesAccount
Manages a Media Services 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: "media-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 azurermMediaServicesAccountExample =
new azurerm.mediaServicesAccount.MediaServicesAccount(this, "example_2", {
location: azurermResourceGroupExample.location,
name: "examplemediaacc",
resource_group_name: azurermResourceGroupExample.name,
storage_account: [
{
id: azurermStorageAccountExample.id,
is_primary: true,
},
],
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMediaServicesAccountExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created. -
resourceGroupName
- (Required) The name of the resource group in which to create the Media Services Account. 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) One or morestorageAccount
blocks as defined below. -
encryption
- (Optional) Anencryption
block as defined below. -
identity
- (Optional) Anidentity
block as defined below. -
publicNetworkAccessEnabled
- (Optional) Whether public network access is allowed for this server. Defaults totrue
. -
storageAuthenticationType
- (Optional) Specifies the storage authentication type. Possible value ismanagedIdentity
orsystem
. -
keyDeliveryAccessControl
- (Optional) AkeyDeliveryAccessControl
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 Media Services instance. -
isPrimary
- (Optional) Specifies whether the storage account should be the primary account or not. Defaults tofalse
.
\~> NOTE: Whilst multiple storageAccount
blocks can be specified - one of them must be set to the primary
managedIdentity
- (Optional) AmanagedIdentity
block as defined below.
A encryption
block supports the following:
-
type
- (Optional) Specifies the type of key used to encrypt the account data. Possible values aresystemKey
andcustomerKey
. -
keyVaultKeyIdentifier
- (Optional) Specifies the URI of the Key Vault Key used to encrypt data. The key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key without a version (for example https://vault/keys/mykey). -
managedIdentity
- (Optional) AmanagedIdentity
block as defined below.
A identity
block supports the following:
-
type
- (Required) Specifies the type of Managed Service Identity that should be configured on this Media Services Account. Possible values aresystemAssigned
,userAssigned
,systemAssigned,UserAssigned
(to enable both). -
identityIds
- (Optional) Specifies a list of User Assigned Managed Identity IDs to be assigned to this Media Services Account.
A keyDeliveryAccessControl
block supports the following:
-
defaultAction
- (Optional) The Default Action to use when no rules match fromipAllowList
. Possible values areallow
anddeny
. -
ipAllowList
- (Optional) One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery.
A managedIdentity
block supports the following:
-
userAssignedIdentityId
- (Optional) The ID of the User Assigned Identity. This value can only be set whenuseSystemAssignedIdentity
isfalse
-
useSystemAssignedIdentity
- (Optional) Whether to use System Assigned Identity. Possible Values aretrue
andfalse
.
Attributes Reference
The following attributes are exported:
-
id
- The ID of the Media Services Account. -
identity
- Anidentity
block as defined below.
An encryption
block exports the following:
currentKeyIdentifier
- The current key used to encrypt the Media Services Account, including the key version.
An identity
block exports the following:
-
principalId
- The Principal ID associated with this Managed Service Identity. -
tenantId
- The Tenant ID associated with this Managed Service Identity.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Media Services Account.update
- (Defaults to 30 minutes) Used when updating the Media Services Account.read
- (Defaults to 5 minutes) Used when retrieving the Media Services Account.delete
- (Defaults to 30 minutes) Used when deleting the Media Services Account.
Import
Media Services Accounts can be imported using the resourceId
, e.g.