abcxyz / abcxyz/guardian

Unclear how to handle error "Provider dependency changes detected"

Đang mở Phù hợp với người mới
#345 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Go
Star
26
Fork
7
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
terraform
Lĩnh vực
devops, infrastructure, tooling
Loại issue
Tài liệu
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
65/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.