Skip to content

Commit 11cb37d

Browse files
committed
Add migration guide for Stack AzureRm 1.2.11
1 parent df27fee commit 11cb37d

File tree

1 file changed

+117
-0
lines changed

1 file changed

+117
-0
lines changed
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Table of Contents
2+
1. [Removal of Force parameters](#removal-of-force-parameters)
3+
2. [Change of Tag parameters](#change-of-tag-parameters)
4+
5+
## Removal of Force parameters
6+
7+
This release, we removed all Obsolete `Force` parameters from cmdlets and the corresponding warnings that the parameter would be removed in a future release.
8+
9+
The following cmdlets are affected by this change:
10+
11+
**Profile**
12+
- Remove-AzureRmEnvironment
13+
14+
**Resources**
15+
- Register-AzureRmProviderFeature
16+
- Register-AzureRmResourceProvider
17+
- Remove-AzureRmADServicePrincipal
18+
- Remove-AzureRmPolicyAssignment
19+
- Remove-AzureRmResourceGroupDeployment
20+
- Remove-AzureRmRoleAssignment
21+
- Stop-AzureRmResourceGroupDeployment
22+
- Unregister-AzureRmResourceProvider
23+
24+
**Tag**
25+
- Remove-AzureRmTag
26+
27+
<br>
28+
29+
If you have a script that uses any of the above cmdlets, the breaking change can be fixed by simply removing the `Force` parameter.
30+
31+
```powershell
32+
# Old
33+
New-AzureRmResourceGroup -Name $resourceGroupName -Location $location -Force
34+
35+
# New
36+
New-AzureRmResourceGroup -Name $resourceGroupName -Location $location
37+
```
38+
39+
<br>
40+
41+
## Change of Tag parameters
42+
43+
This release, the `Tags` parameter name was changed to `Tag`, and the type was changed from `Hashtable[]` to `Hashtable`, changing the format of the key-value pairings.
44+
45+
Previously, each entry in the `Hashtable[]` represented a single key-value pairing:
46+
47+
```powershell
48+
$tags = @{ Name = "test1"; Value = "testval1" }, @{ Name = "test2", Value = "testval2" }
49+
$tags[0].Name # Key for the first entry, "test1"
50+
$tags[0].Value # Value for the first entry, "testval1"
51+
$tags[1].Name # Key for the second entry, "test2"
52+
$tags[1].Value # Value for the second entry, "testval2"
53+
```
54+
55+
Now, `Name` and `Value` are no longer necessary, allowing for key-value pairings to be created by assigning `Key = "Value"` in the `Hashtable`:
56+
57+
```powershell
58+
$tag = @{ test1 = "testval1"; test2 = "testval2" }
59+
$tag["test1"] # Gets the value associated with the key "test1"
60+
$tag["test2"] # Gets the value associated with the key "test2"
61+
```
62+
63+
The following cmdlets are affected by this change:
64+
65+
66+
**Compute**
67+
- New-AzureRmVM
68+
- Update-AzureRmVM
69+
70+
**Dns**
71+
- New-AzureRmDnsZone
72+
- Set-AzureRmDnsZone
73+
74+
**KeyVault**
75+
- Get-AzureRmKeyVault
76+
- New-AzureRmKeyVault
77+
78+
**Network**
79+
- New-AzureRmApplicationGateway
80+
- New-AzureRmExpressRouteCircuit
81+
- New-AzureRmLoadBalancer
82+
- New-AzureRmLocalNetworkGateway
83+
- New-AzureRmNetworkInterface
84+
- New-AzureRmNetworkSecurityGroup
85+
- New-AzureRmPublicIpAddress
86+
- New-AzureRmRouteTable
87+
- New-AzureRmVirtualNetwork
88+
- New-AzureRmVirtualNetworkGateway
89+
- New-AzureRmVirtualNetworkGatewayConnection
90+
- New-AzureRmVirtualNetworkPeering
91+
92+
**Resources**
93+
- Find-AzureRmResource
94+
- Find-AzureRmResourceGroup
95+
- New-AzureRmResource
96+
- New-AzureRmResourceGroup
97+
- Set-AzureRmResource
98+
- Set-AzureRmResourceGroup
99+
100+
**Storage**
101+
- New-AzureRmStorageAccount
102+
- Set-AzureRmStorageAccount
103+
104+
105+
<br>
106+
107+
If you have a script that uses any of the above cmdlets, the breaking change can be fixed by changing the `Tags` parameter to `Tag`, as well as changing the `Tag` to the new format.
108+
109+
```powershell
110+
# Old
111+
New-AzureRmResourceGroup -Name $resourceGroupName -Location -location -Tags @{ Name = "testtag"; Value = "testval" }
112+
113+
# New
114+
New-AzureRmResourceGroup -Name $resourceGroupName -Location -location -Tag @{ testtag = "testval" }
115+
```
116+
117+

0 commit comments

Comments
 (0)