-
Notifications
You must be signed in to change notification settings - Fork 268
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
terraform-provider-azuredevops_v1.1.1 plugin crashed when running from Azure Devops Pipeline #1104
Comments
We are facing the same issue with an existing pipeline that deployed the Azure DevOps repositories successfully previously. Now we are getting the same 'panic: runtime error: invalid memory address or nil pointer dereference' when rerunning our pipelines. Setting the TF_LOG to Debug doesn't show much. Usually with other providers like azure ad, the logs show the API requests. I tested locally it worked fine but then I deleted the repository and tried to run terraform plan again. Thats when I received the same error. This doesn't seem in-line with how terraform works, i.e. if there is a mismatch between current and desired then it should plan to create the resources, not fail. Question from our side would be, how can we see more details in the logs? i.e. the request/response to Azure DevOps API Or how to debug further. |
Seeing same behavior on two different self-hosted Windows build agents during terraform plan step. Happy to provide any additional output or details as needed to troubleshoot issue.
|
Any update on an effort to fix this issue or any workaround? |
We are seeing this same running in devops - works locally - any ideas? |
It could be due to a service connection being manually deleted and still in the terraform state file. It worked for me after removing my github service connection from my statefile -> #1132 (comment) |
Community Note
Terraform (and Azure DevOps Provider) Version
Terraform v1.9.1
azuredevops v1.1.1
Affected Resource(s)
azuredevops_git_repository
Terraform Configuration Files (Truncated)
./terraform-repository/main.tf
This is not the entire module but is what appears to be causing the error.
./main.tf
Debug Output
https://gist.github.com/LukeE-NEC/46e5473d52cc9a32ff3d1ad9e946d9ed
Panic Output
https://gist.github.com/LukeE-NEC/46e5473d52cc9a32ff3d1ad9e946d9ed
Expected Behavior
We are creating a module which will take a list of repository names, and will create them in our Devops project along with some standard files/settings. This runs successfully when applied locally using a PAT.
However we would like to use an Azure Devops pipeline to run this. This issue occurs when trying to run a plan in the pipeline.
The state file is handled via a service connection with Workload Identity Federation to Azure Resource Manager.
Based on the documentation it looks like all we needed to add in the provider.tf is this:
We have tried with and without the tenant/client id, and also tested with the use_msi options, but the same issue occurs each time.
This is the first time we have tried to configure this so may be user error, however we cannot ascertain what is going wrong from the errors.
Actual Behavior
Init and Validate steps are successful but the plan fails with the error attached above.
Steps to Reproduce
terraform plan
in Azure PipelineThe text was updated successfully, but these errors were encountered: