Failed to use Service Connection with a certificate: ##[error]Error: Endpoint auth data not present: {Service_Connection_Id}
DryadYao opened this issue · 3 comments
The "Terraform" extension works successfully in the "init" task, but it will show the error in the "plan" task.
The error message is as follows.
2021-04-07T00:05:46.3245113Z ##[error]Error: Endpoint auth data not present: {Service_Connection_Id}
2021-04-07T00:05:46.3253961Z ##[debug]Processed: ##vso[task.issue type=error;]Error: Endpoint auth data not present: {Service_Connection_Id}
2021-04-07T00:05:46.3255829Z ##[debug]Processed: ##vso[task.complete result=Failed;]Error: Endpoint auth data not present: {Service_Connection_Id}
I found a related issue #672.
Hi @DryadYao, You need to let the terraform know where your certificate is. Then, it will work fine. See the below article to know more.
Azure Provider: Authenticating using a Service Principal with a Client Certificate
provider "azurerm" {
features {}
subscription_id = "00000000-0000-0000-0000-000000000000"
client_id = "00000000-0000-0000-0000-000000000000"
client_certificate_path = var.client_certificate_path
client_certificate_password = var.client_certificate_password
tenant_id = "00000000-0000-0000-0000-000000000000"
}
client_certificate_path
is the missing parameter and you need to pass it.
closing it as there is no response.