@pulumi/azure 5.84.0-alpha.1721110333 → 5.84.0-alpha.1721111802
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.
- package/core/zMixins.js +17 -11
- package/core/zMixins.js.map +1 -1
- package/package.json +3 -3
package/core/zMixins.js
CHANGED
|
@@ -23,7 +23,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.getServiceClientCredentials = void 0;
|
|
26
|
-
const
|
|
26
|
+
const pulumi = require("@pulumi/pulumi");
|
|
27
|
+
const ms_rest_js_1 = require("@azure/ms-rest-js");
|
|
28
|
+
const identity = require("@azure/identity");
|
|
27
29
|
const config = require("../config");
|
|
28
30
|
const utilities = require("../utilities");
|
|
29
31
|
/**
|
|
@@ -32,23 +34,27 @@ const utilities = require("../utilities");
|
|
|
32
34
|
*/
|
|
33
35
|
function getServiceClientCredentials() {
|
|
34
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
let credentials;
|
|
36
37
|
const useMsi = config.useMsi || utilities.getEnvBoolean("ARM_USE_MSI");
|
|
37
|
-
const msiEndpoint = config.msiEndpoint || utilities.getEnv("ARM_MSI_ENDPOINT");
|
|
38
38
|
const clientId = config.clientId || utilities.getEnv("AZURE_CLIENT_ID", "ARM_CLIENT_ID");
|
|
39
39
|
const clientSecret = config.clientSecret || utilities.getEnv("AZURE_CLIENT_SECRET", "ARM_CLIENT_SECRET");
|
|
40
|
+
const clientCertPath = config.clientCertificatePath || utilities.getEnv("ARM_CLIENT_CERTIFICATE_PATH");
|
|
41
|
+
const clientCertPassword = config.clientCertificatePassword || utilities.getEnv("ARM_CLIENT_CERTIFICATE_PASSWORD");
|
|
40
42
|
const tenantId = config.tenantId || utilities.getEnv("AZURE_TENANT_ID", "ARM_TENANT_ID");
|
|
43
|
+
config.oidcToken;
|
|
44
|
+
let tokenCredential = new identity.AzureCliCredential();
|
|
41
45
|
if (useMsi) {
|
|
42
|
-
|
|
46
|
+
tokenCredential = new identity.ManagedIdentityCredential();
|
|
43
47
|
}
|
|
44
|
-
else if (clientId &&
|
|
45
|
-
|
|
48
|
+
else if (clientId && tenantId) {
|
|
49
|
+
if (clientSecret) {
|
|
50
|
+
tokenCredential = new identity.ClientSecretCredential(tenantId, clientId, clientSecret);
|
|
51
|
+
}
|
|
52
|
+
else if (clientCertPath) {
|
|
53
|
+
tokenCredential = new identity.ClientCertificateCredential(tenantId, clientId, { certificatePath: clientCertPath, certificatePassword: clientCertPassword });
|
|
54
|
+
}
|
|
46
55
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
credentials = yield msnodeauth.AzureCliCredentials.create();
|
|
50
|
-
}
|
|
51
|
-
return credentials;
|
|
56
|
+
pulumi.log.debug(`Using Azure credentials: ${tokenCredential.constructor.name}`);
|
|
57
|
+
return new ms_rest_js_1.AzureIdentityCredentialAdapter(tokenCredential);
|
|
52
58
|
});
|
|
53
59
|
}
|
|
54
60
|
exports.getServiceClientCredentials = getServiceClientCredentials;
|
package/core/zMixins.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zMixins.js","sourceRoot":"","sources":["../../core/zMixins.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"zMixins.js","sourceRoot":"","sources":["../../core/zMixins.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,o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,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC,CAAC;aAChK;SACJ;QACD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,4BAA4B,eAAe,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QAEjF,OAAO,IAAI,2CAA8B,CAAC,eAAe,CAAC,CAAA;IAC9D,CAAC;CAAA;AAtBD,kEAsBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulumi/azure",
|
|
3
|
-
"version": "5.84.0-alpha.
|
|
3
|
+
"version": "5.84.0-alpha.1721111802",
|
|
4
4
|
"description": "A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pulumi",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@azure/eventgrid": "^4.6.0",
|
|
17
17
|
"@azure/functions": "=1.2.2",
|
|
18
|
+
"@azure/identity": "^4.0.0",
|
|
18
19
|
"@azure/ms-rest-azure-js": "^2.0.1",
|
|
19
|
-
"@azure/ms-rest-nodeauth": "^3.0.0",
|
|
20
20
|
"@pulumi/pulumi": "^3.0.0",
|
|
21
21
|
"azure-functions-ts-essentials": "^1.3.2",
|
|
22
22
|
"moment": "2.29.4",
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
"pulumi": {
|
|
31
31
|
"resource": true,
|
|
32
32
|
"name": "azure",
|
|
33
|
-
"version": "5.84.0-alpha.
|
|
33
|
+
"version": "5.84.0-alpha.1721111802"
|
|
34
34
|
}
|
|
35
35
|
}
|