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

Allow terraform module to specify complex variable structures #4797

Merged
merged 36 commits into from
Oct 3, 2022
Merged

Commits on Aug 23, 2022

  1. Adding capability to specify complex variables type to terraform

    * Terrform variable types are mapped to ansible veriable types
    
    * Currently handles Dict, List, Str, Int, Bool types
    
    * Updated the documentation accordingly
    
    * Updated with an example.
    kosalaat committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    ab08a48 View commit details
    Browse the repository at this point in the history
  2. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    921414a View commit details
    Browse the repository at this point in the history
  3. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    50888d2 View commit details
    Browse the repository at this point in the history
  4. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    cbdad6b View commit details
    Browse the repository at this point in the history
  5. Update plugins/modules/cloud/misc/terraform.py

    Wonder how that missed the PEP8 checks :).
    
    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    760e85e View commit details
    Browse the repository at this point in the history
  6. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    8680f57 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    52b1de1 View commit details
    Browse the repository at this point in the history
  8. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    0f35b78 View commit details
    Browse the repository at this point in the history
  9. Adding integer_types from module_utils

    Simplified the ``integer_types``,  ``str`` and ``float`` value population through ``json.dumps()``.  Now the strings can have special characters which can break the module execution.
    kosalaat committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    7252ec1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    85c58f5 View commit details
    Browse the repository at this point in the history
  11. * Changed to approach to make the code more readble and simple to un…

    …derstand.
    
        * Maintaining the original for loop for the top_level variables. Therefore the rocess_conplex_args() now only handle second level variables when the type() is either Dict or List.
    
        * Json dumps are used only for the low level variables. Terraform CLI had issues interpreting escape sequecences from json.dumps()
    kosalaat committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    217795c View commit details
    Browse the repository at this point in the history
  12. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    d9d468b View commit details
    Browse the repository at this point in the history
  13. adding boolean explicitly, although boolean is a subclass of integer,…

    … adding this for self documentation pupose and the clarity of the code.
    kosalaat committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    5a8c29f View commit details
    Browse the repository at this point in the history
  14. fixing the doc strings

    kosalaat committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    eefbae9 View commit details
    Browse the repository at this point in the history
  15. Update terraform.py

    Fixing docstrings
    kosalaat committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    960c902 View commit details
    Browse the repository at this point in the history
  16. * Introducing format_args funtion to simplify formatting each argumen…

    …t type for top_level and lower level.
    
    * Terraform Lists of strings, numbers, objects and lists are supported.
    
    * Adding COMMAND: to the fail_json msg, for plan failures to help troubleshoot command line arguments.
    kosalaat committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    c73f2ac View commit details
    Browse the repository at this point in the history
  17. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    0b941e4 View commit details
    Browse the repository at this point in the history
  18. * Adding full terraform command to fail_json() when the terrafor pla…

    …n fails
    
        * Fixing a spelling mistake.
    kosalaat committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    1e13d3a View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2022

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

Commits on Sep 7, 2022

  1. * Fixing the new line for the change fragments

    * Removed CR (\r) from the output messages. Now output lines carry only LF (\n), not CRLF (\r\n).
    
    * Added integration testing for complex variables.
    
    * Restructured integration testing code to be more expandable.
    kosalaat committed Sep 7, 2022
    Configuration menu
    Copy the full SHA
    267ff86 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2022

  1. Update changelogs/fragments/4797-terraform-complex-variables.yml

    Co-authored-by: Alexei Znamensky <[email protected]>
    kosalaat and russoz authored Sep 19, 2022
    Configuration menu
    Copy the full SHA
    24ef92f View commit details
    Browse the repository at this point in the history
  2. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Alexei Znamensky <[email protected]>
    kosalaat and russoz authored Sep 19, 2022
    Configuration menu
    Copy the full SHA
    ed372b8 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2022

  1. double-quotes are not properly escaped in shell, and python string

    escaping are nullified the way terraform handle second tier string
    variables (within terraform).
    kosalaat committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    acd61bd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dc9ded7 View commit details
    Browse the repository at this point in the history
  3. integration testing now includes:

    1. Top level strings containing, special shell characters, spaces,
       double-quotes.
    
    2. Second level strings containing, special shell characters, spaces,
       double-quotes repeating double-quotes to ensure proper regex
    substitution.
    kosalaat committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    f7b2aa7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eb3bcd6 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2022

  1. Added complex_vars to switch between the old and the new variable

    interpretations.
    Updated the documentations to reflect the changes.
    Updated the examples.
    Handling '\' as well with the escape sequence.
    kosalaat committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    38b104f View commit details
    Browse the repository at this point in the history
  2. Added tests for the new escape sequences.

    Added multilines tests.
    kosalaat committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    3dbab72 View commit details
    Browse the repository at this point in the history
  3. Restructuring the documente strings to a shorter string.

    Argument_spec changed to 'bool'
    kosalaat committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    eafc630 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0782937 View commit details
    Browse the repository at this point in the history
  5. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein authored Oct 1, 2022
    Configuration menu
    Copy the full SHA
    1def1ec View commit details
    Browse the repository at this point in the history
  6. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein authored Oct 1, 2022
    Configuration menu
    Copy the full SHA
    980faa1 View commit details
    Browse the repository at this point in the history
  7. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein authored Oct 1, 2022
    Configuration menu
    Copy the full SHA
    738597b View commit details
    Browse the repository at this point in the history
  8. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein authored Oct 1, 2022
    Configuration menu
    Copy the full SHA
    53c7887 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2022

  1. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein authored Oct 3, 2022
    Configuration menu
    Copy the full SHA
    9f3063a View commit details
    Browse the repository at this point in the history
  2. Update plugins/modules/cloud/misc/terraform.py

    Co-authored-by: Felix Fontein <[email protected]>
    kosalaat and felixfontein authored Oct 3, 2022
    Configuration menu
    Copy the full SHA
    ab0b1ab View commit details
    Browse the repository at this point in the history