@gradientedge/cdk-utils 9.55.0 → 9.55.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.
|
@@ -115,16 +115,24 @@ class AzureFunctionManager {
|
|
|
115
115
|
});
|
|
116
116
|
new cdktf_local_exec_1.Provider(scope, `${id}-local-exec-provider`);
|
|
117
117
|
// Temporary workaround until https://github.com/hashicorp/terraform-provider-azurerm/pull/29023 is made available
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
118
|
+
/*
|
|
119
|
+
new LocalExec(scope, `${id}-function-app-always-ready`, {
|
|
120
|
+
triggers: {
|
|
121
|
+
alwaysReadyConfig:
|
|
122
|
+
props.alwaysReadyConfig !== undefined
|
|
123
|
+
? `${props.alwaysReadyConfig[0].name.toString()}:${props.alwaysReadyConfig[0].instanceCount.toString()}`
|
|
124
|
+
: 'undefined',
|
|
125
|
+
},
|
|
126
|
+
command: `
|
|
127
|
+
ALWAYS_READY_CONFIG="${props.alwaysReadyConfig !== undefined ? props.alwaysReadyConfig.toString() : 'undefined'}"
|
|
128
|
+
if [ "$ALWAYS_READY_CONFIG" = "undefined" ]; then
|
|
129
|
+
az functionapp scale config always-ready delete --name "${functionApp.name}" --resource-group "${resourceGroup.name}" --setting-names "http"
|
|
130
|
+
else
|
|
131
|
+
az functionapp scale config always-ready set --name "${functionApp.name}" --resource-group "${resourceGroup.name}" --settings "${props.alwaysReadyConfig === undefined ? '' : props.alwaysReadyConfig[0].name}"="${props.alwaysReadyConfig === undefined ? '' : props.alwaysReadyConfig[0].instanceCount}"
|
|
132
|
+
fi
|
|
133
|
+
`,
|
|
134
|
+
})
|
|
135
|
+
*/
|
|
128
136
|
// Deploy function app zip package with up to 3 retry attempts.
|
|
129
137
|
// This handles transient issues like HTTP 503s returned from the Azure Kudu deployment endpoint.
|
|
130
138
|
new cdktf_local_exec_1.LocalExec(scope, `${id}-function-app-deploy`, {
|
|
@@ -8,7 +8,7 @@ export interface FunctionProps extends FunctionAppFunctionConfig {
|
|
|
8
8
|
export interface FunctionAppFlexConsumptionProps extends FunctionAppFlexConsumptionConfig {
|
|
9
9
|
sourceCodeHash: string;
|
|
10
10
|
deploySource: string;
|
|
11
|
-
alwaysReadyConfig
|
|
11
|
+
alwaysReadyConfig?: AlwaysReadyConfigProps[];
|
|
12
12
|
}
|
|
13
13
|
export interface AlwaysReadyConfigProps {
|
|
14
14
|
name: string;
|
package/package.json
CHANGED
|
@@ -129,16 +129,24 @@ export class AzureFunctionManager {
|
|
|
129
129
|
new Provider(scope, `${id}-local-exec-provider`)
|
|
130
130
|
|
|
131
131
|
// Temporary workaround until https://github.com/hashicorp/terraform-provider-azurerm/pull/29023 is made available
|
|
132
|
+
/*
|
|
132
133
|
new LocalExec(scope, `${id}-function-app-always-ready`, {
|
|
133
134
|
triggers: {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
alwaysReadyConfig:
|
|
136
|
+
props.alwaysReadyConfig !== undefined
|
|
137
|
+
? `${props.alwaysReadyConfig[0].name.toString()}:${props.alwaysReadyConfig[0].instanceCount.toString()}`
|
|
138
|
+
: 'undefined',
|
|
137
139
|
},
|
|
138
140
|
command: `
|
|
139
|
-
|
|
141
|
+
ALWAYS_READY_CONFIG="${props.alwaysReadyConfig !== undefined ? props.alwaysReadyConfig.toString() : 'undefined'}"
|
|
142
|
+
if [ "$ALWAYS_READY_CONFIG" = "undefined" ]; then
|
|
143
|
+
az functionapp scale config always-ready delete --name "${functionApp.name}" --resource-group "${resourceGroup.name}" --setting-names "http"
|
|
144
|
+
else
|
|
145
|
+
az functionapp scale config always-ready set --name "${functionApp.name}" --resource-group "${resourceGroup.name}" --settings "${props.alwaysReadyConfig === undefined ? '' : props.alwaysReadyConfig[0].name}"="${props.alwaysReadyConfig === undefined ? '' : props.alwaysReadyConfig[0].instanceCount}"
|
|
146
|
+
fi
|
|
140
147
|
`,
|
|
141
148
|
})
|
|
149
|
+
*/
|
|
142
150
|
|
|
143
151
|
// Deploy function app zip package with up to 3 retry attempts.
|
|
144
152
|
// This handles transient issues like HTTP 503s returned from the Azure Kudu deployment endpoint.
|
|
@@ -9,7 +9,7 @@ export interface FunctionProps extends FunctionAppFunctionConfig {}
|
|
|
9
9
|
export interface FunctionAppFlexConsumptionProps extends FunctionAppFlexConsumptionConfig {
|
|
10
10
|
sourceCodeHash: string
|
|
11
11
|
deploySource: string
|
|
12
|
-
alwaysReadyConfig
|
|
12
|
+
alwaysReadyConfig?: AlwaysReadyConfigProps[]
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface AlwaysReadyConfigProps {
|