F5Networks / f5-appsvcs-templates

F5 BIG-IP Application Service Templates (FAST)
Apache License 2.0
32 stars 13 forks source link

name needs to be the same as the source when using bigip-fast-template resource #85

Closed gwolfis closed 2 years ago

gwolfis commented 2 years ago

Environment

TMOS/Bigip Version: 16.0.1.1
Terraform Version: 0.14.11
Terraform bigip provider Version: 1.11

Summary

FAST documentation shows two options of packaging the .mst template file before being able to upload to BIG-IP. Steps To Reproduce

Steps to reproduce the behavior:

create a zip file from an .mst file by using 'zip'
assign the .zip file as your source file in bigip-fast-template resource.
terraform apply to install the .zip file into BIG-IP to become your FAST template.

Expected Behavior

The template should get installed, but instead Terraform throws you an error. Actual Behavior

NET-ML-00011666:Testing wolfis$ terraform apply --auto-approve bigip_as3.log: Refreshing state... [id=Common] bigip_fast_template.tenant: Creating...

Error: error in creating FAST template set (appA): HTTP 400 :: {"code":400,"message":"Template set (appA) failed validation: template set contains no templates. Error: template set contains no templates\n at /var/config/rest/iapps/f5-appsvcs-templates/nodejs/fastWorker.js:2047:33\n at /var/config/rest/iapps/f5-appsvcs-templates/node_modules/core-js/modules/es.promise.js:118:22\n at flush (/var/config/rest/iapps/f5-appsvcs-templates/node_modules/core-js/internals/microtask.js:27:9)\n at tryCatcher (/usr/share/rest/node/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/usr/share/rest/node/node_modules/bluebird/js/release/promise.js:512:31)\n at Promise._settlePromise (/usr/share/rest/node/node_modules/bluebird/js/release/promise.js:569:18)\n at Promise._settlePromiseCtx (/usr/share/rest/node/node_modules/bluebird/js/release/promise.js:606:10)\n at Async._drainQueue (/usr/share/rest/node/node_modules/bluebird/js/release/async.js:138:12)\n at Async._drainQueues (/usr/share/rest/node/node_modules/bluebird/js/release/async.js:143:10)\n at Immediate.Async.drainQueues (/usr/share/rest/node/node_modules/bluebird/js/release/async.js:17:14)\n at runCallback (timers.js:794:20)\n at tryOnImmediate (timers.js:752:5)\n at processImmediate [as _immediateCallback] (timers.js:729:5)"}

on main.tf line 29, in resource "bigip_fast_template" "tenant": 29: resource "bigip_fast_template" "tenant" {

gwolfis commented 2 years ago

This issue was researched by PD because initially it was expected to be a Terraform provider issue. Tests have shown that using .zip and packageTemplateSet and try to upload the package manually also does not work.

shyawnkarim commented 2 years ago

Thanks for reporting this issue and for providing this background information. We are now tracking this bug internally with ID, MYSTIQUE-513.

shyawnkarim commented 2 years ago

Templateset files must be at the root level within the zip file. In order to avoid the issue of not traversing directories, no matter how deep, the -j switch must be used on the zip command.

We plan to provide additional documentation around this and are now tracking that work with internal ID MYSTIQUE-519.

shyawnkarim commented 2 years ago

Closing. This issue was resolved with Release 1.15.0.