Skip to content

v6.0.0

Compare
Choose a tag to compare
@rquadling rquadling released this 15 Dec 16:00
· 19 commits to master since this release

v6.0.0 - 2023/12/15

  • Added error handling for errors generated by the AWS CLI to stop the Terraform Plan. The error is also present in the terraform show output in the checks[*].instances[*].problems node (See the expected plan errors when an AWS error is triggered).
  • Added a lot of Terraform variable validation to ensure the supplied parameters match the limits imposed by AWS (the minimum/maximum length, allowable characters, rules on first characters, etc.)
  • Rewritten the AWS CLI Runner script to not need to deal with wrapping parameters in quotes.
  • Rewritten tests, mainly to reduce the amount of effort to configure them in the future.

BACKWARDS INCOMPATIBILITY

  • The debug_log_filename variable has been removed. As the new code will generate more files to assist in any debugging if it becomes necessary, a new variable alternative_path has been added. If set, this path will contain the following files:

    1. jq_data.json - The data managed by jq to get the Terraform variables accessible to AWS CLI.
    2. jq_error.log - Any errors generated by jq whilst attempting to parse the supplied JSON.
    3. aws_sts.json - The data returned by AWS when assuming a role.
    4. aws_sts_error.log - The full debug and any errors when assuming a role.
    5. aws_call.json - The data returned by AWS when running AWS CLI for the required call.
    6. aws_call_error.log - The full debug and any errors when running AWS CLI for the required call.
    7. results.json - The results of the AWS CLI call that are fed back to Terraform.

But to reduce the amount of files left behind, as standard, all files except results.json are deleted before Terraform is given the results.json file to process.

If you need to have access to the other files, then setting the environment variable MODULE_TERRAFORM_AWS_CLI_RETAIN_LOGS to true will retain all the logs shown above.

If the alternative_path variable is not set, then a default path will be used based upon ./temp/[hash]. The hash is the md5 of all the values of the variables supplied to the module.