Skip to content

Commit 5b1fbb0

Browse files
committed
Enable StorageAccount Encryption and Enforce HTTPS
1 parent 12fd01d commit 5b1fbb0

5 files changed

+85
-10
lines changed

parts/kubernetesagentresourcesvmas.t

+32-2
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,25 @@
7575
"dependsOn": [
7676
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
7777
],
78+
"kind": "Storage",
7879
"location": "[variables('location')]",
7980
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}AccountName'))]",
8081
"properties": {
81-
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
82+
"encryption": {
83+
"keySource": "Microsoft.Storage",
84+
"services": {
85+
"blob": {
86+
"enabled": true
87+
},
88+
"file": {
89+
"enabled": true
90+
}
91+
}
92+
},
93+
"supportsHttpsTrafficOnly": true
94+
},
95+
"sku": {
96+
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
8297
},
8398
"type": "Microsoft.Storage/storageAccounts"
8499
},
@@ -92,10 +107,25 @@
92107
"dependsOn": [
93108
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
94109
],
110+
"kind": "Storage",
95111
"location": "[variables('location')]",
96112
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}DataAccountName'))]",
97113
"properties": {
98-
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
114+
"encryption": {
115+
"keySource": "Microsoft.Storage",
116+
"services": {
117+
"blob": {
118+
"enabled": true
119+
},
120+
"file": {
121+
"enabled": true
122+
}
123+
}
124+
},
125+
"supportsHttpsTrafficOnly": true
126+
},
127+
"sku": {
128+
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
99129
},
100130
"type": "Microsoft.Storage/storageAccounts"
101131
},

parts/kubernetesmasterresources.t

+16-1
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,25 @@
2424
"dependsOn": [
2525
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
2626
],
27+
"kind": "Storage",
2728
"location": "[variables('location')]",
2829
"name": "[variables('masterStorageAccountName')]",
2930
"properties": {
30-
"accountType": "[variables('vmSizesMap')[variables('masterVMSize')].storageAccountType]"
31+
"encryption": {
32+
"keySource": "Microsoft.Storage",
33+
"services": {
34+
"blob": {
35+
"enabled": true
36+
},
37+
"file": {
38+
"enabled": true
39+
}
40+
}
41+
},
42+
"supportsHttpsTrafficOnly": true
43+
},
44+
"sku": {
45+
"name": "[variables('vmSizesMap')[variables('masterVMSize')].storageAccountType]"
3146
},
3247
"type": "Microsoft.Storage/storageAccounts"
3348
},

parts/kubernetesmastervars.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"sshKeyPath": "[concat('/home/',variables('username'),'/.ssh/authorized_keys')]",
6363

6464
{{if .HasStorageAccountDisks}}
65-
"apiVersionStorage": "2015-06-15",
65+
"apiVersionStorage": "2016-12-01",
6666
"maxVMsPerStorageAccount": 20,
6767
"maxStorageAccountsPerAgent": "[div(variables('maxVMsPerPool'),variables('maxVMsPerStorageAccount'))]",
6868
"dataStorageAccountPrefixSeed": 97,

parts/kuberneteswinagentresourcesvmas.t

+32-2
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,25 @@
6767
"dependsOn": [
6868
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
6969
],
70+
"kind": "Storage",
7071
"location": "[variables('location')]",
7172
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}AccountName'))]",
7273
"properties": {
73-
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
74+
"encryption": {
75+
"keySource": "Microsoft.Storage",
76+
"services": {
77+
"blob": {
78+
"enabled": true
79+
},
80+
"file": {
81+
"enabled": true
82+
}
83+
}
84+
},
85+
"supportsHttpsTrafficOnly": true
86+
},
87+
"sku": {
88+
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
7489
},
7590
"type": "Microsoft.Storage/storageAccounts"
7691
},
@@ -84,10 +99,25 @@
8499
"dependsOn": [
85100
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
86101
],
102+
"kind": "Storage",
87103
"location": "[variables('location')]",
88104
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}DataAccountName'))]",
89105
"properties": {
90-
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
106+
"encryption": {
107+
"keySource": "Microsoft.Storage",
108+
"services": {
109+
"blob": {
110+
"enabled": true
111+
},
112+
"file": {
113+
"enabled": true
114+
}
115+
}
116+
},
117+
"supportsHttpsTrafficOnly": true
118+
},
119+
"sku": {
120+
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
91121
},
92122
"type": "Microsoft.Storage/storageAccounts"
93123
},

0 commit comments

Comments
 (0)