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

Add ability for a resource to "use" another resources output automatically #72

Merged
merged 14 commits into from
Jan 13, 2022

Commits on Jan 5, 2022

  1. Configuration menu
    Copy the full SHA
    4d316cf View commit details
    Browse the repository at this point in the history
  2. Add check for use resources IDs

    Ensure that resource IDs passed into the use field exist and are in the
    same resource group as the current resource.
    heyealex committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    b35e89d View commit details
    Browse the repository at this point in the history
  3. Convert validateConfig functions to be consistent

    Changes CheckResourcesAndGroupNames to be a standalone function that
    returns error and ResourceToGroup map.
    
    Also removed the -c flag from run_examples to remove the deprecation
    warning.
    heyealex committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    3d62508 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2022

  1. Add application of "Use" resource in expand

    Added a step in exand that applies any matching output in "use"
    resources that matches the input of the current resource. In addition,
    tests have been reorganized to decrease the size of the test_config.go
    file.
    heyealex committed Jan 6, 2022
    Configuration menu
    Copy the full SHA
    1679f22 View commit details
    Browse the repository at this point in the history
  2. Add tests for new use field functions

    Add tests for:
    * getResourceByID
    * useResource
    * appendAsSlice
    * getResourceByVarName
    
    Various fixes to support tests also made
    heyealex committed Jan 6, 2022
    Configuration menu
    Copy the full SHA
    3a49407 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b30c4e2 View commit details
    Browse the repository at this point in the history
  4. Add comments, cleanup

    Adding a few function comments and cleaning up a test config
    heyealex committed Jan 6, 2022
    Configuration menu
    Copy the full SHA
    5588df0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    35a6334 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2022

  1. Allow for list merging of "use" resources

    This commit adds the ability to use multiple resource output lists as a
    single setting by merging the lists. This is done using the flatten
    function in terraform and with a new feild in BlueprintConfig with
    functions to be applied to settings in the main.tf file.
    heyealex committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    c71cf21 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c198a17 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2022

  1. Move applyFunctions to Resources and rename

    For simplicity, move applyFunctions into the YamlConfig so it can be
    directly accessed during and after expand in the same way. This allows a
    call to expand to produce a YAML that can be used again in create with
    no differences in the final result.
    
    The name was also changed to WrapSettingsWith to be more explanatory and
    fit better under the Resource struct.
    heyealex committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    c5622cd View commit details
    Browse the repository at this point in the history
  2. Move top level functions into correct files

    Moves expand() and validate() to the expand.go and validate.go file
    respectively for clarity and to keep config.go as top-level as possible.
    heyealex committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    f07d62e View commit details
    Browse the repository at this point in the history
  3. Simplify useResource logic

    Makes a number of changes in the useResource and applyUseResource
    function to decrease complexity and increase readabiltiy.
    heyealex committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    2c9067b View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2022

  1. Address Reviewer Feedback

    * Pass in resource Inputs and Used resource outputs directly to
    UseResource rather than the ResourceInfo structs
    * Improve Comment Clarity
    * Improve error output details
    heyealex committed Jan 13, 2022
    Configuration menu
    Copy the full SHA
    18c12dc View commit details
    Browse the repository at this point in the history