- Notifications
You must be signed in to change notification settings - Fork3
PermalinkChoose a base ref {{ refName }}default Choose a head ref {{ refName }}default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also orlearn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also.Learn more about diff comparisons here.
base repository:coder/terraform-provider-coderd
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
Uh oh!
There was an error while loading.Please reload this page.
base:v0.0.5
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}defaultLoading
...
head repository:coder/terraform-provider-coderd
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
Uh oh!
There was an error while loading.Please reload this page.
compare:v0.0.6
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}defaultLoading
- 2commits
- 3files changed
- 1contributor
Commits on Oct 21, 2024
fix: skip validating unknown versions list (#115)
This fixes an error when setting the `versions` attribute of a`coderd_template` using a variable, e.g:```terraformresource "coderd_template" "dev" { versions = var.template_versions [...]}variable "template_versions" { description = "Versions of the Coder template." default = [ { directory = "modules/" active = true tf_vars = [ { name = "coder_instance" value = "prod" } ] } ]}```would return:```│ Error: Value Conversion Error││ with module.devcontainers.coderd_template.dev,│ An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report the following to the provider│ developer:││ Received unknown value, however the target type cannot handle unknown values. Use the corresponding `types` package type or a custom type that handles│ unknown values.││ Path:│ Target Type: []provider.TemplateVersion│ Suggested Type: basetypes.ListValue```This error was caused by attempting to validate the versions listwithout checking if the config value is unknown. Normally, this valueshould never be unknown, as it's required, but it looks like Terraformdoes a configuration validation *before* variables are populated, aswell as after.To confirm this is the correct solution, we see that all the defaultvalidators perform the same null & unknown checks, e.g:```gofunc (v lengthBetweenValidator) ValidateString(ctx context.Context, request validator.StringRequest, response *validator.StringResponse) {if request.ConfigValue.IsNull() || request.ConfigValue.IsUnknown() {return}...}```
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:git diff v0.0.5...v0.0.6
Uh oh!
There was an error while loading.Please reload this page.