Skip to content

Commit 02a28c1

Browse files
Update RFC0005-ETags.md
Comments from Chris Lewis regarding new Etag usage in Powershell Update-AzXXX commands
1 parent 0eebf42 commit 02a28c1

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

documentation/RFC/RFC0005-ETags.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ Update-AzVM <parameters> -ETag <etag-value>
4141
Get-AzVM <parameters> | Update-AzVM <changed parameters>
4242
```
4343

44+
- I would say this pipeline example is a little vague - is this using etag or not. Or would input from pipeline use a different default behavior.
45+
46+
4447

4548
### Forcing Updates
4649

@@ -50,8 +53,29 @@ Update a resource regardless of ETag settings
5053
Update-AzVM <parameters> -Overwrite
5154
```
5255

56+
- Overwrite is pretty non-standard powershell. -Force or -Confirm would be better (See https://stackoverflow.com/questions/34749333/powershell-guidelines-for-confirm-force-and-whatif and https://github.com/Azure/azure-powershell/issues/475)
57+
5358
## Comments and Questions
5459

5560
- Should Updates be conditional on ETag value match by default, or shoudl this be opt-in
56-
61+
5762
- Should overwrite without regard to ETag values be an opt-in or default behavior
63+
64+
65+
I believe this should be rolled in gradually, so initial release should have etags usage as optional. Let it bake for 6 months and then switch the default behavior.
66+
67+
I could see:
68+
Get-AzVM <parameters> | Update-AzVM <changed parameters> -UseEtag $true
69+
70+
Where UseEtag's default value changes from $false to $true after a while. This would initally not break scripts, but after the roll-out date all new `Update-AzVM` commands would use the ETAG checking.
71+
72+
### Question
73+
How do etags work with sub-items i.e. network config. Do those sub items have a separate etag and updates to them cause the parent object etag to update also?
74+
75+
This is going to have to be *clearly* documented - I could see some real confusion in this path:
76+
77+
Get-AzVM -> (Change Disk Size via $vm.StorageProfile.DataDisks[0].DiskSizeGB = 123 ) -> Update-AzVM
78+
79+
vs
80+
81+
Get-AzVM -> get-AzDataDisk -> (Change Disk Size via Set-AzDataDisk) -> Update-AzVM

0 commit comments

Comments
 (0)