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

azurerm_linux_function_app: Update WEBSITE_CONTENTSHARE when is user defined #28521

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

CorrenSoft
Copy link
Contributor

@CorrenSoft CorrenSoft commented Jan 15, 2025

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

When the Azure function is created without WEBSITE_CONTENTSHARE defined, an automatic value is assigned since is mandatory to have it, and to avoid overwrite it on each deployment, the code is reading the current value and updating the user data. But, when the setting was defined by the user, the described behaviour was causing the situation described in the linked issue: the value being never updated.

To solve the problem, I have altered the steps to make it as follow:

  • Check the schema for the presence of the setting.
  • If empty, then I get the current value and use it.
  • If still is empty, then I use a new generated one.

The only gap that remains present is in the scenario when the setting was defined initially by the user and then removed from the config (it will never be replaced by a generated one).

Updated also 2 test to verify that the value is updated.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevant documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Note: Logs are quite long, so I will add it in a comment. There are some failures but are caused by limited access to run it or pre-existing problems in the tests.

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #28434

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

…lue.

Updated test to validate the proper update of WEBSITE_CONTENTSHARE
@CorrenSoft
Copy link
Contributor Author

TF_ACC=1 go test -v ./internal/services/appservice -run=TestAccLinuxFunctionApp_ -timeout 360m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN TestAccLinuxFunctionApp_authV2AzureActiveDirectory
=== PAUSE TestAccLinuxFunctionApp_authV2AzureActiveDirectory
=== RUN TestAccLinuxFunctionApp_authV2AzureActiveDirectoryNoSecretName
=== PAUSE TestAccLinuxFunctionApp_authV2AzureActiveDirectoryNoSecretName
=== RUN TestAccLinuxFunctionApp_authV2AzureActiveDirectoryRemove
=== PAUSE TestAccLinuxFunctionApp_authV2AzureActiveDirectoryRemove
=== RUN TestAccLinuxFunctionApp_authV2Apple
=== PAUSE TestAccLinuxFunctionApp_authV2Apple
=== RUN TestAccLinuxFunctionApp_authV2AppleCustomSettingName
=== PAUSE TestAccLinuxFunctionApp_authV2AppleCustomSettingName
=== RUN TestAccLinuxFunctionApp_authV2CustomOIDC
=== PAUSE TestAccLinuxFunctionApp_authV2CustomOIDC
=== RUN TestAccLinuxFunctionApp_authV2Facebook
=== PAUSE TestAccLinuxFunctionApp_authV2Facebook
=== RUN TestAccLinuxFunctionApp_authV2Github
=== PAUSE TestAccLinuxFunctionApp_authV2Github
=== RUN TestAccLinuxFunctionApp_authV2Google
=== PAUSE TestAccLinuxFunctionApp_authV2Google
=== RUN TestAccLinuxFunctionApp_authV2Microsoft
=== PAUSE TestAccLinuxFunctionApp_authV2Microsoft
=== RUN TestAccLinuxFunctionApp_authV2Twitter
=== PAUSE TestAccLinuxFunctionApp_authV2Twitter
=== RUN TestAccLinuxFunctionApp_authV2MultipleAuths
=== PAUSE TestAccLinuxFunctionApp_authV2MultipleAuths
=== RUN TestAccLinuxFunctionApp_authV2Update
=== PAUSE TestAccLinuxFunctionApp_authV2Update
=== RUN TestAccLinuxFunctionApp_authV2UpgradeFromV1
=== PAUSE TestAccLinuxFunctionApp_authV2UpgradeFromV1
=== RUN TestAccLinuxFunctionApp_basicBasicPlan
=== PAUSE TestAccLinuxFunctionApp_basicBasicPlan
=== RUN TestAccLinuxFunctionApp_basicRuntimeCheck
=== PAUSE TestAccLinuxFunctionApp_basicRuntimeCheck
=== RUN TestAccLinuxFunctionApp_withIPRestrictions
=== PAUSE TestAccLinuxFunctionApp_withIPRestrictions
=== RUN TestAccLinuxFunctionApp_withIPRestrictionsDescription
=== PAUSE TestAccLinuxFunctionApp_withIPRestrictionsDescription
=== RUN TestAccLinuxFunctionApp_withIPRestrictionsDefaultAction
=== PAUSE TestAccLinuxFunctionApp_withIPRestrictionsDefaultAction
=== RUN TestAccLinuxFunctionApp_withIPRestrictionsDefaultActionUpdate
=== PAUSE TestAccLinuxFunctionApp_withIPRestrictionsDefaultActionUpdate
=== RUN TestAccLinuxFunctionApp_basicConsumptionPlan
=== PAUSE TestAccLinuxFunctionApp_basicConsumptionPlan
=== RUN TestAccLinuxFunctionApp_basicElasticPremiumPlan
=== PAUSE TestAccLinuxFunctionApp_basicElasticPremiumPlan
=== RUN TestAccLinuxFunctionApp_basicPremiumAppServicePlan
=== PAUSE TestAccLinuxFunctionApp_basicPremiumAppServicePlan
=== RUN TestAccLinuxFunctionApp_basicStandardPlan
=== PAUSE TestAccLinuxFunctionApp_basicStandardPlan
=== RUN TestAccLinuxFunctionApp_withAppSettingsBasic
=== PAUSE TestAccLinuxFunctionApp_withAppSettingsBasic
=== RUN TestAccLinuxFunctionApp_withAppSettingsConsumption
=== PAUSE TestAccLinuxFunctionApp_withAppSettingsConsumption
=== RUN TestAccLinuxFunctionApp_withAppSettingsElasticPremiumPlan
=== PAUSE TestAccLinuxFunctionApp_withAppSettingsElasticPremiumPlan
=== RUN TestAccLinuxFunctionApp_withCustomContentShareElasticPremiumPlan
=== PAUSE TestAccLinuxFunctionApp_withCustomContentShareElasticPremiumPlan
=== RUN TestAccLinuxFunctionApp_withCustomContentShareVnetEnabled
=== PAUSE TestAccLinuxFunctionApp_withCustomContentShareVnetEnabled
=== RUN TestAccLinuxFunctionApp_withAppSettingsPremiumPlan
=== PAUSE TestAccLinuxFunctionApp_withAppSettingsPremiumPlan
=== RUN TestAccLinuxFunctionApp_withAppSettingsStandardPlan
=== PAUSE TestAccLinuxFunctionApp_withAppSettingsStandardPlan
=== RUN TestAccLinuxFunctionApp_withAppSettingsUserSettingUpdate
=== PAUSE TestAccLinuxFunctionApp_withAppSettingsUserSettingUpdate
=== RUN TestAccLinuxFunctionApp_addAppSettings
=== PAUSE TestAccLinuxFunctionApp_addAppSettings
=== RUN TestAccLinuxFunctionApp_stickySettings
=== PAUSE TestAccLinuxFunctionApp_stickySettings
=== RUN TestAccLinuxFunctionApp_stickySettingsUpdate
=== PAUSE TestAccLinuxFunctionApp_stickySettingsUpdate
=== RUN TestAccLinuxFunctionApp_zipDeploy
=== PAUSE TestAccLinuxFunctionApp_zipDeploy
=== RUN TestAccLinuxFunctionApp_withBackupElasticPremiumPlan
=== PAUSE TestAccLinuxFunctionApp_withBackupElasticPremiumPlan
=== RUN TestAccLinuxFunctionApp_withBackupPremiumPlan
=== PAUSE TestAccLinuxFunctionApp_withBackupPremiumPlan
=== RUN TestAccLinuxFunctionApp_withBackupStandardPlan
=== PAUSE TestAccLinuxFunctionApp_withBackupStandardPlan
=== RUN TestAccLinuxFunctionApp_consumptionComplete
=== PAUSE TestAccLinuxFunctionApp_consumptionComplete
=== RUN TestAccLinuxFunctionApp_consumptionCompleteUpdate
=== PAUSE TestAccLinuxFunctionApp_consumptionCompleteUpdate
=== RUN TestAccLinuxFunctionApp_elasticPremiumCompleteWithVnetProperties
=== PAUSE TestAccLinuxFunctionApp_elasticPremiumCompleteWithVnetProperties
=== RUN TestAccLinuxFunctionApp_elasticPremiumComplete
=== PAUSE TestAccLinuxFunctionApp_elasticPremiumComplete
=== RUN TestAccLinuxFunctionApp_standardComplete
=== PAUSE TestAccLinuxFunctionApp_standardComplete
=== RUN TestAccLinuxFunctionApp_withAuthSettingsStandard
=== PAUSE TestAccLinuxFunctionApp_withAuthSettingsStandard
=== RUN TestAccLinuxFunctionApp_withStorageAccountBlock
=== PAUSE TestAccLinuxFunctionApp_withStorageAccountBlock
=== RUN TestAccLinuxFunctionApp_withStorageAccountBlocks
=== PAUSE TestAccLinuxFunctionApp_withStorageAccountBlocks
=== RUN TestAccLinuxFunctionApp_withStorageAccountBlockUpdate
=== PAUSE TestAccLinuxFunctionApp_withStorageAccountBlockUpdate
=== RUN TestAccLinuxFunctionApp_scmIpRestrictionSubnet
=== PAUSE TestAccLinuxFunctionApp_scmIpRestrictionSubnet
=== RUN TestAccLinuxFunctionApp_withAuthSettingsConsumption
=== PAUSE TestAccLinuxFunctionApp_withAuthSettingsConsumption
=== RUN TestAccLinuxFunctionApp_builtInLogging
=== PAUSE TestAccLinuxFunctionApp_builtInLogging
=== RUN TestAccLinuxFunctionApp_withConnectionStrings
=== PAUSE TestAccLinuxFunctionApp_withConnectionStrings
=== RUN TestAccLinuxFunctionApp_withConnectionStringsUpdate
=== PAUSE TestAccLinuxFunctionApp_withConnectionStringsUpdate
=== RUN TestAccLinuxFunctionApp_dailyTimeQuotaConsumptionPlan
=== PAUSE TestAccLinuxFunctionApp_dailyTimeQuotaConsumptionPlan
=== RUN TestAccLinuxFunctionApp_dailyTimeQuotaElasticPremiumPlan
=== PAUSE TestAccLinuxFunctionApp_dailyTimeQuotaElasticPremiumPlan
=== RUN TestAccLinuxFunctionApp_healthCheckPathWithEviction
=== PAUSE TestAccLinuxFunctionApp_healthCheckPathWithEviction
=== RUN TestAccLinuxFunctionApp_healthCheckPathWithEvictionUpdate
=== PAUSE TestAccLinuxFunctionApp_healthCheckPathWithEvictionUpdate
=== RUN TestAccLinuxFunctionApp_appServiceLogging
=== PAUSE TestAccLinuxFunctionApp_appServiceLogging
=== RUN TestAccLinuxFunctionApp_appServiceLoggingUpdate
=== PAUSE TestAccLinuxFunctionApp_appServiceLoggingUpdate
=== RUN TestAccLinuxFunctionApp_appStackDotNet31
=== PAUSE TestAccLinuxFunctionApp_appStackDotNet31
=== RUN TestAccLinuxFunctionApp_appStackCustom
=== PAUSE TestAccLinuxFunctionApp_appStackCustom
=== RUN TestAccLinuxFunctionApp_appStackDotNet6
=== PAUSE TestAccLinuxFunctionApp_appStackDotNet6
=== RUN TestAccLinuxFunctionApp_appStackDotNet6Isolated
=== PAUSE TestAccLinuxFunctionApp_appStackDotNet6Isolated
=== RUN TestAccLinuxFunctionApp_appStackDotNet8
=== PAUSE TestAccLinuxFunctionApp_appStackDotNet8
=== RUN TestAccLinuxFunctionApp_appStackDotNet8ConsumptionPlan
=== PAUSE TestAccLinuxFunctionApp_appStackDotNet8ConsumptionPlan
=== RUN TestAccLinuxFunctionApp_appStackDotNet8Isolated
=== PAUSE TestAccLinuxFunctionApp_appStackDotNet8Isolated
=== RUN TestAccLinuxFunctionApp_appStackDotNet9Isolated
=== PAUSE TestAccLinuxFunctionApp_appStackDotNet9Isolated
=== RUN TestAccLinuxFunctionApp_appStackPython
=== PAUSE TestAccLinuxFunctionApp_appStackPython
=== RUN TestAccLinuxFunctionApp_appStackPythonUpdate
=== PAUSE TestAccLinuxFunctionApp_appStackPythonUpdate
=== RUN TestAccLinuxFunctionApp_appStackNode
=== PAUSE TestAccLinuxFunctionApp_appStackNode
=== RUN TestAccLinuxFunctionApp_appStackNodeUpdate
=== PAUSE TestAccLinuxFunctionApp_appStackNodeUpdate
=== RUN TestAccLinuxFunctionApp_appStackJava
=== PAUSE TestAccLinuxFunctionApp_appStackJava
=== RUN TestAccLinuxFunctionApp_appStackJava21
=== PAUSE TestAccLinuxFunctionApp_appStackJava21
=== RUN TestAccLinuxFunctionApp_appStackJavaUpdate
=== PAUSE TestAccLinuxFunctionApp_appStackJavaUpdate
=== RUN TestAccLinuxFunctionApp_appStackDocker
=== PAUSE TestAccLinuxFunctionApp_appStackDocker
=== RUN TestAccLinuxFunctionApp_appStackDockerManagedServiceIdentity
=== PAUSE TestAccLinuxFunctionApp_appStackDockerManagedServiceIdentity
=== RUN TestAccLinuxFunctionApp_appStackPowerShellCore
=== PAUSE TestAccLinuxFunctionApp_appStackPowerShellCore
=== RUN TestAccLinuxFunctionApp_appStackPowerShellCore72
=== PAUSE TestAccLinuxFunctionApp_appStackPowerShellCore72
=== RUN TestAccLinuxFunctionApp_appStackPowerShellCore74
=== PAUSE TestAccLinuxFunctionApp_appStackPowerShellCore74
=== RUN TestAccLinuxFunctionApp_appStackUpdate
=== PAUSE TestAccLinuxFunctionApp_appStackUpdate
=== RUN TestAccLinuxFunctionApp_identity
=== PAUSE TestAccLinuxFunctionApp_identity
=== RUN TestAccLinuxFunctionApp_identityKeyVaultIdentity
=== PAUSE TestAccLinuxFunctionApp_identityKeyVaultIdentity
=== RUN TestAccLinuxFunctionApp_updateServicePlan
=== PAUSE TestAccLinuxFunctionApp_updateServicePlan
=== RUN TestAccLinuxFunctionApp_updateStorageAccount
=== PAUSE TestAccLinuxFunctionApp_updateStorageAccount
=== RUN TestAccLinuxFunctionApp_msiStorageAccountElastic
=== PAUSE TestAccLinuxFunctionApp_msiStorageAccountElastic
=== RUN TestAccLinuxFunctionApp_msiStorageAccountStandard
=== PAUSE TestAccLinuxFunctionApp_msiStorageAccountStandard
=== RUN TestAccLinuxFunctionApp_msiStorageAccountUpdate
=== PAUSE TestAccLinuxFunctionApp_msiStorageAccountUpdate
=== RUN TestAccLinuxFunctionApp_storageAccountKeyVaultSecret
=== PAUSE TestAccLinuxFunctionApp_storageAccountKeyVaultSecret
=== RUN TestAccLinuxFunctionApp_storageAccountKeyVaultSecretVersionless
=== PAUSE TestAccLinuxFunctionApp_storageAccountKeyVaultSecretVersionless
=== RUN TestAccLinuxFunctionApp_corsUpdate
=== PAUSE TestAccLinuxFunctionApp_corsUpdate
=== RUN TestAccLinuxFunctionApp_publicNetworkAccessDisabled
=== PAUSE TestAccLinuxFunctionApp_publicNetworkAccessDisabled
=== RUN TestAccLinuxFunctionApp_publicNetworkAccessUpdate
=== PAUSE TestAccLinuxFunctionApp_publicNetworkAccessUpdate
=== RUN TestAccLinuxFunctionApp_consumptionPlanBackupShouldError
=== PAUSE TestAccLinuxFunctionApp_consumptionPlanBackupShouldError
=== RUN TestAccLinuxFunctionApp_basicPlanBackupShouldError
=== PAUSE TestAccLinuxFunctionApp_basicPlanBackupShouldError
=== RUN TestAccLinuxFunctionApp_vNetIntegrationWithVnetProperties
=== PAUSE TestAccLinuxFunctionApp_vNetIntegrationWithVnetProperties
=== RUN TestAccLinuxFunctionApp_vNetIntegration
=== PAUSE TestAccLinuxFunctionApp_vNetIntegration
=== RUN TestAccLinuxFunctionApp_vNetIntegrationUpdate
=== PAUSE TestAccLinuxFunctionApp_vNetIntegrationUpdate
=== RUN TestAccLinuxFunctionApp_vNetIntegrationUpdateWithVnetProperties
=== PAUSE TestAccLinuxFunctionApp_vNetIntegrationUpdateWithVnetProperties
=== RUN TestAccLinuxFunctionApp_basicOutputs
=== PAUSE TestAccLinuxFunctionApp_basicOutputs
=== CONT TestAccLinuxFunctionApp_authV2AzureActiveDirectory
=== CONT TestAccLinuxFunctionApp_builtInLogging
=== CONT TestAccLinuxFunctionApp_appStackDockerManagedServiceIdentity
=== CONT TestAccLinuxFunctionApp_storageAccountKeyVaultSecret
=== CONT TestAccLinuxFunctionApp_identityKeyVaultIdentity
=== CONT TestAccLinuxFunctionApp_appStackPowerShellCore74
=== CONT TestAccLinuxFunctionApp_identity
=== CONT TestAccLinuxFunctionApp_msiStorageAccountElastic
--- PASS: TestAccLinuxFunctionApp_storageAccountKeyVaultSecret (181.33s)
=== CONT TestAccLinuxFunctionApp_withAppSettingsConsumption
=== NAME TestAccLinuxFunctionApp_authV2AzureActiveDirectory
testcase.go:173: Step 1/3 error: Error running apply: exit status 1

    Error: Creating group "acctestspa-250115110009483343"

      with azuread_group.test,
      on terraform_plugin_test.tf line 63, in resource "azuread_group" "test":
      63: resource "azuread_group" "test" {

    GroupsClient.BaseClient.Post(): unexpected status 403 with OData error:
    Authorization_RequestDenied: Insufficient privileges to complete the
    operation.

--- FAIL: TestAccLinuxFunctionApp_authV2AzureActiveDirectory (406.56s)
=== CONT TestAccLinuxFunctionApp_withAuthSettingsConsumption
--- PASS: TestAccLinuxFunctionApp_builtInLogging (706.11s)
=== CONT TestAccLinuxFunctionApp_scmIpRestrictionSubnet
--- PASS: TestAccLinuxFunctionApp_identityKeyVaultIdentity (776.86s)
=== CONT TestAccLinuxFunctionApp_withStorageAccountBlockUpdate
--- PASS: TestAccLinuxFunctionApp_appStackDockerManagedServiceIdentity (789.98s)
=== CONT TestAccLinuxFunctionApp_msiStorageAccountUpdate
--- PASS: TestAccLinuxFunctionApp_appStackPowerShellCore74 (806.34s)
=== CONT TestAccLinuxFunctionApp_withStorageAccountBlocks
--- PASS: TestAccLinuxFunctionApp_withAppSettingsConsumption (662.24s)
=== CONT TestAccLinuxFunctionApp_msiStorageAccountStandard
--- PASS: TestAccLinuxFunctionApp_msiStorageAccountElastic (852.41s)
=== CONT TestAccLinuxFunctionApp_withStorageAccountBlock
--- PASS: TestAccLinuxFunctionApp_withAuthSettingsConsumption (643.42s)
=== CONT TestAccLinuxFunctionApp_withAuthSettingsStandard
--- PASS: TestAccLinuxFunctionApp_scmIpRestrictionSubnet (519.77s)
=== CONT TestAccLinuxFunctionApp_zipDeploy
=== NAME TestAccLinuxFunctionApp_withStorageAccountBlockUpdate
testcase.go:173: Step 4/15 error: Pre-apply plan check(s) failed:
'azurerm_linux_function_app.test' - expected action to not be Replace, path: [[name]] tried to update a value that is ForceNew
--- FAIL: TestAccLinuxFunctionApp_withStorageAccountBlockUpdate (555.86s)
=== CONT TestAccLinuxFunctionApp_stickySettingsUpdate
--- PASS: TestAccLinuxFunctionApp_withStorageAccountBlocks (667.35s)
=== CONT TestAccLinuxFunctionApp_stickySettings
--- PASS: TestAccLinuxFunctionApp_withStorageAccountBlock (657.89s)
=== CONT TestAccLinuxFunctionApp_standardComplete
--- PASS: TestAccLinuxFunctionApp_msiStorageAccountStandard (708.93s)
=== CONT TestAccLinuxFunctionApp_addAppSettings
--- PASS: TestAccLinuxFunctionApp_withAuthSettingsStandard (575.55s)
=== CONT TestAccLinuxFunctionApp_elasticPremiumComplete
--- PASS: TestAccLinuxFunctionApp_msiStorageAccountUpdate (1009.04s)
=== CONT TestAccLinuxFunctionApp_withAppSettingsUserSettingUpdate
--- PASS: TestAccLinuxFunctionApp_identity (1856.18s)
=== CONT TestAccLinuxFunctionApp_elasticPremiumCompleteWithVnetProperties
--- PASS: TestAccLinuxFunctionApp_stickySettings (572.07s)
=== CONT TestAccLinuxFunctionApp_withAppSettingsStandardPlan
--- PASS: TestAccLinuxFunctionApp_standardComplete (588.96s)
=== CONT TestAccLinuxFunctionApp_consumptionCompleteUpdate
--- PASS: TestAccLinuxFunctionApp_elasticPremiumComplete (599.40s)
=== CONT TestAccLinuxFunctionApp_withAppSettingsPremiumPlan
--- PASS: TestAccLinuxFunctionApp_zipDeploy (1101.42s)
=== CONT TestAccLinuxFunctionApp_consumptionComplete
--- PASS: TestAccLinuxFunctionApp_elasticPremiumCompleteWithVnetProperties (628.97s)
=== CONT TestAccLinuxFunctionApp_withCustomContentShareVnetEnabled
--- PASS: TestAccLinuxFunctionApp_withAppSettingsStandardPlan (594.57s)
=== CONT TestAccLinuxFunctionApp_withCustomContentShareElasticPremiumPlan
--- PASS: TestAccLinuxFunctionApp_withAppSettingsUserSettingUpdate (960.41s)
=== CONT TestAccLinuxFunctionApp_withAppSettingsElasticPremiumPlan
--- PASS: TestAccLinuxFunctionApp_addAppSettings (1258.29s)
=== CONT TestAccLinuxFunctionApp_withBackupStandardPlan
--- PASS: TestAccLinuxFunctionApp_withAppSettingsPremiumPlan (597.39s)
=== CONT TestAccLinuxFunctionApp_appStackUpdate
--- PASS: TestAccLinuxFunctionApp_consumptionComplete (613.39s)
=== CONT TestAccLinuxFunctionApp_withBackupPremiumPlan
--- PASS: TestAccLinuxFunctionApp_consumptionCompleteUpdate (1149.79s)
=== CONT TestAccLinuxFunctionApp_withBackupElasticPremiumPlan
--- PASS: TestAccLinuxFunctionApp_withAppSettingsElasticPremiumPlan (533.66s)
=== CONT TestAccLinuxFunctionApp_updateStorageAccount
--- PASS: TestAccLinuxFunctionApp_stickySettingsUpdate (2064.46s)
=== CONT TestAccLinuxFunctionApp_updateServicePlan
--- PASS: TestAccLinuxFunctionApp_withBackupStandardPlan (606.04s)
=== CONT TestAccLinuxFunctionApp_basicPlanBackupShouldError
--- PASS: TestAccLinuxFunctionApp_withCustomContentShareVnetEnabled (1082.98s)
=== CONT TestAccLinuxFunctionApp_authV2UpgradeFromV1
--- PASS: TestAccLinuxFunctionApp_withBackupPremiumPlan (631.73s)
=== CONT TestAccLinuxFunctionApp_basicOutputs
--- PASS: TestAccLinuxFunctionApp_withCustomContentShareElasticPremiumPlan (954.38s)
=== CONT TestAccLinuxFunctionApp_withAppSettingsBasic
--- PASS: TestAccLinuxFunctionApp_basicPlanBackupShouldError (263.68s)
=== CONT TestAccLinuxFunctionApp_vNetIntegrationUpdateWithVnetProperties
--- PASS: TestAccLinuxFunctionApp_appStackUpdate (978.39s)
=== CONT TestAccLinuxFunctionApp_basicStandardPlan
--- PASS: TestAccLinuxFunctionApp_withBackupElasticPremiumPlan (644.14s)
=== CONT TestAccLinuxFunctionApp_vNetIntegrationUpdate
--- PASS: TestAccLinuxFunctionApp_basicOutputs (560.56s)
=== CONT TestAccLinuxFunctionApp_basicPremiumAppServicePlan
--- PASS: TestAccLinuxFunctionApp_withAppSettingsBasic (552.88s)
=== CONT TestAccLinuxFunctionApp_vNetIntegration
--- PASS: TestAccLinuxFunctionApp_updateStorageAccount (950.48s)
=== CONT TestAccLinuxFunctionApp_basicElasticPremiumPlan
--- PASS: TestAccLinuxFunctionApp_updateServicePlan (944.34s)
=== CONT TestAccLinuxFunctionApp_vNetIntegrationWithVnetProperties
--- PASS: TestAccLinuxFunctionApp_basicStandardPlan (543.26s)
=== CONT TestAccLinuxFunctionApp_basicConsumptionPlan
--- PASS: TestAccLinuxFunctionApp_basicPremiumAppServicePlan (541.15s)
=== CONT TestAccLinuxFunctionApp_publicNetworkAccessDisabled
--- PASS: TestAccLinuxFunctionApp_vNetIntegration (578.67s)
=== CONT TestAccLinuxFunctionApp_withIPRestrictionsDefaultActionUpdate
--- PASS: TestAccLinuxFunctionApp_basicElasticPremiumPlan (570.44s)
=== CONT TestAccLinuxFunctionApp_consumptionPlanBackupShouldError
--- PASS: TestAccLinuxFunctionApp_vNetIntegrationWithVnetProperties (607.88s)
=== CONT TestAccLinuxFunctionApp_withIPRestrictionsDefaultAction
--- PASS: TestAccLinuxFunctionApp_basicConsumptionPlan (624.83s)
=== CONT TestAccLinuxFunctionApp_publicNetworkAccessUpdate
--- PASS: TestAccLinuxFunctionApp_consumptionPlanBackupShouldError (221.18s)
=== CONT TestAccLinuxFunctionApp_withIPRestrictionsDescription
=== NAME TestAccLinuxFunctionApp_authV2UpgradeFromV1
testcase.go:173: Error running post-test destroy, there may be dangling resources: exit status 1

    Error: deleting Resource Group "acctestRG-LFA-250115110009493500": the Resource Group still contains Resources.

    Terraform is configured to check for Resources within the Resource Group when deleting the Resource Group - and
    raise an error if nested Resources still exist to avoid unintentionally deleting these Resources.

    Terraform has detected that the following Resources still exist within the Resource Group:

    * `/subscriptions/a7c38d21-c587-4bd0-9913-67218cfdc5bf/resourceGroups/acctestRG-LFA-250115110009493500/providers/microsoft.alertsmanagement/smartDetectorAlertRules/Failure Anomalies - acctestappinsights-250115110009493500`

    This feature is intended to avoid the unintentional destruction of nested Resources provisioned through some
    other means (for example, an ARM Template Deployment) - as such you must either remove these Resources, or
    disable this behaviour using the feature flag `prevent_deletion_if_contains_resources` within the `features`
    block when configuring the Provider, for example:

    provider "azurerm" {
      features {
        resource_group {
          prevent_deletion_if_contains_resources = false
        }
      }
    }

    When that feature flag is set, Terraform will skip checking for any Resources within the Resource Group and
    delete this using the Azure API directly (which will clear up any nested resources).

    More information on the `features` block can be found in the documentation:
    https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/features-block

--- FAIL: TestAccLinuxFunctionApp_authV2UpgradeFromV1 (1544.87s)
=== CONT TestAccLinuxFunctionApp_basicRuntimeCheck
--- PASS: TestAccLinuxFunctionApp_publicNetworkAccessDisabled (561.79s)
=== CONT TestAccLinuxFunctionApp_basicBasicPlan
--- PASS: TestAccLinuxFunctionApp_vNetIntegrationUpdateWithVnetProperties (1564.00s)
=== CONT TestAccLinuxFunctionApp_withIPRestrictions
--- PASS: TestAccLinuxFunctionApp_vNetIntegrationUpdate (1541.12s)
=== CONT TestAccLinuxFunctionApp_corsUpdate
--- PASS: TestAccLinuxFunctionApp_withIPRestrictionsDefaultAction (556.48s)
=== CONT TestAccLinuxFunctionApp_appStackPowerShellCore72
--- PASS: TestAccLinuxFunctionApp_basicRuntimeCheck (567.14s)
=== CONT TestAccLinuxFunctionApp_appStackDotNet8
--- PASS: TestAccLinuxFunctionApp_basicBasicPlan (552.90s)
=== CONT TestAccLinuxFunctionApp_appStackNode
--- PASS: TestAccLinuxFunctionApp_withIPRestrictions (579.69s)
=== CONT TestAccLinuxFunctionApp_appStackPythonUpdate
--- PASS: TestAccLinuxFunctionApp_withIPRestrictionsDefaultActionUpdate (1287.28s)
=== CONT TestAccLinuxFunctionApp_appStackDocker
--- PASS: TestAccLinuxFunctionApp_appStackPowerShellCore72 (556.22s)
=== CONT TestAccLinuxFunctionApp_appStackPython
=== NAME TestAccLinuxFunctionApp_appStackNode
testcase.go:173: Step 1/3 error: Error running apply: exit status 1

    Error: creating App Service Plan (Subscription: "a7c38d21-c587-4bd0-9913-67218cfdc5bf"
    Resource Group Name: "acctestRG-LFA-250115110009492210"
    Server Farm Name: "acctestASP-250115110009492210"): performing CreateOrUpdate: unexpected status 409 (409 Conflict) with response: {"Code":"Conflict","Message":"Cannot modify this web hosting plan because another operation is in progress. Details: Id: e02f075f-7328-4db2-8914-1dd9a2ee92d7, OperationName: Create, CreatedTime: 1/15/2025 3:38:32 PM, RequestId: 7542313f-0f72-40a8-8bee-04887d470c50, EntityType: 2","Target":null,"Details":[{"Message":"Cannot modify this web hosting plan because another operation is in progress. Details: Id: e02f075f-7328-4db2-8914-1dd9a2ee92d7, OperationName: Create, CreatedTime: 1/15/2025 3:38:32 PM, RequestId: 7542313f-0f72-40a8-8bee-04887d470c50, EntityType: 2"},{"Code":"Conflict"},{"ErrorEntity":{"ExtendedCode":"59205","MessageTemplate":"Cannot modify this web hosting plan because another operation is in progress. Details: {0}","Parameters":["Id: e02f075f-7328-4db2-8914-1dd9a2ee92d7, OperationName: Create, CreatedTime: 1/15/2025 3:38:32 PM, RequestId: 7542313f-0f72-40a8-8bee-04887d470c50, EntityType: 2"],"Code":"Conflict","Message":"Cannot modify this web hosting plan because another operation is in progress. Details: Id: e02f075f-7328-4db2-8914-1dd9a2ee92d7, OperationName: Create, CreatedTime: 1/15/2025 3:38:32 PM, RequestId: 7542313f-0f72-40a8-8bee-04887d470c50, EntityType: 2"}}],"Innererror":null}

      with azurerm_service_plan.test,
      on terraform_plugin_test.tf line 49, in resource "azurerm_service_plan" "test":
      49: resource "azurerm_service_plan" "test" {

    creating App Service Plan (Subscription:
    "a7c38d21-c587-4bd0-9913-67218cfdc5bf"
    Resource Group Name: "acctestRG-LFA-250115110009492210"
    Server Farm Name: "acctestASP-250115110009492210"): performing
    CreateOrUpdate: unexpected status 409 (409 Conflict) with response:
    {"Code":"Conflict","Message":"Cannot modify this web hosting plan because
    another operation is in progress. Details: Id:
    e02f075f-7328-4db2-8914-1dd9a2ee92d7, OperationName: Create, CreatedTime:
    1/15/2025 3:38:32 PM, RequestId: 7542313f-0f72-40a8-8bee-04887d470c50,
    EntityType: 2","Target":null,"Details":[{"Message":"Cannot modify this web
    hosting plan because another operation is in progress. Details: Id:
    e02f075f-7328-4db2-8914-1dd9a2ee92d7, OperationName: Create, CreatedTime:
    1/15/2025 3:38:32 PM, RequestId: 7542313f-0f72-40a8-8bee-04887d470c50,
    EntityType:
    2"},{"Code":"Conflict"},{"ErrorEntity":{"ExtendedCode":"59205","MessageTemplate":"Cannot
    modify this web hosting plan because another operation is in progress.
    Details: {0}","Parameters":["Id: e02f075f-7328-4db2-8914-1dd9a2ee92d7,
    OperationName: Create, CreatedTime: 1/15/2025 3:38:32 PM, RequestId:
    7542313f-0f72-40a8-8bee-04887d470c50, EntityType:
    2"],"Code":"Conflict","Message":"Cannot modify this web hosting plan because
    another operation is in progress. Details: Id:
    e02f075f-7328-4db2-8914-1dd9a2ee92d7, OperationName: Create, CreatedTime:
    1/15/2025 3:38:32 PM, RequestId: 7542313f-0f72-40a8-8bee-04887d470c50,
    EntityType: 2"}}],"Innererror":null}

--- FAIL: TestAccLinuxFunctionApp_appStackNode (404.25s)
=== CONT TestAccLinuxFunctionApp_appStackJavaUpdate
--- PASS: TestAccLinuxFunctionApp_publicNetworkAccessUpdate (1228.28s)
=== CONT TestAccLinuxFunctionApp_appStackDotNet9Isolated
=== CONT TestAccLinuxFunctionApp_appStackJava21
--- PASS: TestAccLinuxFunctionApp_appStackDotNet8 (556.37s)
--- PASS: TestAccLinuxFunctionApp_withIPRestrictionsDescription (1244.20s)
=== CONT TestAccLinuxFunctionApp_appStackDotNet8Isolated
--- PASS: TestAccLinuxFunctionApp_appStackDocker (517.04s)
=== CONT TestAccLinuxFunctionApp_appStackJava
--- PASS: TestAccLinuxFunctionApp_appStackPython (520.16s)
=== CONT TestAccLinuxFunctionApp_appStackNodeUpdate
--- PASS: TestAccLinuxFunctionApp_appStackPythonUpdate (1041.88s)
=== CONT TestAccLinuxFunctionApp_authV2Github
--- PASS: TestAccLinuxFunctionApp_appStackDotNet9Isolated (683.35s)
=== CONT TestAccLinuxFunctionApp_authV2Update
--- PASS: TestAccLinuxFunctionApp_appStackDotNet8Isolated (655.69s)
=== CONT TestAccLinuxFunctionApp_appStackDotNet8ConsumptionPlan
--- PASS: TestAccLinuxFunctionApp_appStackJava21 (700.53s)
=== CONT TestAccLinuxFunctionApp_authV2MultipleAuths
=== NAME TestAccLinuxFunctionApp_authV2Update
testcase.go:173: Step 1/6 error: Error running apply: exit status 1

    Error: Creating group "acctestspa-250115110009490381"

      with azuread_group.test,
      on terraform_plugin_test.tf line 63, in resource "azuread_group" "test":
      63: resource "azuread_group" "test" {

    GroupsClient.BaseClient.Post(): unexpected status 403 with OData error:
    Authorization_RequestDenied: Insufficient privileges to complete the
    operation.

--- FAIL: TestAccLinuxFunctionApp_authV2Update (210.14s)
=== CONT TestAccLinuxFunctionApp_authV2Twitter
--- PASS: TestAccLinuxFunctionApp_appStackJava (606.44s)
=== CONT TestAccLinuxFunctionApp_authV2Microsoft
--- PASS: TestAccLinuxFunctionApp_appStackJavaUpdate (1077.41s)
=== CONT TestAccLinuxFunctionApp_authV2Google
--- PASS: TestAccLinuxFunctionApp_authV2Github (546.18s)
=== CONT TestAccLinuxFunctionApp_storageAccountKeyVaultSecretVersionless
--- PASS: TestAccLinuxFunctionApp_appStackDotNet8ConsumptionPlan (607.15s)
=== CONT TestAccLinuxFunctionApp_appServiceLogging
--- PASS: TestAccLinuxFunctionApp_authV2MultipleAuths (613.13s)
=== CONT TestAccLinuxFunctionApp_appStackDotNet6Isolated
--- PASS: TestAccLinuxFunctionApp_authV2Twitter (626.65s)
=== CONT TestAccLinuxFunctionApp_authV2AppleCustomSettingName
--- PASS: TestAccLinuxFunctionApp_authV2Microsoft (604.56s)
=== CONT TestAccLinuxFunctionApp_appStackDotNet6
--- PASS: TestAccLinuxFunctionApp_authV2Google (579.63s)
=== CONT TestAccLinuxFunctionApp_appStackCustom
--- PASS: TestAccLinuxFunctionApp_corsUpdate (2472.41s)
=== CONT TestAccLinuxFunctionApp_appStackDotNet31
=== CONT TestAccLinuxFunctionApp_appServiceLoggingUpdate
--- PASS: TestAccLinuxFunctionApp_appServiceLogging (589.71s)
--- PASS: TestAccLinuxFunctionApp_appStackDotNet6Isolated (609.27s)
=== CONT TestAccLinuxFunctionApp_authV2Facebook
--- PASS: TestAccLinuxFunctionApp_appStackDotNet6 (584.28s)
=== CONT TestAccLinuxFunctionApp_authV2AzureActiveDirectoryRemove
--- PASS: TestAccLinuxFunctionApp_authV2AppleCustomSettingName (616.43s)
=== CONT TestAccLinuxFunctionApp_authV2CustomOIDC
--- PASS: TestAccLinuxFunctionApp_appStackCustom (533.10s)
=== CONT TestAccLinuxFunctionApp_authV2Apple
--- PASS: TestAccLinuxFunctionApp_appStackDotNet31 (567.74s)
=== CONT TestAccLinuxFunctionApp_appStackPowerShellCore
--- PASS: TestAccLinuxFunctionApp_appStackNodeUpdate (1951.83s)
=== CONT TestAccLinuxFunctionApp_authV2AzureActiveDirectoryNoSecretName
=== NAME TestAccLinuxFunctionApp_authV2AzureActiveDirectoryRemove
testcase.go:173: Step 1/6 error: Error running apply: exit status 1

    Error: Creating group "acctestspa-250115110009480096"

      with azuread_group.test,
      on terraform_plugin_test.tf line 63, in resource "azuread_group" "test":
      63: resource "azuread_group" "test" {

    GroupsClient.BaseClient.Post(): unexpected status 403 with OData error:
    Authorization_RequestDenied: Insufficient privileges to complete the
    operation.

--- FAIL: TestAccLinuxFunctionApp_authV2AzureActiveDirectoryRemove (247.54s)
=== CONT TestAccLinuxFunctionApp_dailyTimeQuotaElasticPremiumPlan
--- PASS: TestAccLinuxFunctionApp_storageAccountKeyVaultSecretVersionless (1326.66s)
=== CONT TestAccLinuxFunctionApp_healthCheckPathWithEvictionUpdate
--- PASS: TestAccLinuxFunctionApp_authV2Facebook (600.79s)
=== CONT TestAccLinuxFunctionApp_healthCheckPathWithEviction
--- PASS: TestAccLinuxFunctionApp_authV2CustomOIDC (633.80s)
=== CONT TestAccLinuxFunctionApp_withConnectionStringsUpdate
--- PASS: TestAccLinuxFunctionApp_authV2Apple (592.05s)
=== CONT TestAccLinuxFunctionApp_dailyTimeQuotaConsumptionPlan
--- PASS: TestAccLinuxFunctionApp_appStackPowerShellCore (524.98s)
=== CONT TestAccLinuxFunctionApp_withConnectionStrings
--- PASS: TestAccLinuxFunctionApp_authV2AzureActiveDirectoryNoSecretName (528.04s)
--- PASS: TestAccLinuxFunctionApp_dailyTimeQuotaElasticPremiumPlan (622.61s)
--- PASS: TestAccLinuxFunctionApp_healthCheckPathWithEviction (542.33s)
--- PASS: TestAccLinuxFunctionApp_dailyTimeQuotaConsumptionPlan (582.31s)
--- PASS: TestAccLinuxFunctionApp_withConnectionStrings (595.47s)
--- PASS: TestAccLinuxFunctionApp_appServiceLoggingUpdate (1546.16s)
--- PASS: TestAccLinuxFunctionApp_healthCheckPathWithEvictionUpdate (1118.09s)
--- PASS: TestAccLinuxFunctionApp_withConnectionStringsUpdate (1355.32s)
FAIL
FAIL github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice 10322.955s
FAIL
make: *** [GNUmakefile:103: acctests] Error 1

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

Successfully merging this pull request may close these issues.

azurerm_linux_function_app - WEBSITE_CONTENTSHARE setting does not update after apply
1 participant