tencentcloud.SqlserverMigration
Explore with Pulumi AI
Provides a resource to create a sqlserver migration
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const zones = tencentcloud.getAvailabilityZonesByProduct({
product: "sqlserver",
});
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
const subnet = new tencentcloud.Subnet("subnet", {
availabilityZone: zones.then(zones => zones.zones?.[4]?.name),
vpcId: vpc.vpcId,
cidrBlock: "10.0.0.0/16",
isMulticast: false,
});
const securityGroup = new tencentcloud.SecurityGroup("securityGroup", {description: "desc."});
const srcExample = new tencentcloud.SqlserverBasicInstance("srcExample", {
availabilityZone: zones.then(zones => zones.zones?.[4]?.name),
chargeType: "POSTPAID_BY_HOUR",
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
projectId: 0,
memory: 4,
storage: 100,
cpu: 2,
machineType: "CLOUD_PREMIUM",
maintenanceWeekSets: [
1,
2,
3,
],
maintenanceStartTime: "09:00",
maintenanceTimeSpan: 3,
securityGroups: [securityGroup.securityGroupId],
tags: {
test: "test",
},
});
const dstExample = new tencentcloud.SqlserverBasicInstance("dstExample", {
availabilityZone: zones.then(zones => zones.zones?.[4]?.name),
chargeType: "POSTPAID_BY_HOUR",
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
projectId: 0,
memory: 4,
storage: 100,
cpu: 2,
machineType: "CLOUD_PREMIUM",
maintenanceWeekSets: [
1,
2,
3,
],
maintenanceStartTime: "09:00",
maintenanceTimeSpan: 3,
securityGroups: [securityGroup.securityGroupId],
tags: {
test: "test",
},
});
const srcSqlserverDb = new tencentcloud.SqlserverDb("srcSqlserverDb", {
instanceId: srcExample.sqlserverBasicInstanceId,
charset: "Chinese_PRC_BIN",
remark: "testACC-remark",
});
const dstSqlserverDb = new tencentcloud.SqlserverDb("dstSqlserverDb", {
instanceId: dstExample.sqlserverBasicInstanceId,
charset: "Chinese_PRC_BIN",
remark: "testACC-remark",
});
const srcSqlserverAccount = new tencentcloud.SqlserverAccount("srcSqlserverAccount", {
instanceId: srcExample.sqlserverBasicInstanceId,
password: "Qwer@234",
isAdmin: true,
});
const dstSqlserverAccount = new tencentcloud.SqlserverAccount("dstSqlserverAccount", {
instanceId: dstExample.sqlserverBasicInstanceId,
password: "Qwer@234",
isAdmin: true,
});
const srcSqlserverAccountDbAttachment = new tencentcloud.SqlserverAccountDbAttachment("srcSqlserverAccountDbAttachment", {
instanceId: srcExample.sqlserverBasicInstanceId,
accountName: srcSqlserverAccount.name,
dbName: srcSqlserverDb.name,
privilege: "ReadWrite",
});
const dstSqlserverAccountDbAttachment = new tencentcloud.SqlserverAccountDbAttachment("dstSqlserverAccountDbAttachment", {
instanceId: dstExample.sqlserverBasicInstanceId,
accountName: dstSqlserverAccount.name,
dbName: dstSqlserverDb.name,
privilege: "ReadWrite",
});
const migration = new tencentcloud.SqlserverMigration("migration", {
migrateName: "tf_test_migration",
migrateType: 1,
sourceType: 1,
source: {
instanceId: srcExample.sqlserverBasicInstanceId,
userName: srcSqlserverAccount.name,
password: srcSqlserverAccount.password,
},
target: {
instanceId: dstExample.sqlserverBasicInstanceId,
userName: dstSqlserverAccount.name,
password: dstSqlserverAccount.password,
},
migrateDbSets: [{
dbName: srcSqlserverDb.name,
}],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
zones = tencentcloud.get_availability_zones_by_product(product="sqlserver")
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
subnet = tencentcloud.Subnet("subnet",
availability_zone=zones.zones[4].name,
vpc_id=vpc.vpc_id,
cidr_block="10.0.0.0/16",
is_multicast=False)
security_group = tencentcloud.SecurityGroup("securityGroup", description="desc.")
src_example = tencentcloud.SqlserverBasicInstance("srcExample",
availability_zone=zones.zones[4].name,
charge_type="POSTPAID_BY_HOUR",
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
project_id=0,
memory=4,
storage=100,
cpu=2,
machine_type="CLOUD_PREMIUM",
maintenance_week_sets=[
1,
2,
3,
],
maintenance_start_time="09:00",
maintenance_time_span=3,
security_groups=[security_group.security_group_id],
tags={
"test": "test",
})
dst_example = tencentcloud.SqlserverBasicInstance("dstExample",
availability_zone=zones.zones[4].name,
charge_type="POSTPAID_BY_HOUR",
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
project_id=0,
memory=4,
storage=100,
cpu=2,
machine_type="CLOUD_PREMIUM",
maintenance_week_sets=[
1,
2,
3,
],
maintenance_start_time="09:00",
maintenance_time_span=3,
security_groups=[security_group.security_group_id],
tags={
"test": "test",
})
src_sqlserver_db = tencentcloud.SqlserverDb("srcSqlserverDb",
instance_id=src_example.sqlserver_basic_instance_id,
charset="Chinese_PRC_BIN",
remark="testACC-remark")
dst_sqlserver_db = tencentcloud.SqlserverDb("dstSqlserverDb",
instance_id=dst_example.sqlserver_basic_instance_id,
charset="Chinese_PRC_BIN",
remark="testACC-remark")
src_sqlserver_account = tencentcloud.SqlserverAccount("srcSqlserverAccount",
instance_id=src_example.sqlserver_basic_instance_id,
password="Qwer@234",
is_admin=True)
dst_sqlserver_account = tencentcloud.SqlserverAccount("dstSqlserverAccount",
instance_id=dst_example.sqlserver_basic_instance_id,
password="Qwer@234",
is_admin=True)
src_sqlserver_account_db_attachment = tencentcloud.SqlserverAccountDbAttachment("srcSqlserverAccountDbAttachment",
instance_id=src_example.sqlserver_basic_instance_id,
account_name=src_sqlserver_account.name,
db_name=src_sqlserver_db.name,
privilege="ReadWrite")
dst_sqlserver_account_db_attachment = tencentcloud.SqlserverAccountDbAttachment("dstSqlserverAccountDbAttachment",
instance_id=dst_example.sqlserver_basic_instance_id,
account_name=dst_sqlserver_account.name,
db_name=dst_sqlserver_db.name,
privilege="ReadWrite")
migration = tencentcloud.SqlserverMigration("migration",
migrate_name="tf_test_migration",
migrate_type=1,
source_type=1,
source={
"instance_id": src_example.sqlserver_basic_instance_id,
"user_name": src_sqlserver_account.name,
"password": src_sqlserver_account.password,
},
target={
"instance_id": dst_example.sqlserver_basic_instance_id,
"user_name": dst_sqlserver_account.name,
"password": dst_sqlserver_account.password,
},
migrate_db_sets=[{
"db_name": src_sqlserver_db.name,
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
zones, err := tencentcloud.GetAvailabilityZonesByProduct(ctx, &tencentcloud.GetAvailabilityZonesByProductArgs{
Product: "sqlserver",
}, nil)
if err != nil {
return err
}
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
AvailabilityZone: pulumi.String(zones.Zones[4].Name),
VpcId: vpc.VpcId,
CidrBlock: pulumi.String("10.0.0.0/16"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
securityGroup, err := tencentcloud.NewSecurityGroup(ctx, "securityGroup", &tencentcloud.SecurityGroupArgs{
Description: pulumi.String("desc."),
})
if err != nil {
return err
}
srcExample, err := tencentcloud.NewSqlserverBasicInstance(ctx, "srcExample", &tencentcloud.SqlserverBasicInstanceArgs{
AvailabilityZone: pulumi.String(zones.Zones[4].Name),
ChargeType: pulumi.String("POSTPAID_BY_HOUR"),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
ProjectId: pulumi.Float64(0),
Memory: pulumi.Float64(4),
Storage: pulumi.Float64(100),
Cpu: pulumi.Float64(2),
MachineType: pulumi.String("CLOUD_PREMIUM"),
MaintenanceWeekSets: pulumi.Float64Array{
pulumi.Float64(1),
pulumi.Float64(2),
pulumi.Float64(3),
},
MaintenanceStartTime: pulumi.String("09:00"),
MaintenanceTimeSpan: pulumi.Float64(3),
SecurityGroups: pulumi.StringArray{
securityGroup.SecurityGroupId,
},
Tags: pulumi.StringMap{
"test": pulumi.String("test"),
},
})
if err != nil {
return err
}
dstExample, err := tencentcloud.NewSqlserverBasicInstance(ctx, "dstExample", &tencentcloud.SqlserverBasicInstanceArgs{
AvailabilityZone: pulumi.String(zones.Zones[4].Name),
ChargeType: pulumi.String("POSTPAID_BY_HOUR"),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
ProjectId: pulumi.Float64(0),
Memory: pulumi.Float64(4),
Storage: pulumi.Float64(100),
Cpu: pulumi.Float64(2),
MachineType: pulumi.String("CLOUD_PREMIUM"),
MaintenanceWeekSets: pulumi.Float64Array{
pulumi.Float64(1),
pulumi.Float64(2),
pulumi.Float64(3),
},
MaintenanceStartTime: pulumi.String("09:00"),
MaintenanceTimeSpan: pulumi.Float64(3),
SecurityGroups: pulumi.StringArray{
securityGroup.SecurityGroupId,
},
Tags: pulumi.StringMap{
"test": pulumi.String("test"),
},
})
if err != nil {
return err
}
srcSqlserverDb, err := tencentcloud.NewSqlserverDb(ctx, "srcSqlserverDb", &tencentcloud.SqlserverDbArgs{
InstanceId: srcExample.SqlserverBasicInstanceId,
Charset: pulumi.String("Chinese_PRC_BIN"),
Remark: pulumi.String("testACC-remark"),
})
if err != nil {
return err
}
dstSqlserverDb, err := tencentcloud.NewSqlserverDb(ctx, "dstSqlserverDb", &tencentcloud.SqlserverDbArgs{
InstanceId: dstExample.SqlserverBasicInstanceId,
Charset: pulumi.String("Chinese_PRC_BIN"),
Remark: pulumi.String("testACC-remark"),
})
if err != nil {
return err
}
srcSqlserverAccount, err := tencentcloud.NewSqlserverAccount(ctx, "srcSqlserverAccount", &tencentcloud.SqlserverAccountArgs{
InstanceId: srcExample.SqlserverBasicInstanceId,
Password: pulumi.String("Qwer@234"),
IsAdmin: pulumi.Bool(true),
})
if err != nil {
return err
}
dstSqlserverAccount, err := tencentcloud.NewSqlserverAccount(ctx, "dstSqlserverAccount", &tencentcloud.SqlserverAccountArgs{
InstanceId: dstExample.SqlserverBasicInstanceId,
Password: pulumi.String("Qwer@234"),
IsAdmin: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = tencentcloud.NewSqlserverAccountDbAttachment(ctx, "srcSqlserverAccountDbAttachment", &tencentcloud.SqlserverAccountDbAttachmentArgs{
InstanceId: srcExample.SqlserverBasicInstanceId,
AccountName: srcSqlserverAccount.Name,
DbName: srcSqlserverDb.Name,
Privilege: pulumi.String("ReadWrite"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewSqlserverAccountDbAttachment(ctx, "dstSqlserverAccountDbAttachment", &tencentcloud.SqlserverAccountDbAttachmentArgs{
InstanceId: dstExample.SqlserverBasicInstanceId,
AccountName: dstSqlserverAccount.Name,
DbName: dstSqlserverDb.Name,
Privilege: pulumi.String("ReadWrite"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewSqlserverMigration(ctx, "migration", &tencentcloud.SqlserverMigrationArgs{
MigrateName: pulumi.String("tf_test_migration"),
MigrateType: pulumi.Float64(1),
SourceType: pulumi.Float64(1),
Source: &tencentcloud.SqlserverMigrationSourceArgs{
InstanceId: srcExample.SqlserverBasicInstanceId,
UserName: srcSqlserverAccount.Name,
Password: srcSqlserverAccount.Password,
},
Target: &tencentcloud.SqlserverMigrationTargetArgs{
InstanceId: dstExample.SqlserverBasicInstanceId,
UserName: dstSqlserverAccount.Name,
Password: dstSqlserverAccount.Password,
},
MigrateDbSets: tencentcloud.SqlserverMigrationMigrateDbSetArray{
&tencentcloud.SqlserverMigrationMigrateDbSetArgs{
DbName: srcSqlserverDb.Name,
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var zones = Tencentcloud.GetAvailabilityZonesByProduct.Invoke(new()
{
Product = "sqlserver",
});
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
var subnet = new Tencentcloud.Subnet("subnet", new()
{
AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[4]?.Name),
VpcId = vpc.VpcId,
CidrBlock = "10.0.0.0/16",
IsMulticast = false,
});
var securityGroup = new Tencentcloud.SecurityGroup("securityGroup", new()
{
Description = "desc.",
});
var srcExample = new Tencentcloud.SqlserverBasicInstance("srcExample", new()
{
AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[4]?.Name),
ChargeType = "POSTPAID_BY_HOUR",
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
ProjectId = 0,
Memory = 4,
Storage = 100,
Cpu = 2,
MachineType = "CLOUD_PREMIUM",
MaintenanceWeekSets = new[]
{
1,
2,
3,
},
MaintenanceStartTime = "09:00",
MaintenanceTimeSpan = 3,
SecurityGroups = new[]
{
securityGroup.SecurityGroupId,
},
Tags =
{
{ "test", "test" },
},
});
var dstExample = new Tencentcloud.SqlserverBasicInstance("dstExample", new()
{
AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[4]?.Name),
ChargeType = "POSTPAID_BY_HOUR",
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
ProjectId = 0,
Memory = 4,
Storage = 100,
Cpu = 2,
MachineType = "CLOUD_PREMIUM",
MaintenanceWeekSets = new[]
{
1,
2,
3,
},
MaintenanceStartTime = "09:00",
MaintenanceTimeSpan = 3,
SecurityGroups = new[]
{
securityGroup.SecurityGroupId,
},
Tags =
{
{ "test", "test" },
},
});
var srcSqlserverDb = new Tencentcloud.SqlserverDb("srcSqlserverDb", new()
{
InstanceId = srcExample.SqlserverBasicInstanceId,
Charset = "Chinese_PRC_BIN",
Remark = "testACC-remark",
});
var dstSqlserverDb = new Tencentcloud.SqlserverDb("dstSqlserverDb", new()
{
InstanceId = dstExample.SqlserverBasicInstanceId,
Charset = "Chinese_PRC_BIN",
Remark = "testACC-remark",
});
var srcSqlserverAccount = new Tencentcloud.SqlserverAccount("srcSqlserverAccount", new()
{
InstanceId = srcExample.SqlserverBasicInstanceId,
Password = "Qwer@234",
IsAdmin = true,
});
var dstSqlserverAccount = new Tencentcloud.SqlserverAccount("dstSqlserverAccount", new()
{
InstanceId = dstExample.SqlserverBasicInstanceId,
Password = "Qwer@234",
IsAdmin = true,
});
var srcSqlserverAccountDbAttachment = new Tencentcloud.SqlserverAccountDbAttachment("srcSqlserverAccountDbAttachment", new()
{
InstanceId = srcExample.SqlserverBasicInstanceId,
AccountName = srcSqlserverAccount.Name,
DbName = srcSqlserverDb.Name,
Privilege = "ReadWrite",
});
var dstSqlserverAccountDbAttachment = new Tencentcloud.SqlserverAccountDbAttachment("dstSqlserverAccountDbAttachment", new()
{
InstanceId = dstExample.SqlserverBasicInstanceId,
AccountName = dstSqlserverAccount.Name,
DbName = dstSqlserverDb.Name,
Privilege = "ReadWrite",
});
var migration = new Tencentcloud.SqlserverMigration("migration", new()
{
MigrateName = "tf_test_migration",
MigrateType = 1,
SourceType = 1,
Source = new Tencentcloud.Inputs.SqlserverMigrationSourceArgs
{
InstanceId = srcExample.SqlserverBasicInstanceId,
UserName = srcSqlserverAccount.Name,
Password = srcSqlserverAccount.Password,
},
Target = new Tencentcloud.Inputs.SqlserverMigrationTargetArgs
{
InstanceId = dstExample.SqlserverBasicInstanceId,
UserName = dstSqlserverAccount.Name,
Password = dstSqlserverAccount.Password,
},
MigrateDbSets = new[]
{
new Tencentcloud.Inputs.SqlserverMigrationMigrateDbSetArgs
{
DbName = srcSqlserverDb.Name,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetAvailabilityZonesByProductArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.SqlserverBasicInstance;
import com.pulumi.tencentcloud.SqlserverBasicInstanceArgs;
import com.pulumi.tencentcloud.SqlserverDb;
import com.pulumi.tencentcloud.SqlserverDbArgs;
import com.pulumi.tencentcloud.SqlserverAccount;
import com.pulumi.tencentcloud.SqlserverAccountArgs;
import com.pulumi.tencentcloud.SqlserverAccountDbAttachment;
import com.pulumi.tencentcloud.SqlserverAccountDbAttachmentArgs;
import com.pulumi.tencentcloud.SqlserverMigration;
import com.pulumi.tencentcloud.SqlserverMigrationArgs;
import com.pulumi.tencentcloud.inputs.SqlserverMigrationSourceArgs;
import com.pulumi.tencentcloud.inputs.SqlserverMigrationTargetArgs;
import com.pulumi.tencentcloud.inputs.SqlserverMigrationMigrateDbSetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var zones = TencentcloudFunctions.getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs.builder()
.product("sqlserver")
.build());
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
var subnet = new Subnet("subnet", SubnetArgs.builder()
.availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[4].name()))
.vpcId(vpc.vpcId())
.cidrBlock("10.0.0.0/16")
.isMulticast(false)
.build());
var securityGroup = new SecurityGroup("securityGroup", SecurityGroupArgs.builder()
.description("desc.")
.build());
var srcExample = new SqlserverBasicInstance("srcExample", SqlserverBasicInstanceArgs.builder()
.availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[4].name()))
.chargeType("POSTPAID_BY_HOUR")
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.projectId(0)
.memory(4)
.storage(100)
.cpu(2)
.machineType("CLOUD_PREMIUM")
.maintenanceWeekSets(
1,
2,
3)
.maintenanceStartTime("09:00")
.maintenanceTimeSpan(3)
.securityGroups(securityGroup.securityGroupId())
.tags(Map.of("test", "test"))
.build());
var dstExample = new SqlserverBasicInstance("dstExample", SqlserverBasicInstanceArgs.builder()
.availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[4].name()))
.chargeType("POSTPAID_BY_HOUR")
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.projectId(0)
.memory(4)
.storage(100)
.cpu(2)
.machineType("CLOUD_PREMIUM")
.maintenanceWeekSets(
1,
2,
3)
.maintenanceStartTime("09:00")
.maintenanceTimeSpan(3)
.securityGroups(securityGroup.securityGroupId())
.tags(Map.of("test", "test"))
.build());
var srcSqlserverDb = new SqlserverDb("srcSqlserverDb", SqlserverDbArgs.builder()
.instanceId(srcExample.sqlserverBasicInstanceId())
.charset("Chinese_PRC_BIN")
.remark("testACC-remark")
.build());
var dstSqlserverDb = new SqlserverDb("dstSqlserverDb", SqlserverDbArgs.builder()
.instanceId(dstExample.sqlserverBasicInstanceId())
.charset("Chinese_PRC_BIN")
.remark("testACC-remark")
.build());
var srcSqlserverAccount = new SqlserverAccount("srcSqlserverAccount", SqlserverAccountArgs.builder()
.instanceId(srcExample.sqlserverBasicInstanceId())
.password("Qwer@234")
.isAdmin(true)
.build());
var dstSqlserverAccount = new SqlserverAccount("dstSqlserverAccount", SqlserverAccountArgs.builder()
.instanceId(dstExample.sqlserverBasicInstanceId())
.password("Qwer@234")
.isAdmin(true)
.build());
var srcSqlserverAccountDbAttachment = new SqlserverAccountDbAttachment("srcSqlserverAccountDbAttachment", SqlserverAccountDbAttachmentArgs.builder()
.instanceId(srcExample.sqlserverBasicInstanceId())
.accountName(srcSqlserverAccount.name())
.dbName(srcSqlserverDb.name())
.privilege("ReadWrite")
.build());
var dstSqlserverAccountDbAttachment = new SqlserverAccountDbAttachment("dstSqlserverAccountDbAttachment", SqlserverAccountDbAttachmentArgs.builder()
.instanceId(dstExample.sqlserverBasicInstanceId())
.accountName(dstSqlserverAccount.name())
.dbName(dstSqlserverDb.name())
.privilege("ReadWrite")
.build());
var migration = new SqlserverMigration("migration", SqlserverMigrationArgs.builder()
.migrateName("tf_test_migration")
.migrateType(1)
.sourceType(1)
.source(SqlserverMigrationSourceArgs.builder()
.instanceId(srcExample.sqlserverBasicInstanceId())
.userName(srcSqlserverAccount.name())
.password(srcSqlserverAccount.password())
.build())
.target(SqlserverMigrationTargetArgs.builder()
.instanceId(dstExample.sqlserverBasicInstanceId())
.userName(dstSqlserverAccount.name())
.password(dstSqlserverAccount.password())
.build())
.migrateDbSets(SqlserverMigrationMigrateDbSetArgs.builder()
.dbName(srcSqlserverDb.name())
.build())
.build());
}
}
resources:
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
subnet:
type: tencentcloud:Subnet
properties:
availabilityZone: ${zones.zones[4].name}
vpcId: ${vpc.vpcId}
cidrBlock: 10.0.0.0/16
isMulticast: false
securityGroup:
type: tencentcloud:SecurityGroup
properties:
description: desc.
srcExample:
type: tencentcloud:SqlserverBasicInstance
properties:
availabilityZone: ${zones.zones[4].name}
chargeType: POSTPAID_BY_HOUR
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
projectId: 0
memory: 4
storage: 100
cpu: 2
machineType: CLOUD_PREMIUM
maintenanceWeekSets:
- 1
- 2
- 3
maintenanceStartTime: 09:00
maintenanceTimeSpan: 3
securityGroups:
- ${securityGroup.securityGroupId}
tags:
test: test
dstExample:
type: tencentcloud:SqlserverBasicInstance
properties:
availabilityZone: ${zones.zones[4].name}
chargeType: POSTPAID_BY_HOUR
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
projectId: 0
memory: 4
storage: 100
cpu: 2
machineType: CLOUD_PREMIUM
maintenanceWeekSets:
- 1
- 2
- 3
maintenanceStartTime: 09:00
maintenanceTimeSpan: 3
securityGroups:
- ${securityGroup.securityGroupId}
tags:
test: test
srcSqlserverDb:
type: tencentcloud:SqlserverDb
properties:
instanceId: ${srcExample.sqlserverBasicInstanceId}
charset: Chinese_PRC_BIN
remark: testACC-remark
dstSqlserverDb:
type: tencentcloud:SqlserverDb
properties:
instanceId: ${dstExample.sqlserverBasicInstanceId}
charset: Chinese_PRC_BIN
remark: testACC-remark
srcSqlserverAccount:
type: tencentcloud:SqlserverAccount
properties:
instanceId: ${srcExample.sqlserverBasicInstanceId}
password: Qwer@234
isAdmin: true
dstSqlserverAccount:
type: tencentcloud:SqlserverAccount
properties:
instanceId: ${dstExample.sqlserverBasicInstanceId}
password: Qwer@234
isAdmin: true
srcSqlserverAccountDbAttachment:
type: tencentcloud:SqlserverAccountDbAttachment
properties:
instanceId: ${srcExample.sqlserverBasicInstanceId}
accountName: ${srcSqlserverAccount.name}
dbName: ${srcSqlserverDb.name}
privilege: ReadWrite
dstSqlserverAccountDbAttachment:
type: tencentcloud:SqlserverAccountDbAttachment
properties:
instanceId: ${dstExample.sqlserverBasicInstanceId}
accountName: ${dstSqlserverAccount.name}
dbName: ${dstSqlserverDb.name}
privilege: ReadWrite
migration:
type: tencentcloud:SqlserverMigration
properties:
migrateName: tf_test_migration
migrateType: 1
sourceType: 1
source:
instanceId: ${srcExample.sqlserverBasicInstanceId}
userName: ${srcSqlserverAccount.name}
password: ${srcSqlserverAccount.password}
target:
instanceId: ${dstExample.sqlserverBasicInstanceId}
userName: ${dstSqlserverAccount.name}
password: ${dstSqlserverAccount.password}
migrateDbSets:
- dbName: ${srcSqlserverDb.name}
variables:
zones:
fn::invoke:
function: tencentcloud:getAvailabilityZonesByProduct
arguments:
product: sqlserver
Create SqlserverMigration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SqlserverMigration(name: string, args: SqlserverMigrationArgs, opts?: CustomResourceOptions);
@overload
def SqlserverMigration(resource_name: str,
args: SqlserverMigrationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SqlserverMigration(resource_name: str,
opts: Optional[ResourceOptions] = None,
migrate_name: Optional[str] = None,
migrate_type: Optional[float] = None,
source: Optional[SqlserverMigrationSourceArgs] = None,
source_type: Optional[float] = None,
target: Optional[SqlserverMigrationTargetArgs] = None,
migrate_db_sets: Optional[Sequence[SqlserverMigrationMigrateDbSetArgs]] = None,
rename_restores: Optional[Sequence[SqlserverMigrationRenameRestoreArgs]] = None,
sqlserver_migration_id: Optional[str] = None)
func NewSqlserverMigration(ctx *Context, name string, args SqlserverMigrationArgs, opts ...ResourceOption) (*SqlserverMigration, error)
public SqlserverMigration(string name, SqlserverMigrationArgs args, CustomResourceOptions? opts = null)
public SqlserverMigration(String name, SqlserverMigrationArgs args)
public SqlserverMigration(String name, SqlserverMigrationArgs args, CustomResourceOptions options)
type: tencentcloud:SqlserverMigration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SqlserverMigrationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SqlserverMigrationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SqlserverMigrationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SqlserverMigrationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SqlserverMigrationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SqlserverMigration Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SqlserverMigration resource accepts the following input properties:
- Migrate
Name string - Name of the migration task.
- Migrate
Type double - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- Source
Sqlserver
Migration Source - Migration source.
- Source
Type double - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- Target
Sqlserver
Migration Target - Migration target.
- Migrate
Db List<SqlserverSets Migration Migrate Db Set> - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- Rename
Restores List<SqlserverMigration Rename Restore> - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- Sqlserver
Migration stringId - ID of the resource.
- Migrate
Name string - Name of the migration task.
- Migrate
Type float64 - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- Source
Sqlserver
Migration Source Args - Migration source.
- Source
Type float64 - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- Target
Sqlserver
Migration Target Args - Migration target.
- Migrate
Db []SqlserverSets Migration Migrate Db Set Args - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- Rename
Restores []SqlserverMigration Rename Restore Args - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- Sqlserver
Migration stringId - ID of the resource.
- migrate
Name String - Name of the migration task.
- migrate
Type Double - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- source
Sqlserver
Migration Source - Migration source.
- source
Type Double - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- target
Sqlserver
Migration Target - Migration target.
- migrate
Db List<SqlserverSets Migration Migrate Db Set> - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- rename
Restores List<SqlserverMigration Rename Restore> - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- sqlserver
Migration StringId - ID of the resource.
- migrate
Name string - Name of the migration task.
- migrate
Type number - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- source
Sqlserver
Migration Source - Migration source.
- source
Type number - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- target
Sqlserver
Migration Target - Migration target.
- migrate
Db SqlserverSets Migration Migrate Db Set[] - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- rename
Restores SqlserverMigration Rename Restore[] - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- sqlserver
Migration stringId - ID of the resource.
- migrate_
name str - Name of the migration task.
- migrate_
type float - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- source
Sqlserver
Migration Source Args - Migration source.
- source_
type float - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- target
Sqlserver
Migration Target Args - Migration target.
- migrate_
db_ Sequence[Sqlserversets Migration Migrate Db Set Args] - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- rename_
restores Sequence[SqlserverMigration Rename Restore Args] - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- sqlserver_
migration_ strid - ID of the resource.
- migrate
Name String - Name of the migration task.
- migrate
Type Number - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- source Property Map
- Migration source.
- source
Type Number - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- target Property Map
- Migration target.
- migrate
Db List<Property Map>Sets - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- rename
Restores List<Property Map> - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- sqlserver
Migration StringId - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the SqlserverMigration resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SqlserverMigration Resource
Get an existing SqlserverMigration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SqlserverMigrationState, opts?: CustomResourceOptions): SqlserverMigration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
migrate_db_sets: Optional[Sequence[SqlserverMigrationMigrateDbSetArgs]] = None,
migrate_name: Optional[str] = None,
migrate_type: Optional[float] = None,
rename_restores: Optional[Sequence[SqlserverMigrationRenameRestoreArgs]] = None,
source: Optional[SqlserverMigrationSourceArgs] = None,
source_type: Optional[float] = None,
sqlserver_migration_id: Optional[str] = None,
target: Optional[SqlserverMigrationTargetArgs] = None) -> SqlserverMigration
func GetSqlserverMigration(ctx *Context, name string, id IDInput, state *SqlserverMigrationState, opts ...ResourceOption) (*SqlserverMigration, error)
public static SqlserverMigration Get(string name, Input<string> id, SqlserverMigrationState? state, CustomResourceOptions? opts = null)
public static SqlserverMigration get(String name, Output<String> id, SqlserverMigrationState state, CustomResourceOptions options)
resources: _: type: tencentcloud:SqlserverMigration get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Migrate
Db List<SqlserverSets Migration Migrate Db Set> - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- Migrate
Name string - Name of the migration task.
- Migrate
Type double - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- Rename
Restores List<SqlserverMigration Rename Restore> - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- Source
Sqlserver
Migration Source - Migration source.
- Source
Type double - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- Sqlserver
Migration stringId - ID of the resource.
- Target
Sqlserver
Migration Target - Migration target.
- Migrate
Db []SqlserverSets Migration Migrate Db Set Args - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- Migrate
Name string - Name of the migration task.
- Migrate
Type float64 - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- Rename
Restores []SqlserverMigration Rename Restore Args - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- Source
Sqlserver
Migration Source Args - Migration source.
- Source
Type float64 - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- Sqlserver
Migration stringId - ID of the resource.
- Target
Sqlserver
Migration Target Args - Migration target.
- migrate
Db List<SqlserverSets Migration Migrate Db Set> - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- migrate
Name String - Name of the migration task.
- migrate
Type Double - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- rename
Restores List<SqlserverMigration Rename Restore> - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- source
Sqlserver
Migration Source - Migration source.
- source
Type Double - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- sqlserver
Migration StringId - ID of the resource.
- target
Sqlserver
Migration Target - Migration target.
- migrate
Db SqlserverSets Migration Migrate Db Set[] - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- migrate
Name string - Name of the migration task.
- migrate
Type number - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- rename
Restores SqlserverMigration Rename Restore[] - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- source
Sqlserver
Migration Source - Migration source.
- source
Type number - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- sqlserver
Migration stringId - ID of the resource.
- target
Sqlserver
Migration Target - Migration target.
- migrate_
db_ Sequence[Sqlserversets Migration Migrate Db Set Args] - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- migrate_
name str - Name of the migration task.
- migrate_
type float - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- rename_
restores Sequence[SqlserverMigration Rename Restore Args] - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- source
Sqlserver
Migration Source Args - Migration source.
- source_
type float - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- sqlserver_
migration_ strid - ID of the resource.
- target
Sqlserver
Migration Target Args - Migration target.
- migrate
Db List<Property Map>Sets - Migrate DB objects. Offline migration is not used (SourceType=4 or SourceType=5).
- migrate
Name String - Name of the migration task.
- migrate
Type Number - Migration type (1 structure migration 2 data migration 3 incremental synchronization).
- rename
Restores List<Property Map> - Restore and rename the database in ReNameRestoreDatabase. If it is not filled in, the restored database will be named by default and all databases will be restored. Valid if SourceType=5.
- source Property Map
- Migration source.
- source
Type Number - Type of migration source 1 TencentDB for SQLServer 2 Cloud server self-built SQLServer database 4 SQLServer backup and restore 5 SQLServer backup and restore (COS mode).
- sqlserver
Migration StringId - ID of the resource.
- target Property Map
- Migration target.
Supporting Types
SqlserverMigrationMigrateDbSet, SqlserverMigrationMigrateDbSetArgs
- Db
Name string - Name of the migration database.
- Db
Name string - Name of the migration database.
- db
Name String - Name of the migration database.
- db
Name string - Name of the migration database.
- db_
name str - Name of the migration database.
- db
Name String - Name of the migration database.
SqlserverMigrationRenameRestore, SqlserverMigrationRenameRestoreArgs
- New
Name string - When the new name of the library is used for offline migration, if it is not filled in, it will be named according to OldName. OldName and NewName cannot be filled in at the same time. OldName and NewName must be filled in and cannot be duplicate when used for cloning database.
- Old
Name string - The name of the library. If oldName does not exist, a failure is returned.It can be left blank when used for offline migration tasks.
- New
Name string - When the new name of the library is used for offline migration, if it is not filled in, it will be named according to OldName. OldName and NewName cannot be filled in at the same time. OldName and NewName must be filled in and cannot be duplicate when used for cloning database.
- Old
Name string - The name of the library. If oldName does not exist, a failure is returned.It can be left blank when used for offline migration tasks.
- new
Name String - When the new name of the library is used for offline migration, if it is not filled in, it will be named according to OldName. OldName and NewName cannot be filled in at the same time. OldName and NewName must be filled in and cannot be duplicate when used for cloning database.
- old
Name String - The name of the library. If oldName does not exist, a failure is returned.It can be left blank when used for offline migration tasks.
- new
Name string - When the new name of the library is used for offline migration, if it is not filled in, it will be named according to OldName. OldName and NewName cannot be filled in at the same time. OldName and NewName must be filled in and cannot be duplicate when used for cloning database.
- old
Name string - The name of the library. If oldName does not exist, a failure is returned.It can be left blank when used for offline migration tasks.
- new_
name str - When the new name of the library is used for offline migration, if it is not filled in, it will be named according to OldName. OldName and NewName cannot be filled in at the same time. OldName and NewName must be filled in and cannot be duplicate when used for cloning database.
- old_
name str - The name of the library. If oldName does not exist, a failure is returned.It can be left blank when used for offline migration tasks.
- new
Name String - When the new name of the library is used for offline migration, if it is not filled in, it will be named according to OldName. OldName and NewName cannot be filled in at the same time. OldName and NewName must be filled in and cannot be duplicate when used for cloning database.
- old
Name String - The name of the library. If oldName does not exist, a failure is returned.It can be left blank when used for offline migration tasks.
SqlserverMigrationSource, SqlserverMigrationSourceArgs
- Cvm
Id string - ID of the migration source Cvm, used when MigrateType=2 (cloud server self-built SQL Server database).
- Instance
Id string - The ID of the migration source instance, which is used when MigrateType=1 (TencentDB for SQLServers). The format is mssql-si2823jyl.
- Ip string
- Migrate the intranet IP of the self-built database of the source Cvm, and use it when MigrateType=2 (self-built SQL Server database of the cloud server).
- Password string
- Password, MigrateType=1 or MigrateType=2.
- Port double
- The port number of the self-built database of the migration source Cvm, which is used when MigrateType=2 (self-built SQL Server database of the cloud server).
- Subnet
Id string - The subnet ID under the Vpc of the source Cvm is used when MigrateType=2 (ECS self-built SQL Server database). The format is as follows subnet-h9extioi.
- Url
Password string - The source backup password for offline migration, MigrateType=4 or MigrateType=5.
- Urls List<string>
- The source backup address for offline migration. MigrateType=4 or MigrateType=5.
- User
Name string - User name, MigrateType=1 or MigrateType=2.
- Vpc
Id string - The Vpc network ID of the migration source Cvm is used when MigrateType=2 (cloud server self-built SQL Server database). The format is as follows vpc-6ys9ont9.
- Cvm
Id string - ID of the migration source Cvm, used when MigrateType=2 (cloud server self-built SQL Server database).
- Instance
Id string - The ID of the migration source instance, which is used when MigrateType=1 (TencentDB for SQLServers). The format is mssql-si2823jyl.
- Ip string
- Migrate the intranet IP of the self-built database of the source Cvm, and use it when MigrateType=2 (self-built SQL Server database of the cloud server).
- Password string
- Password, MigrateType=1 or MigrateType=2.
- Port float64
- The port number of the self-built database of the migration source Cvm, which is used when MigrateType=2 (self-built SQL Server database of the cloud server).
- Subnet
Id string - The subnet ID under the Vpc of the source Cvm is used when MigrateType=2 (ECS self-built SQL Server database). The format is as follows subnet-h9extioi.
- Url
Password string - The source backup password for offline migration, MigrateType=4 or MigrateType=5.
- Urls []string
- The source backup address for offline migration. MigrateType=4 or MigrateType=5.
- User
Name string - User name, MigrateType=1 or MigrateType=2.
- Vpc
Id string - The Vpc network ID of the migration source Cvm is used when MigrateType=2 (cloud server self-built SQL Server database). The format is as follows vpc-6ys9ont9.
- cvm
Id String - ID of the migration source Cvm, used when MigrateType=2 (cloud server self-built SQL Server database).
- instance
Id String - The ID of the migration source instance, which is used when MigrateType=1 (TencentDB for SQLServers). The format is mssql-si2823jyl.
- ip String
- Migrate the intranet IP of the self-built database of the source Cvm, and use it when MigrateType=2 (self-built SQL Server database of the cloud server).
- password String
- Password, MigrateType=1 or MigrateType=2.
- port Double
- The port number of the self-built database of the migration source Cvm, which is used when MigrateType=2 (self-built SQL Server database of the cloud server).
- subnet
Id String - The subnet ID under the Vpc of the source Cvm is used when MigrateType=2 (ECS self-built SQL Server database). The format is as follows subnet-h9extioi.
- url
Password String - The source backup password for offline migration, MigrateType=4 or MigrateType=5.
- urls List<String>
- The source backup address for offline migration. MigrateType=4 or MigrateType=5.
- user
Name String - User name, MigrateType=1 or MigrateType=2.
- vpc
Id String - The Vpc network ID of the migration source Cvm is used when MigrateType=2 (cloud server self-built SQL Server database). The format is as follows vpc-6ys9ont9.
- cvm
Id string - ID of the migration source Cvm, used when MigrateType=2 (cloud server self-built SQL Server database).
- instance
Id string - The ID of the migration source instance, which is used when MigrateType=1 (TencentDB for SQLServers). The format is mssql-si2823jyl.
- ip string
- Migrate the intranet IP of the self-built database of the source Cvm, and use it when MigrateType=2 (self-built SQL Server database of the cloud server).
- password string
- Password, MigrateType=1 or MigrateType=2.
- port number
- The port number of the self-built database of the migration source Cvm, which is used when MigrateType=2 (self-built SQL Server database of the cloud server).
- subnet
Id string - The subnet ID under the Vpc of the source Cvm is used when MigrateType=2 (ECS self-built SQL Server database). The format is as follows subnet-h9extioi.
- url
Password string - The source backup password for offline migration, MigrateType=4 or MigrateType=5.
- urls string[]
- The source backup address for offline migration. MigrateType=4 or MigrateType=5.
- user
Name string - User name, MigrateType=1 or MigrateType=2.
- vpc
Id string - The Vpc network ID of the migration source Cvm is used when MigrateType=2 (cloud server self-built SQL Server database). The format is as follows vpc-6ys9ont9.
- cvm_
id str - ID of the migration source Cvm, used when MigrateType=2 (cloud server self-built SQL Server database).
- instance_
id str - The ID of the migration source instance, which is used when MigrateType=1 (TencentDB for SQLServers). The format is mssql-si2823jyl.
- ip str
- Migrate the intranet IP of the self-built database of the source Cvm, and use it when MigrateType=2 (self-built SQL Server database of the cloud server).
- password str
- Password, MigrateType=1 or MigrateType=2.
- port float
- The port number of the self-built database of the migration source Cvm, which is used when MigrateType=2 (self-built SQL Server database of the cloud server).
- subnet_
id str - The subnet ID under the Vpc of the source Cvm is used when MigrateType=2 (ECS self-built SQL Server database). The format is as follows subnet-h9extioi.
- url_
password str - The source backup password for offline migration, MigrateType=4 or MigrateType=5.
- urls Sequence[str]
- The source backup address for offline migration. MigrateType=4 or MigrateType=5.
- user_
name str - User name, MigrateType=1 or MigrateType=2.
- vpc_
id str - The Vpc network ID of the migration source Cvm is used when MigrateType=2 (cloud server self-built SQL Server database). The format is as follows vpc-6ys9ont9.
- cvm
Id String - ID of the migration source Cvm, used when MigrateType=2 (cloud server self-built SQL Server database).
- instance
Id String - The ID of the migration source instance, which is used when MigrateType=1 (TencentDB for SQLServers). The format is mssql-si2823jyl.
- ip String
- Migrate the intranet IP of the self-built database of the source Cvm, and use it when MigrateType=2 (self-built SQL Server database of the cloud server).
- password String
- Password, MigrateType=1 or MigrateType=2.
- port Number
- The port number of the self-built database of the migration source Cvm, which is used when MigrateType=2 (self-built SQL Server database of the cloud server).
- subnet
Id String - The subnet ID under the Vpc of the source Cvm is used when MigrateType=2 (ECS self-built SQL Server database). The format is as follows subnet-h9extioi.
- url
Password String - The source backup password for offline migration, MigrateType=4 or MigrateType=5.
- urls List<String>
- The source backup address for offline migration. MigrateType=4 or MigrateType=5.
- user
Name String - User name, MigrateType=1 or MigrateType=2.
- vpc
Id String - The Vpc network ID of the migration source Cvm is used when MigrateType=2 (cloud server self-built SQL Server database). The format is as follows vpc-6ys9ont9.
SqlserverMigrationTarget, SqlserverMigrationTargetArgs
- Instance
Id string - The ID of the migration target instance, in the format mssql-si2823jyl.
- Password string
- Password of the migration target instance.
- User
Name string - User name of the migration target instance.
- Instance
Id string - The ID of the migration target instance, in the format mssql-si2823jyl.
- Password string
- Password of the migration target instance.
- User
Name string - User name of the migration target instance.
- instance
Id String - The ID of the migration target instance, in the format mssql-si2823jyl.
- password String
- Password of the migration target instance.
- user
Name String - User name of the migration target instance.
- instance
Id string - The ID of the migration target instance, in the format mssql-si2823jyl.
- password string
- Password of the migration target instance.
- user
Name string - User name of the migration target instance.
- instance_
id str - The ID of the migration target instance, in the format mssql-si2823jyl.
- password str
- Password of the migration target instance.
- user_
name str - User name of the migration target instance.
- instance
Id String - The ID of the migration target instance, in the format mssql-si2823jyl.
- password String
- Password of the migration target instance.
- user
Name String - User name of the migration target instance.
Import
sqlserver migration can be imported using the id, e.g.
$ pulumi import tencentcloud:index/sqlserverMigration:SqlserverMigration migration migration_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.