Unclear how to handle error "Provider dependency changes detected"
- Lenguaje dominante
- Go
- Estrellas
- 26
- Forks
- 7
- Merge medio
- 1 d 1 h
- PR fusionados (30 d)
- 1
Descripción
### TL;DR
TF prints "Error: Provider dependency changes detected" and suggests running "terraform init" but it's not clear how to do that. Should I do it locally and send a PR with an updated lockfile? Or should Guardian do it and generate its own commit?
### Expected behavior
Get a normal plan. Alternatively, get actionable instructions on how to resolve the error.
### Observed behavior
I got this error:
```
Error: Provider dependency changes detected
Changes to the required provider dependencies were detected, but the lock
file is read-only. To use and record these requirements, run "terraform init"
without the "-lockfile=readonly" flag.
```
### Environment Details
```markdown
GUARDIAN_VERSION: 1.0.5
GUARDIAN_TERRAFORM_VERSION: 1.5.4
```
### Additional information
I was able to work around this by ensuring I had the same version of Terraform locally, then running `terraform init` which updated the lockfile, and adding that commit to my PR.
Guía de contribución
Línea de trabajo
Look at the Guardian project's Terraform configuration files, likely in the root or a terraform/ directory. The issue is about the provider lockfile (e.g., .terraform.lock.hcl). Run terraform init locally to update the lockfile and see what changes. The fix is to document whether contributors should update the lockfile in their PRs or if the CI system handles it.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- terraform
- Área
- devops, infrastructure, tooling
- Tipo de issue
- Documentación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 65/100