aws-samples / service-catalog-engine-for-terraform-os

Apache License 2.0
130 stars 40 forks source link

Updates the parameter parser so it returns an exception if no .tf fil… #18

Closed smaly-amazon closed 1 year ago

smaly-amazon commented 1 year ago

Description

Updates the parameter parser so it returns an exception if no .tf files can be found in the artifact's root directory.

This will prevent unexpected noop results when the artifact file is compressed/archived with all the files in a top-level directory, rather than the root-module files at the root of the archive.

A second PR will be published to raise an exception when a provision or update operation is attempted on a an artifact with no .tf files in the root directory.

Testing

  1. Ran go test on the parser code
  2. Invoked from the lambda console
    • Valid artifact with 2 variables
    • Valid artifact with no variables
    • Invalid artifact: No .tf files in the root directory returns exception
  3. Tested with Service Catalog console and describe-provisioning-parameters CLI:
    • Valid artifact with 2 variables
    • Valid artifact with no variables
    • Invalid artifact: No .tf files in the root directory returns exception