-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add DnsZonePartner Parameter for New-AzureRmSqlManagedInstance cmdlet #7458
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
Changes from 7 commits
b087567
f2e0ea0
983fbec
a8fc1c7
f57e6da
9dd9c95
b22b5f4
19d125d
1331415
961026e
05fef30
8bb302f
8bd4b91
eb145c8
2bda910
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,6 +121,18 @@ | |
| <LastGenOutput>Resources.Designer.cs</LastGenOutput> | ||
| </EmbeddedResource> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ziwa-msft please revert the change made in this file |
||
| <Reference Include="Microsoft.Azure.Management.Sql, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
| <HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.20.1-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath> | ||
| </Reference> | ||
| <Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
| <HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.14\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath> | ||
| </Reference> | ||
| <Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
| <HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.16\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath> | ||
| </Reference> | ||
| <Reference Include="System.Runtime" /> | ||
| </ItemGroup> | ||
| <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
| <Target Name="AfterBuild"> | ||
| <ItemGroup> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,8 +35,8 @@ | |
| <package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net452" /> | ||
| <package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net452" /> | ||
| <package id="Microsoft.PowerShell.5.ReferenceAssemblies" version="1.1.0" targetFramework="net452" /> | ||
| <package id="Microsoft.Rest.ClientRuntime" version="2.3.13" targetFramework="net452" /> | ||
| <package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.15" targetFramework="net452" /> | ||
| <package id="Microsoft.Rest.ClientRuntime" version="2.3.14" targetFramework="net452" /> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ziwa-msft please revert the change made in this file -- we have a separate PR open to update the version of ClientRuntime used throughout PowerShell |
||
| <package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.16" targetFramework="net452" /> | ||
| <package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.3.1" targetFramework="net452" /> | ||
| <package id="Microsoft.Rest.ClientRuntime.Azure.TestFramework" version="1.7.2" targetFramework="net452" /> | ||
| <package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net452" /> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,12 +53,18 @@ | |
| </Reference> | ||
| <Reference Include="Microsoft.Azure.Management.Sql, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
| <SpecificVersion>False</SpecificVersion> | ||
| <HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.20.0-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath> | ||
| <HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.20.1-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath> | ||
| <Private>True</Private> | ||
| </Reference> | ||
| <Reference Include="Microsoft.Azure.Management.Storage"> | ||
| <HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.2.4.0-preview\lib\net40\Microsoft.Azure.Management.Storage.dll</HintPath> | ||
| </Reference> | ||
| <Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ziwa-msft please remove these references to ClientRuntime added in this file |
||
| <HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.14\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath> | ||
| </Reference> | ||
| <Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
| <HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.16\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath> | ||
| </Reference> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Compile Include="Properties\AssemblyInfo.cs" /> | ||
|
|
@@ -67,6 +73,7 @@ | |
| <DesignTime>True</DesignTime> | ||
| <DependentUpon>Resources.resx</DependentUpon> | ||
| </Compile> | ||
| <Compile Include="ScenarioTests\ManagedInstanceCrudScenarioTests.cs" /> | ||
| <Compile Include="ScenarioTests\ManagedInstanceProtectorTests.cs" /> | ||
| <Compile Include="ScenarioTests\ManagedInstanceKeyVaultKeyTests.cs" /> | ||
| <Compile Include="ScenarioTests\TDECertificateTests.cs" /> | ||
|
|
@@ -89,6 +96,9 @@ | |
| <Compile Include="ScenarioTests\DatabaseReplicationTests.cs" /> | ||
| <Compile Include="ScenarioTests\DatabaseCrudTests.cs" /> | ||
| <Compile Include="ScenarioTests\DataMaskingTests.cs" /> | ||
| <None Include="ScenarioTests\ManagedInstanceCrudScenarioTests.ps1"> | ||
| <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
| </None> | ||
| <None Include="ScenarioTests\ManagedInstanceProtectorTests.ps1"> | ||
| <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
| </None> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,30 +22,31 @@ function Test-CreateManagedInstance | |
| { | ||
| # Setup | ||
| $rg = Create-ResourceGroupForTest | ||
|
|
||
| $rgName = "mi-wcus-demo-rg" | ||
| $managedInstanceName = Get-ManagedInstanceName | ||
| $version = "12.0" | ||
| $managedInstanceLogin = "dummylogin" | ||
| $managedInstancePassword = "Un53cuRE!" | ||
| $subnetId = "/subscriptions/ee5ea899-0791-418f-9270-77cd8273794b/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL" | ||
| $subnetId = "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/mi-wcus-demo-rg/providers/Microsoft.Network/virtualNetworks/mi-wcus-vnet/subnets/mi-subnet-managed-instances" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since MI is in GA now, can you please change this test to be fully automated? This includes creating the virtual network. Check out SQL virtual network firewall rules for an example. |
||
| $licenseType = "BasePrice" | ||
| $storageSizeInGB = 32 | ||
| $vCore = 16 | ||
| $skuName = "GP_Gen4" | ||
| $credentials = new-object System.Management.Automation.PSCredential($managedInstanceLogin, ($managedInstancePassword | ConvertTo-SecureString -asPlainText -Force)) | ||
| $dnsZonePartner = "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/mi-wcus-demo-rg/providers/Microsoft.Sql/managedInstances/milevamaric-pilot-gp-00" | ||
|
|
||
| try | ||
| { | ||
| # With SKU name specified | ||
| $job = New-AzureRmSqlManagedInstance -ResourceGroupName $rg.ResourceGroupName -Name $managedInstanceName ` | ||
| $job = New-AzureRmSqlManagedInstance -ResourceGroupName $rgName -Name $managedInstanceName ` | ||
| -Location $rg.Location -AdministratorCredential $credentials -SubnetId $subnetId ` | ||
| -LicenseType $licenseType -StorageSizeInGB $storageSizeInGB -Vcore $vCore -SkuName $skuName -AsJob | ||
| -LicenseType $licenseType -StorageSizeInGB $storageSizeInGB -Vcore $vCore -SkuName $skuName -DnsZonePartner $dnsZonePartner -AsJob | ||
| $job | Wait-Job | ||
| $managedInstance1 = $job.Output | ||
|
|
||
| Assert-AreEqual $managedInstance1.ManagedInstanceName $managedInstanceName | ||
| Assert-AreEqual $managedInstance1.Location $rg.Location | ||
| Assert-AreEqual $managedInstance1.ResourceGroupName $rg.ResourceGroupName | ||
| Assert-AreEqual $managedInstance1.ResourceGroupName $rgName | ||
| Assert-AreEqual $managedInstance1.Sku.Name $skuName | ||
| Assert-AreEqual $managedInstance1.AdministratorLogin $managedInstanceLogin | ||
| Assert-AreEqual $managedInstance1.SubnetId $subnetId | ||
|
|
@@ -59,15 +60,15 @@ function Test-CreateManagedInstance | |
| $managedInstanceName = Get-ManagedInstanceName | ||
|
|
||
| # With edition and computeGeneration specified | ||
| $job = New-AzureRmSqlManagedInstance -ResourceGroupName $rg.ResourceGroupName -Name $managedInstanceName ` | ||
| $job = New-AzureRmSqlManagedInstance -ResourceGroupName $rgName -Name $managedInstanceName ` | ||
| -Location $rg.Location -AdministratorCredential $credentials -SubnetId $subnetId ` | ||
| -LicenseType $licenseType -StorageSizeInGB $storageSizeInGB -Vcore $vCore -Edition $edition -ComputeGeneration $computeGeneration -AsJob | ||
| $job | Wait-Job | ||
| $managedInstance1 = $job.Output | ||
|
|
||
| Assert-AreEqual $managedInstance1.ManagedInstanceName $managedInstanceName | ||
| Assert-AreEqual $managedInstance1.Location $rg.Location | ||
| Assert-AreEqual $managedInstance1.ResourceGroupName $rg.ResourceGroupName | ||
| Assert-AreEqual $managedInstance1.ResourceGroupName $rgName | ||
| Assert-AreEqual $managedInstance1.Sku.Name $skuName | ||
| Assert-AreEqual $managedInstance1.AdministratorLogin $managedInstanceLogin | ||
| Assert-AreEqual $managedInstance1.SubnetId $subnetId | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that we should need to change Commands.Network or Commands.Profile . Were these changes intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was auto-generated due to the new package version. reverting now.