Azure / Azure/arm-template-whatif

Microsoft.Web/sites/publicCertificates will not replace when certificate in blob element has changed

Open
#209 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
101
Forks
21
Avg merge
3h 35m
Merged PRs (30d)
1

Description

**Describe the bug**
A public certificate will not get replaced when you modify the properties element with another certificate. Instead, it will act as if nothing changed.

**To Reproduce**
1. Use this ARM snippet, deploy it once.
2. In the template, replace the properties:blob element with another certificate.
3. Deploy it again with the modified value.
4. Notice that the resource hasn't changed at all.

```
{
"type": "Microsoft.Web/sites/publicCertificates",
"apiVersion": "2020-12-01",
"name": "[concat('/mypubliccert')]",
"properties": {
"blob": "",
"publicCertificateLocation": "CurrentUserMy"
}
},
```

**Expected behavior**
The resource should be modified with the certificate that has been deployed in the template.

You can verify this by checking the thumbprint in the portal, this should match the replaced certificate:
![image](https://user-images.githubusercontent.com/4255748/128684193-7c80833b-9d2f-4def-8eff-1b2a4d9ae6a7.png)

**Client** [e.g. PowerShell, CLI, API)
ARM resource deploy task in DevOps, incremental option.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the incremental ARM deployment described: deploy one Microsoft.Web/sites/publicCertificates resource, change properties.blob, and deploy again. Verify the deployed certificate thumbprint in the portal; no repository file or test is named, so the responsible integration and regression coverage will need to be located.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.