microsoft / azure-pipelines-terraform

Azure Pipelines tasks for installing Terraform and running Terraform commands in a build or release pipeline.
MIT License
107 stars 66 forks source link

Terraform returning 403-AuthorizationFailure This request is not authorized to perform this operation. #239

Open mmohamednazeer opened 1 month ago

mmohamednazeer commented 1 month ago

We are trying to access databricks workspace which has disabled public network access. But we are using service principal which is admin owner of the databricks. But the terraform init thorwing 403 unauthorised access issue, the error message as follows

Failed to get existing workspaces: containers.Client#ListBlobs: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailure" Message="This request is not authorized to perform this operation.\nRequestId:0e888e4f-a01e-006a-5319-135fe5000000\nTime:2024-09-30T09:17:34.1931494Z"
│ 

Taks version : TerraformTaskV2@2

mericstam commented 1 month ago

Hi, first of all, always try to use the the latest version of the task. i.e TerraformTaskV4@4. But I don't think this will help in this matter. You should check the permissions on the App registration in Azure (if you are using Azure) for the SC.

Br Manuel

mmohamednazeer commented 3 weeks ago

I have updated the task version to TerraformTaskV4@4 and terraform version is v1.9.8.

Still I am facing the same issue..