abcxyz / abcxyz/guardian

Unclear how to handle error "Provider dependency changes detected"

Ouverte Adaptée aux débutants
#345 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Go
Étoiles
26
Forks
7
Merge moyen
1 j 1 h
PR mergées (30 j)
1

Description

### 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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
terraform
Domaine
devops, infrastructure, tooling
Type d'issue
Documentation
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
65/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.