@pagopa/dx-cli 0.18.0 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -85,6 +85,7 @@ export class AzureCloudAccountService {
|
|
|
85
85
|
const requiredRoles = [
|
|
86
86
|
"8e3af657-a8ff-443c-a75c-2fe8c4bcb635", // Owner
|
|
87
87
|
"ba92f5b4-2d11-453d-a403-e96b0029c9fe", // Storage Blob Data Contributor
|
|
88
|
+
"b86a8fe4-44ce-4948-aee5-eccb2c155cd7", // Key Vault Secrets Officer
|
|
88
89
|
];
|
|
89
90
|
const scope = `/subscriptions/${cloudAccountId}`;
|
|
90
91
|
// Collect all role definition IDs assigned to the user or their groups
|
|
@@ -152,9 +153,14 @@ export class AzureCloudAccountService {
|
|
|
152
153
|
const kvClient = new KeyVaultManagementClient(this.#credential, cloudAccount.id);
|
|
153
154
|
const keyVaultName = `${prefix}-${short.env}-${short.location}-common-kv-01`;
|
|
154
155
|
const secretsProtectionEnabled = short.env === "p";
|
|
156
|
+
const result = await kvClient.vaults.checkNameAvailability({
|
|
157
|
+
name: keyVaultName,
|
|
158
|
+
type: "Microsoft.KeyVault/vaults",
|
|
159
|
+
});
|
|
155
160
|
await kvClient.vaults.beginCreateOrUpdateAndWait(resourceGroupName, keyVaultName, {
|
|
156
161
|
location: cloudAccount.defaultLocation,
|
|
157
162
|
properties: {
|
|
163
|
+
createMode: result.nameAvailable ? "default" : "recover",
|
|
158
164
|
enabledForDiskEncryption: true,
|
|
159
165
|
enablePurgeProtection: secretsProtectionEnabled ? true : undefined,
|
|
160
166
|
enableRbacAuthorization: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/dx-cli",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A CLI useful to manage DX tools.",
|
|
6
6
|
"repository": {
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"@azure/storage-blob": "^12.29.1",
|
|
34
34
|
"@logtape/logtape": "^1.3.4",
|
|
35
35
|
"@microsoft/microsoft-graph-client": "^3.0.7",
|
|
36
|
+
"@pagopa/dx-savemoney": "0.1.4",
|
|
36
37
|
"chalk": "^5.6.2",
|
|
37
38
|
"commander": "^14.0.2",
|
|
38
39
|
"core-js": "^3.47.0",
|
|
@@ -46,11 +47,10 @@
|
|
|
46
47
|
"replace-in-file": "^8.4.0",
|
|
47
48
|
"semver": "^7.7.2",
|
|
48
49
|
"yaml": "^2.8.2",
|
|
49
|
-
"zod": "^4.2.1"
|
|
50
|
-
"@pagopa/dx-savemoney": "^0.1.4"
|
|
50
|
+
"zod": "^4.2.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@tsconfig/
|
|
53
|
+
"@tsconfig/node24": "24.0.0",
|
|
54
54
|
"@types/inquirer": "^9.0.9",
|
|
55
55
|
"@types/node": "^22.19.1",
|
|
56
56
|
"@types/semver": "^7.7.1",
|