UpdateSourceControl: Failure responding to request: 2023-09-02T18:22:03.4924222Z │ StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest"

Babychen Daisy, Dona 20 Reputation points
2023-09-02T18:29:50.88+00:00

When I am running terraform apply in azure release pipeline, Iam getting error

UpdateSourceControl: Failure responding to request:
2023-09-02T18:22:03.4924222Z │ StatusCode=400 -- Original Error: autorest/azure: Service returned an
2023-09-02T18:22:03.4924521Z │ error. Status=400 Code="BadRequest"


When running from visual studio code, it works. I am using remote state in pipeline. Azure appservice is authorized. Token also there. Couldnt find whta exactly is the issue. Could you please help.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,675 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 16,121 Reputation points Microsoft Employee
    2023-09-09T02:20:28.45+00:00

    @Babychen Daisy, Dona It seems like there is an issue with the request you are sending to Azure. The error message "Status=400 Code="BadRequest"" indicates that the request is not properly formatted or missing required parameters.

    Since the error is occurring only in the Azure release pipeline, it could be related to the pipeline configuration or the environment variables.

    To troubleshoot this issue, you can try the following steps:

    1. Check the pipeline configuration and ensure that all the required parameters are properly set.
    2. Verify that the Azure App Service is authorized to access the resources required by the pipeline.
    3. Check the logs for any additional error messages or warnings that might provide more information about the issue.
    4. Try running the same command from the Azure CLI or Azure Portal to see if the issue is specific to the pipeline.

    If you are still unable to resolve the issue, please provide more information about the pipeline configuration and the resources you are trying to deploy.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.