terraform-google-modules / terraform-google-startup-scripts

Provides a library of useful startup scripts to embed in VMs
https://registry.terraform.io/modules/terraform-google-modules/startup-scripts/google
Apache License 2.0
73 stars 36 forks source link

(WIP) Add stdlib::setup_init_script #20

Closed jeffmccune closed 5 years ago

jeffmccune commented 5 years ago

9740c7d (Jeff McCune, 5 minutes ago)

Remaining work:

  1. Ensure the function body uses stdlib:: prefixes appropriately.

  2. Add a feature flag to incorporate the function. Reference https://github.com/terraform-google-modules/terraform-google-startup-scripts/pull/12 for how to assemble the content from snippets and user facing feature flags.

  3. Add integration tests. Suggest adding an arbitrary init script in a bucket. Reference the get_from_bucket integration test for fixture examples. Have the init script echo something to the console output and validate the expected output from kitchen.

  4. Suggest exercising the missing mandatory argument case inside integration tests. This was a sharp edge in the field and has been refactored when porting over here.