Skip to content
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
6 changes: 6 additions & 0 deletions src/Compute/Compute.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Accounts", "..\Accounts\Acc
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KeyVault", "..\KeyVault\KeyVault\KeyVault.csproj", "{9FFC40CC-A341-4D0C-A25D-DC6B78EF6C94}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManagedServiceIdentity", "..\ManagedServiceIdentity\ManagedServiceIdentity.csproj", "{228EB071-FA04-43B3-95F9-7D76DBF0B850}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this because compute is using cmdlets from Az.ManagedServiceIdentity in their tests.

EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{3E016018-D65D-4336-9F64-17DA97783AD0}"
Expand Down Expand Up @@ -48,6 +50,10 @@ Global
{9FFC40CC-A341-4D0C-A25D-DC6B78EF6C94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9FFC40CC-A341-4D0C-A25D-DC6B78EF6C94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9FFC40CC-A341-4D0C-A25D-DC6B78EF6C94}.Release|Any CPU.Build.0 = Release|Any CPU
{228EB071-FA04-43B3-95F9-7D76DBF0B850}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{228EB071-FA04-43B3-95F9-7D76DBF0B850}.Debug|Any CPU.Build.0 = Debug|Any CPU
{228EB071-FA04-43B3-95F9-7D76DBF0B850}.Release|Any CPU.ActiveCfg = Release|Any CPU
{228EB071-FA04-43B3-95F9-7D76DBF0B850}.Release|Any CPU.Build.0 = Release|Any CPU
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
2 changes: 2 additions & 0 deletions src/KeyVault/KeyVault/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
-->
## Upcoming Release

* Added breaking change attributes to `New-AzKeyVault`

## Version 1.5.1
* Fixed duplicated text for Add-AzKeyVaultKey.md

Expand Down
38 changes: 21 additions & 17 deletions src/KeyVault/KeyVault/Commands/NewAzureKeyVault.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Microsoft.Azure.Commands.KeyVault.Properties;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Management.KeyVault.Models;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using System;
using System.Collections;
using System.Management.Automation;
Expand All @@ -25,7 +26,8 @@ namespace Microsoft.Azure.Commands.KeyVault
/// <summary>
/// Create a new key vault.
/// </summary>
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "KeyVault",SupportsShouldProcess = true)]
[GenericBreakingChange("Soft delete and purge protection will be enabled by default.", "2.0.0")]
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "KeyVault", SupportsShouldProcess = true)]
[OutputType(typeof(PSKeyVault))]
public class NewAzureKeyVault : KeyVaultManagementCmdletBase
{
Expand Down Expand Up @@ -81,11 +83,13 @@ public class NewAzureKeyVault : KeyVaultManagementCmdletBase
HelpMessage = "If specified, enables secrets to be retrieved from this key vault by Azure Disk Encryption.")]
public SwitchParameter EnabledForDiskEncryption { get; set; }

[CmdletParameterBreakingChange(nameof(EnableSoftDelete), ChangeDescription = "Soft delete will be enabled by default. We will add an option `-DisableSoftDelete` to disable it.")]
[Parameter(Mandatory = false,
ValueFromPipelineByPropertyName = false,
HelpMessage = "If specified, 'soft delete' functionality is enabled for this key vault.")]
public SwitchParameter EnableSoftDelete { get; set; }

[CmdletParameterBreakingChange(nameof(EnablePurgeProtection), ChangeDescription = "Purge protection will be enabled by default. We will add an option `-DisablePurgeProtection` to disable it.")]
[Parameter(Mandatory = false,
ValueFromPipelineByPropertyName = false,
HelpMessage = "If specified, protection against immediate deletion is enabled for this vault; requires soft delete to be enabled as well.")]
Expand Down Expand Up @@ -144,22 +148,22 @@ public override void ExecuteCmdlet()
}

var newVault = KeyVaultManagementClient.CreateNewVault(new VaultCreationParameters()
{
VaultName = this.Name,
ResourceGroupName = this.ResourceGroupName,
Location = this.Location,
EnabledForDeployment = this.EnabledForDeployment.IsPresent,
EnabledForTemplateDeployment = EnabledForTemplateDeployment.IsPresent,
EnabledForDiskEncryption = EnabledForDiskEncryption.IsPresent,
EnableSoftDelete = EnableSoftDelete.IsPresent,
EnablePurgeProtection = EnablePurgeProtection.IsPresent,
SkuFamilyName = DefaultSkuFamily,
SkuName = this.Sku,
TenantId = GetTenantId(),
AccessPolicy = accessPolicy,
NetworkAcls = new NetworkRuleSet(), // New key-vault takes in default network rule set
Tags = this.Tag
},
{
VaultName = this.Name,
ResourceGroupName = this.ResourceGroupName,
Location = this.Location,
EnabledForDeployment = this.EnabledForDeployment.IsPresent,
EnabledForTemplateDeployment = EnabledForTemplateDeployment.IsPresent,
EnabledForDiskEncryption = EnabledForDiskEncryption.IsPresent,
EnableSoftDelete = EnableSoftDelete.IsPresent,
EnablePurgeProtection = EnablePurgeProtection.IsPresent,
SkuFamilyName = DefaultSkuFamily,
SkuName = this.Sku,
TenantId = GetTenantId(),
AccessPolicy = accessPolicy,
NetworkAcls = new NetworkRuleSet(), // New key-vault takes in default network rule set
Tags = this.Tag
},
ActiveDirectoryClient);

this.WriteObject(newVault);
Expand Down
2 changes: 1 addition & 1 deletion src/KeyVault/KeyVault/help/Add-AzKeyVaultKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ Accept wildcard characters: False
Type: System.String
Parameter Sets: InteractiveImport, InputObjectImport, ResourceIdImport
Aliases:
Accepted values: HSM, Software, HSM, Software
Accepted values: HSM, Software

Required: False
Position: Named
Expand Down
6 changes: 3 additions & 3 deletions src/KeyVault/KeyVault/help/Get-AzKeyVault.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True
Accept wildcard characters: False
```

### -Tag
Expand Down Expand Up @@ -271,7 +271,7 @@ Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True
Accept wildcard characters: False
```

```yaml
Expand All @@ -283,7 +283,7 @@ Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True
Accept wildcard characters: False
```

### CommonParameters
Expand Down
4 changes: 2 additions & 2 deletions src/KeyVault/KeyVault/help/Get-AzKeyVaultCertificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Accept wildcard characters: False
```

```yaml
Expand All @@ -325,7 +325,7 @@ Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Accept wildcard characters: False
```

### -ResourceId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Accept wildcard characters: False
```

### -ResourceId
Expand Down
4 changes: 2 additions & 2 deletions src/KeyVault/KeyVault/help/Get-AzKeyVaultKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Accept wildcard characters: False
```

```yaml
Expand All @@ -335,7 +335,7 @@ Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Accept wildcard characters: False
```

### -ResourceId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Accept wildcard characters: False
```

### -DefaultProfile
Expand Down
4 changes: 2 additions & 2 deletions src/KeyVault/KeyVault/help/Get-AzKeyVaultSecret.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Accept wildcard characters: False
```

```yaml
Expand All @@ -358,7 +358,7 @@ Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Accept wildcard characters: False
```

### -ResourceId
Expand Down