Skip to content

Improve version compatibility #224

@ammario

Description

@ammario

In coder/coder#13122 a user sees empty values when referencing ${data.coder_workspace.me.template_id} in their template. This happens because their coder server version is behind the provider, and this kind of issue will continue to appear as we implement more provider functionality (#220, #219).

There are two things we should do to fix this:

  1. In our docs under each attribute and resource, declare the Coder version requirements

  2. Replace code like:

    templateID := os.Getenv("CODER_WORKSPACE_TEMPLATE_ID")
    _ = rd.Set("template_id", templateID)
    templateName := os.Getenv("CODER_WORKSPACE_TEMPLATE_NAME")
    _ = rd.Set("template_name", templateName)
    templateVersion := os.Getenv("CODER_WORKSPACE_TEMPLATE_VERSION")
    _ = rd.Set("template_version", templateVersion)

with LookupEnv and fail the build when a value is missing instead of using blanks.

Metadata

Metadata

Assignees

Labels

docsImprovements or additions to documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy