Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(variable): change 'value' type to Dynamic #277

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Commits on Oct 4, 2024

  1. fix(variable): change 'value' type to JSON

    Changes the Variable 'value' type from string to JSON.
    
    In PrefectHQ/prefect#13543 and associated
    changes around May 2024, Variables were updated from simple strings to
    JSON objects. The Terraform provider has still been treating them as
    strings, so when folks tried to put JSON-compatible values in them,
    Terraform would fail to work with them as found in
    #254
    
    Related to https://linear.app/prefect/issue/PLA-247/changing-variable-to-a-json-value-in-the-ui-makes-next-terraform-run
    
    Related to #254
    mitchnielsen committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    07ce76d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    77701c1 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2024

  1. Change variable attribute type to dynamic

    The JSON custom type won't work for variables, because they can actually
    be almost any type - including standalone numbers and strings.
    mitchnielsen committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    5aaa5c6 View commit details
    Browse the repository at this point in the history
  2. Update test to change value types

    Goes from a string to a bool in the test to confirm variables can store
    multiple types.
    mitchnielsen committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    3d1a587 View commit details
    Browse the repository at this point in the history
  3. Correctly test the name change

    Before, when trying to test a variable resource name change, we were
    actually creating an entirely new resource because we use the same
    (randomized) value for the resource name and the attribute 'name'.
    
    To ensure we're updating the same resource, this hard-codes the resource
    name to 'test'. This shouldn't cause any conflicts with other tests
    because the resource is created in an ephemeral workspace.
    mitchnielsen committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    535195c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    34d48ee View commit details
    Browse the repository at this point in the history
  5. Tidy up

    mitchnielsen committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    7069253 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6c604f7 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2024

  1. Configuration menu
    Copy the full SHA
    ce850a2 View commit details
    Browse the repository at this point in the history