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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terrafrom not detecting updating of dotnet version of azurerm_linux_web_app 6.0 -> 8.0 #26520

Open
1 task done
davidelcheikh opened this issue Jul 2, 2024 · 5 comments
Open
1 task done

Comments

@davidelcheikh
Copy link

davidelcheikh commented Jul 2, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.9.0

AzureRM Provider Version

3.110.0

Affected Resource(s)/Data Source(s)

azurerm_linux_web_app

Terraform Configuration Files

resource "azurerm_linux_web_app" "appServer" {
  name = "app-server-001"
  resource_group_name = azurerm_resource_group.rg.name
  location            = azurerm_resource_group.rg.location
  service_plan_id     = azurerm_service_plan.id
  https_only          = true
  site_config {
    vnet_route_all_enabled = true
    always_on              = true
    application_stack {
      dotnet_version = "8.0"
    }
    minimum_tls_version = "1.2"
  }

Debug Output/Panic Output

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Expected Behaviour

Deploy app service with .NET 8.0

Actual Behaviour

When running terraform apply with dotnet_version = "8.0" (server version is "6.0"), terraform is not detecting there's been a change in the server infrastructure

Steps to Reproduce

terraform apply -var-file="variables\vars.tfvars.json"

Important Factoids

No response

References

Reference colleagues stack overflow article: https://stackoverflow.com/questions/78694934/terraform-is-not-applying-the-dotnet-version-change-on-azurerm-linux-web-app-app

@xiaxyi
Copy link
Contributor

xiaxyi commented Jul 2, 2024

Thanks @davidelcheikh for raising this issue, the terraform can successfully detect the dotnet version change in my local test as:
image

Are you seeing any diff during the plan? I can't see any log relates to terraform plan so it would be great if you can run terraform plan and share the result here.

@davidelcheikh
Copy link
Author

davidelcheikh commented Jul 3, 2024

That's strange. I also tried to the same and changed my dotnet_version from 8.0 to 6.0 and terraform and I got nothing. See below:

The left is the updated infrastructure and the right is the tfstate file:

2024-07-03_10-43

@xiaxyi
Copy link
Contributor

xiaxyi commented Jul 3, 2024

@davidelcheikh Can you share the output of terraform plan? And just to double confirm that you do use the latest AzureRM provider?

@davidelcheikh
Copy link
Author

@xiaxyi the terraform plan doesn't have the change in dotnet version unfortunately :(

image

@xiaxyi
Copy link
Contributor

xiaxyi commented Jul 4, 2024

@davidelcheikh Can you enable TF log by setting the environment variable

export TF_LOG=DEBUG
export TF_LOG_PATH=C:/Users/xx/logs/debug.log

then run terraform plan / apply and share the debug log here?

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

No branches or pull requests

3 participants