azurermDatabaseMigrationService
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.
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.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-rg",
}
);
const azurermVirtualNetworkExample = new azurerm.virtualNetwork.VirtualNetwork(
this,
"example_2",
{
address_space: ["10.0.0.0/16"],
location: azurermResourceGroupExample.location,
name: "example-vnet",
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.*/
azurermVirtualNetworkExample.overrideLogicalId("example");
const azurermSubnetExample = new azurerm.subnet.Subnet(this, "example_3", {
address_prefixes: ["10.0.1.0/24"],
name: "example-subnet",
resource_group_name: azurermResourceGroupExample.name,
virtual_network_name: azurermVirtualNetworkExample.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.*/
azurermSubnetExample.overrideLogicalId("example");
const azurermDatabaseMigrationServiceExample =
new azurerm.databaseMigrationService.DatabaseMigrationService(
this,
"example_4",
{
location: azurermResourceGroupExample.location,
name: "example-dms",
resource_group_name: azurermResourceGroupExample.name,
sku_name: "Standard_1vCores",
subnet_id: azurermSubnetExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDatabaseMigrationServiceExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) Specify the name of the database migration service. 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. -
resourceGroupName
- (Required) Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created. -
subnetId
- (Required) The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created. -
skuName
- (Required) The SKU name of the database migration service. Possible values arepremium4VCores
,standard1VCores
,standard2VCores
andstandard4VCores
. Changing this forces a new resource to be created. -
tags
- (Optional) A mapping of tags to assigned to the resource.
Attributes Reference
The following attributes are exported:
id
- The ID of Database Migration Service.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the API Management API.update
- (Defaults to 30 minutes) Used when updating the API Management API.read
- (Defaults to 5 minutes) Used when retrieving the API Management API.delete
- (Defaults to 30 minutes) Used when deleting the API Management API.
Import
Database Migration Services can be imported using the resourceId
, e.g.