Skip to content

Add Managed HSM support to Application Gateway SSL certificate cmdlets#29418

Open
srijanee wants to merge 2 commits intoAzure:release-network-2025-07-01from
srijanee:feature/appgw-managed-hsm-ssl-cert
Open

Add Managed HSM support to Application Gateway SSL certificate cmdlets#29418
srijanee wants to merge 2 commits intoAzure:release-network-2025-07-01from
srijanee:feature/appgw-managed-hsm-ssl-cert

Conversation

@srijanee
Copy link
Copy Markdown

Description

Adds Managed HSM (Hardware Security Module) support to Application Gateway SSL certificate PowerShell cmdlets, based on swagger changes from Azure/azure-rest-api-specs#42137.

New model: ApplicationGatewayManagedHsm

  • KeyId — URI of a key stored in Managed HSM
  • PublicCertData — Base-64 encoded public certificate data (read-only from service)

New cmdlet parameters

  • -HsmKeyId — Key identifier of a key stored in Managed HSM
  • -HsmPublicCertData — Base-64 encoded public certificate data

Affected cmdlets

  • New-AzApplicationGatewaySslCertificate
  • Set-AzApplicationGatewaySslCertificate
  • Add-AzApplicationGatewaySslCertificate

Changes

Layer Files
SDK models ApplicationGatewayManagedHsm.cs (new), ApplicationGatewaySslCertificate.cs, ApplicationGatewaySslCertificatePropertiesFormat.cs
PS models PSApplicationGatewayManagedHsm.cs (new), PSApplicationGatewaySslCertificate.cs
AutoMapper NetworkResourceManagerProfile.cs — bidirectional mapping
Cmdlet base AzureApplicationGatewaySslCertificateBase.cs — new parameters + NewObject()
Help docs New/Set/Add SSL certificate help markdown
ChangeLog Entry added

Note: SDK model files were manually created to match what AutoRest would generate. These will be overwritten once full SDK generation from the 2025-07-01 TypeSpec-consolidated swagger is completed.

Testing

  • SDK project builds: dotnet build src/Network/Network.Management.Sdk/Network.Management.Sdk.csproj — 0 errors, 0 warnings
  • Network project builds: dotnet build src/Network/Network/Network.csproj — 0 errors, 0 warnings

Add ApplicationGatewayManagedHsm model with KeyId and PublicCertData properties
to support referencing keys stored in Managed HSM for SSL certificates.

Changes:
- SDK models: ApplicationGatewayManagedHsm.cs, updated SslCertificate and
  SslCertificatePropertiesFormat with Hsm property
- PS model: PSApplicationGatewayManagedHsm.cs, updated PSApplicationGatewaySslCertificate
- AutoMapper: bidirectional CNM<->MNM mapping for ManagedHsm
- Cmdlets: Added -HsmKeyId and -HsmPublicCertData parameters to
  New/Set/Add-AzApplicationGatewaySslCertificate
- Help docs: Added HSM examples and parameter documentation
- ChangeLog: Added entry for Managed HSM support

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

The CI static analysis re-runs autorest from README.md and diffs the
Generated/ folder. Revert the README.md to the original 2025-05-01
config so autorest can run successfully, and add a GeneratedSdkIssues
exception to suppress the expected diff from our manually added
ApplicationGatewayManagedHsm SDK model.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@VeryEarly
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants