Skip to content

Fix -Tags for New-AzureRmSqlDatabaseCopy #6049 #7531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ResourceManager/Sql/Commands.Sql/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
-->
## Current Release
* Fixed issue where some backup cmdlets would not recognize the current azure subscription
* Fixed issue where Tags were not being added correctly in New-AzureRmSqlDatabaseCopy

## Version 4.11.3
* Fixed issue with default resource groups not being set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,8 @@ internal AzureSqlDatabaseCopyModel CopyDatabaseWithNewSdk(string copyResourceGro
model.ElasticPoolName);

// Create copy of the database
var resp = ReplicationCommunicator.CreateCopy(copyResourceGroup, copyServerName, model.CopyDatabaseName, new Management.Sql.Models.Database
var resp = ReplicationCommunicator.CreateCopy(copyResourceGroup, copyServerName, model.CopyDatabaseName, new Management.Sql.Models.Database(model.CopyLocation, tags: model.Tags)
{
Location = model.CopyLocation,
CreateMode = Management.Sql.Models.CreateMode.Copy,
SourceDatabaseId = string.Format(AzureReplicationLinkModel.SourceIdTemplate, _subscription.Id.ToString(),
model.ResourceGroupName, model.ServerName, model.DatabaseName),
Expand Down