gungthar
gungthar

Reputation: 194

terraform providers causes to TypeError: Cannot read property 'match' of null

I've been receiving the error ##[error]TypeError: Cannot read property 'match' of null when running terraform providers as part of a pipeline in Azure Devops. An oddity is this issue occurs only for my apply step. A previous step which also runs providers returns

terraform.exe providers
 .
 ├── provider.azurerm ~> 1.33.0
 ├── module.acr
 │   └── provider.azurerm ~> 1.33.0
 ├── module.aks
 │   └── provider.azurerm ~> 1.33.0
 ├── module.rg
 │   └── provider.azurerm ~> 1.33.0
 ├── module.sa
 │   └── provider.azurerm ~> 1.33.0
 └── module.spn
     ├── provider.azuread
     ├── provider.azurerm ~> 1.33.0
     └── provider.random

EDIT:

Seems like this was an issue with the path referenced in the Terraform step. Changing it to a valid path has fixed the issue.

Upvotes: 6

Views: 2895

Answers (1)

gungthar
gungthar

Reputation: 194

Seems like this was an issue with the 'Configuration directory' setting in the Terraform 'Validate and Apply' Release Pipeline step. Changing it to the path containing the build artifacts has fixed the issue.

Upvotes: 5

Related Questions