terraform-provider-bigip icon indicating copy to clipboard operation
terraform-provider-bigip copied to clipboard

integrate .zip function in bigip-fast-template resource

Open gwolfis opened this issue 4 years ago • 2 comments

When using bigip-fast-template resource it is expected that the .mst file first gets packaged into a .zip file.

This means either a manual step or bash scripting from the admin using 'zip' or 'fast packageTemplateSet', store the file somewhere and then it can be included as part of the Terraform resource definition.

My enhancement is about letting one select the .mst file to be used for the template and make that the resource does the packaging before installing the .zip file on the BIG-IP.

Advantages:

  • removes an additional step.
  • since template file stays in mustage (.mst) format it can easily be adjusted and declared again making usage more smooth.

gwolfis avatar Sep 28 '21 07:09 gwolfis

Created [INFRAANO-697] for internal tracking.

trinaths avatar Mar 01 '22 15:03 trinaths

I would also like to see this.

Another solution could be to support accepting the .mst as a b64 encoded, gzip'd string using the built-in base64gzip function like so:

resource "bigip_fast_template" "foo-template" {
  name     = "foo_template"
  source   = base64gzip(file("${path.module}/foo_template.mst"))
  md5_hash = filemd5(base64gzip(file("${path.module}/foo_template.mst")))
}  

s-archer avatar Jan 18 '24 09:01 s-archer