Azure Database Migration Service
This page shows how to write Terraform and Azure Resource Manager for Database Migration Service and write them securely.
azurerm_database_migration_service (Terraform)
The Service in Database Migration can be configured in Terraform with the resource name azurerm_database_migration_service
. The following sections describe 7 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_database_migration_service" "dms" {
for_each = var.settings.dms
name = each.value.name
location = var.location
resource_group_name = var.resource_group_name
resource "azurerm_database_migration_service" "dms" {
for_each = var.settings.dms
name = each.value.name
location = var.location
resource_group_name = var.resource_group_name
resource "azurerm_database_migration_service" "dbms" {
name = "database_migration_service-dbms"
location = azurerm_resource_group.resource_group.location
resource_group_name = azurerm_resource_group.resource_group.name
subnet_id = azurerm_subnet.migrate_subnet.id
sku_name = "Standard_1vCores"
resource "azurerm_database_migration_service" "dms" {
name = azurecaf_name.dms.result
location = var.location
resource_group_name = var.resource_group_name
sku_name = var.settings.sku_name
tags = local.tags
resource "azurerm_database_migration_service" "dms" {
name = azurecaf_name.dms.result
location = var.location
resource_group_name = var.resource_group_name
sku_name = var.settings.sku_name
tags = local.tags
resource "azurerm_database_migration_service" "this" {
location = var.location
name = var.name
resource_group_name = var.resource_group_name
sku_name = var.sku_name
subnet_id = var.subnet_id
resource "azurerm_database_migration_service" "dms" {
for_each = var.settings.dms
name = each.value.name
location = var.location
resource_group_name = var.resource_group_name
Parameters
-
id
optional computed - string -
location
required - string -
name
required - string -
resource_group_name
required - string -
sku_name
required - string -
subnet_id
required - string -
tags
optional - map from string to string -
timeouts
single block
Explanation in Terraform Registry
Manages a Azure Database Migration Service.
NOTE: Destroying a Database Migration Service will leave any outstanding tasks untouched. This is to avoid unexpectedly deleting any tasks managed outside of terraform.
Microsoft.DataMigration/services (Azure Resource Manager)
The services in Microsoft.DataMigration can be configured in Azure Resource Manager with the resource name Microsoft.DataMigration/services
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
apiVersion
required - stringetag
optional - stringHTTP strong entity tag value. Ignored if submitted
kind
optional - stringThe resource kind. Only 'vm' (the default) is supported.
location
required - stringResource location.
name
required - stringName of the service
properties
requiredpublicKey
optional - stringThe public key of the service, used to encrypt secrets sent to the service
virtualNicId
optional - stringThe ID of the Microsoft.Network/networkInterfaces resource which the service have
virtualSubnetId
required - stringThe ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined
sku
optionalcapacity
optional - integerThe capacity of the SKU, if it supports scaling
family
optional - stringThe SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines
name
optional - stringThe unique name of the SKU, such as 'P3'
size
optional - stringThe size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines
tier
optional - stringThe tier of the SKU, such as 'Basic', 'General Purpose', or 'Business Critical'
tags
optional - stringResource tags.
type
required - string
Frequently asked questions
What is Azure Database Migration Service?
Azure Database Migration Service is a resource for Database Migration of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Database Migration Service?
For Terraform, the anmoltoppo/Terraform, davesee/terraform-caf-rover-breakout and celenn/Azure-Migrate source code examples are useful. See the Terraform Example section for further details.