Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.Web/sites vs. Microsoft.Web/sites/config 'web' - localMySqlEnabled, netFrameworkVersion #376

Open
dj-r1 opened this issue Aug 29, 2024 · 0 comments

Comments

@dj-r1
Copy link

dj-r1 commented Aug 29, 2024

Describe the noise

Resource type
Microsoft.Web/sites
Microsoft.Web/sites/config with name 'web'

apiVersion
Microsoft.Web/sites - 2023-12-01, 2022-09-01
Microsoft.Web/sites/config - 2023-12-01, 2022-09-01

Client
PowerShell

AFTER result from WhatIf deployment:

{
  "apiVersion": "2022-09-01",
  "identity": {
    "type": "SystemAssigned"
  },
  "kind": "functionapp,linux",
  "location": "my-location",
  "name": "app-name",
  "properties": {
    "afdEnabled": false,
    "clientAffinityEnabled": false,
    "clientCertEnabled": false,
    "clientCertMode": "Required",
    "containerSize": 1000,
    "dailyMemoryTimeQuota": 1000,
    "defaultHostNameScope": "Global",
    "eligibleLogCategories": "FunctionAppLogs,AppServiceAuthenticationLogs",
    "enabled": true,
    "endToEndEncryptionEnabled": false,
    "ftpsHostName": "ftps://ftpsHostName",
    "ftpUsername": "ftpUsername",
    "functionExecutionUnitsCache": 0.0,
    "functionsRuntimeAdminIsolationEnabled": false,
    "hostNamesDisabled": false,
    "httpsOnly": true,
    "inFlightFeatures": [
      "SiteContainers"
    ],
    "ipMode": "IPv4",
    "keyVaultReferenceIdentity": "SystemAssigned",
    "name": "app-name",
    "redundancyMode": "None",
    "reserved": true,
    "runtimeAvailabilityState": "Normal",
    "scmSiteAlsoStopped": false,
    "serverFarmId": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/my-rg/providers/Microsoft.Web/serverfarms/app-name-plan",
    "siteConfig": {
      "acrUseManagedIdentityCreds": false,
      "alwaysOn": false,
      "appSettings": "*******",
      "clusteringEnabled": false,
      "functionAppScaleLimit": 0,
      "http20Enabled": true,
      "linuxFxVersion": "Python|3.9",
      "localMySqlEnabled": false,
      "minimumElasticInstanceCount": 0,								
      "numberOfWorkers": 1
      "netFrameworkVersion": "v4.6",
    },
    "storageAccountRequired": false,
    "storageRecoveryDefaultState": "Running",
    "virtualNetworkSubnetId": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/my-rg/providers/Microsoft.Network/virtualNetworks/my-virtual-network/subnets/My-Subnet",
    "vnetBackupRestoreEnabled": false,
    "vnetContentShareEnabled": false,
    "vnetImagePullEnabled": false,
    "vnetRouteAllEnabled": false
  },
  "type": "Microsoft.Web/sites"
}

~ Microsoft.Web/sites/app-name [2023-12-01]
+ properties.siteConfig.localMySqlEnabled: false
+ properties.siteConfig.netFrameworkVersion: "v4.6"

BEFORE

BEFORE response, so that which is in Azure and the same is received with Azure REST API:

{
  "apiVersion": "2022-09-01",
  "identity": {
    "type": "SystemAssigned"
  },
  "kind": "functionapp,linux",
  "location": "my-location",
  "name": "app-name",
  "properties": {
    "afdEnabled": false,
    "clientAffinityEnabled": false,
    "clientCertEnabled": false,
    "clientCertMode": "Required",
    "containerSize": 1000,
    "dailyMemoryTimeQuota": 1000,
    "defaultHostNameScope": "Global",
    "eligibleLogCategories": "FunctionAppLogs,AppServiceAuthenticationLogs",
    "enabled": true,
    "endToEndEncryptionEnabled": false,
    "ftpsHostName": "ftps://ftpsHostName",
    "ftpUsername": "ftpUsername",
    "functionExecutionUnitsCache": 0.0,
    "functionsRuntimeAdminIsolationEnabled": false,
    "hostNamesDisabled": false,
    "httpsOnly": true,
    "inFlightFeatures": [
      "SiteContainers"
    ],
    "ipMode": "IPv4",
    "keyVaultReferenceIdentity": "SystemAssigned",
    "name": "app-name",
    "redundancyMode": "None",
    "reserved": true,
    "runtimeAvailabilityState": "Normal",
    "scmSiteAlsoStopped": false,
    "serverFarmId": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/my-rg/providers/Microsoft.Web/serverfarms/app-name-plan",
    "siteConfig": {
      "acrUseManagedIdentityCreds": false,
      "alwaysOn": false,
      "appSettings": "*******",
      "clusteringEnabled": false,
      "functionAppScaleLimit": 0,
      "http20Enabled": true,
      "linuxFxVersion": "Python|3.9", 
      "minimumElasticInstanceCount": 0,								
      "numberOfWorkers": 1
    },
    "storageAccountRequired": false,
    "storageRecoveryDefaultState": "Running",
    "virtualNetworkSubnetId": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/my-rg/providers/Microsoft.Network/virtualNetworks/my-virtual-network/subnets/My-Subnet",
    "vnetBackupRestoreEnabled": false,
    "vnetContentShareEnabled": false,
    "vnetImagePullEnabled": false,
    "vnetRouteAllEnabled": false
  },
  "type": "Microsoft.Web/sites"
}

Current (noisy) response

  ~ Microsoft.Web/sites/app-name [2023-12-01]
    + properties.siteConfig.localMySqlEnabled:   false
    + properties.siteConfig.netFrameworkVersion: "v4.6"

Additional context
As a part of sub-resource (extension) Microsoft.Web/sites/config 'web' parameters set in the code are

{
  "properties": {
      "localMySqlEnabled": false,
      "netFrameworkVersion": "v4.0"
  "type": "Microsoft.Web/sites/config"
}

So it is so interesting even in Microsoft.Web/sites/config we have netFrameworkVersion with v4.0 but in WhatIf response Microsoft.Web/sites is v4.6.

I tried to deploy the values to Microsoft.Web/sites with localMySqlEnabled and netFrameworkVersion and they do not take effect and result is returned with a noise.

I'm also submitting this issue because I checked the response from Azure REST API and JSON view in Azure Portal, where the function app (Microsoft.Web/sites) have these parameters set with null.

.NET is not mainly used here as Python, as you may see in resource description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant