coder / coder/terraform-provider-envbuilder

bug: cache probe still performed even if count == 0

Open
#53 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
13
Forks
6
PR merge metrics
No merged PRs in 30d

Description

A common practice I've found for the `envbuilder_cached_image` resource is the following:

```
resource "envbuilder_cached_image" "cached" {
count = data.coder_workspace.me.start_count
...
}
```

However, when `start_count` is `0` I've still observed the resource being re-created.
This results in workspace shutdowns taking longer than they need, especially for large images.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the envbuilder_cached_image resource and trace how a count of 0 is handled during planning or recreation. Reproduce the issue with start_count set to 0, then verify that no cache probe or resource recreation occurs and add or update coverage for that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, terraform
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.