F5Networks / terraform-provider-bigip

Terraform resources that can configure F5 BIG-IP products
https://registry.terraform.io/providers/F5Networks/bigip/latest/docs
Mozilla Public License 2.0
103 stars 119 forks source link

integrate .zip function in bigip-fast-template resource #554

Open gwolfis opened 3 years ago

gwolfis commented 3 years ago

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:

trinaths commented 2 years ago

Created [INFRAANO-697] for internal tracking.

s-archer commented 8 months ago

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")))
}