Skip to content

Commit

Permalink
Upgrade to .NET 8 In-Proc (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
shibayan authored Jul 10, 2024
1 parent 0b88103 commit e9ffbf5
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
DOTNET_VERSION: 6.0.x
BICEP_VERSION: 0.25.53
BICEP_VERSION: 0.28.1

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
DOTNET_VERSION: 6.0.x
BICEP_VERSION: 0.25.53
BICEP_VERSION: 0.28.1

jobs:
publish:
Expand Down
8 changes: 4 additions & 4 deletions AppService.Acmebot/AppService.Acmebot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.11.3" />
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Azure.ResourceManager.AppService" Version="1.0.2" />
<PackageReference Include="Azure.ResourceManager.Dns" Version="1.1.1" />
<PackageReference Include="Azure.ResourceManager.Resources" Version="1.7.3" />
<PackageReference Include="DnsClient" Version="1.7.0" />
<PackageReference Include="Azure.ResourceManager.Resources" Version="1.8.0" />
<PackageReference Include="DnsClient" Version="1.8.0" />
<PackageReference Include="DurableTask.TypedProxy" Version="2.2.2" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.13.3" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.13.4" />
<PackageReference Include="Microsoft.Extensions.Http" Version="[6.0.*,7.0.0)" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.4.0" />
<PackageReference Include="WebJobs.Extensions.HttpApi" Version="2.1.0" />
Expand Down
14 changes: 9 additions & 5 deletions azuredeploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var appInsightsEndpoints = {
AzureUSGovernment: 'applicationinsights.us'
}

resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' = {
name: storageAccountName
location: location
kind: 'Storage'
Expand All @@ -42,7 +42,7 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
}
}

resource appServicePlan 'Microsoft.Web/serverfarms@2022-03-01' = {
resource appServicePlan 'Microsoft.Web/serverfarms@2023-12-01' = {
name: appServicePlanName
location: location
sku: {
Expand All @@ -52,7 +52,7 @@ resource appServicePlan 'Microsoft.Web/serverfarms@2022-03-01' = {
properties: {}
}

resource workspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
resource workspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
name: workspaceName
location: location
properties: {
Expand All @@ -76,7 +76,7 @@ resource appInsights 'Microsoft.Insights/components@2020-02-02' = {
}
}

resource functionApp 'Microsoft.Web/sites@2022-03-01' = {
resource functionApp 'Microsoft.Web/sites@2023-12-01' = {
name: functionAppName
location: location
kind: 'functionapp'
Expand Down Expand Up @@ -113,6 +113,10 @@ resource functionApp 'Microsoft.Web/sites@2022-03-01' = {
name: 'FUNCTIONS_EXTENSION_VERSION'
value: '~4'
}
{
name: 'FUNCTIONS_INPROC_NET8_ENABLED'
value: '1'
}
{
name: 'FUNCTIONS_WORKER_RUNTIME'
value: 'dotnet'
Expand All @@ -134,7 +138,7 @@ resource functionApp 'Microsoft.Web/sites@2022-03-01' = {
value: environment().name
}
]
netFrameworkVersion: 'v6.0'
netFrameworkVersion: 'v8.0'
ftpsState: 'Disabled'
minTlsVersion: '1.2'
scmMinTlsVersion: '1.2'
Expand Down
26 changes: 15 additions & 11 deletions azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.25.53.49325",
"templateHash": "11728208178327999889"
"version": "0.28.1.47646",
"templateHash": "14382008126277796973"
}
},
"parameters": {
Expand Down Expand Up @@ -58,7 +58,7 @@
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2022-09-01",
"apiVersion": "2023-05-01",
"name": "[variables('storageAccountName')]",
"location": "[parameters('location')]",
"kind": "Storage",
Expand All @@ -73,7 +73,7 @@
},
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2022-03-01",
"apiVersion": "2023-12-01",
"name": "[variables('appServicePlanName')]",
"location": "[parameters('location')]",
"sku": {
Expand All @@ -84,7 +84,7 @@
},
{
"type": "Microsoft.OperationalInsights/workspaces",
"apiVersion": "2022-10-01",
"apiVersion": "2023-09-01",
"name": "[variables('workspaceName')]",
"location": "[parameters('location')]",
"properties": {
Expand Down Expand Up @@ -113,7 +113,7 @@
},
{
"type": "Microsoft.Web/sites",
"apiVersion": "2022-03-01",
"apiVersion": "2023-12-01",
"name": "[variables('functionAppName')]",
"location": "[parameters('location')]",
"kind": "functionapp",
Expand All @@ -132,11 +132,11 @@
},
{
"name": "AzureWebJobsStorage",
"value": "[format('DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1};EndpointSuffix={2}', variables('storageAccountName'), listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2022-09-01').keys[0].value, environment().suffixes.storage)]"
"value": "[format('DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1};EndpointSuffix={2}', variables('storageAccountName'), listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2023-05-01').keys[0].value, environment().suffixes.storage)]"
},
{
"name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
"value": "[format('DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1};EndpointSuffix={2}', variables('storageAccountName'), listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2022-09-01').keys[0].value, environment().suffixes.storage)]"
"value": "[format('DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1};EndpointSuffix={2}', variables('storageAccountName'), listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2023-05-01').keys[0].value, environment().suffixes.storage)]"
},
{
"name": "WEBSITE_CONTENTSHARE",
Expand All @@ -150,6 +150,10 @@
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~4"
},
{
"name": "FUNCTIONS_INPROC_NET8_ENABLED",
"value": "1"
},
{
"name": "FUNCTIONS_WORKER_RUNTIME",
"value": "dotnet"
Expand All @@ -171,7 +175,7 @@
"value": "[environment().name]"
}
],
"netFrameworkVersion": "v6.0",
"netFrameworkVersion": "v8.0",
"ftpsState": "Disabled",
"minTlsVersion": "1.2",
"scmMinTlsVersion": "1.2"
Expand All @@ -191,11 +195,11 @@
},
"principalId": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Web/sites', variables('functionAppName')), '2022-03-01', 'full').identity.principalId]"
"value": "[reference(resourceId('Microsoft.Web/sites', variables('functionAppName')), '2023-12-01', 'full').identity.principalId]"
},
"tenantId": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Web/sites', variables('functionAppName')), '2022-03-01', 'full').identity.tenantId]"
"value": "[reference(resourceId('Microsoft.Web/sites', variables('functionAppName')), '2023-12-01', 'full').identity.tenantId]"
}
}
}

0 comments on commit e9ffbf5

Please sign in to comment.