terraform-ibm-modules/terraform-ibm-mas

Seeing blank value output (JSON encoding issues..)

Closed this issue · 3 comments

Scenario 1 (issue during install of MAS):

Github code to recreate this issue --> https://github.com/terraform-ibm-modules/terraform-ibm-mas/tree/nat-jsonissue

Issue:
With above github code, seeing blank value as output for maximo_admin_url on IBM Cloud UI but same works fine on my laptop & on other IDE..please see below screenshots. I even tried overriding the terraform runtime version on catalog page to 1.5.7 (same as on my laptop) but still see the same issue.

Private catalog link --> https://cloud.ibm.com/content-mgmt/catalogs/72e86c0f-df4a-41a6-b39d-9d33739c6c77/ibm-offerings

image (291)
image (292)
image (293)
image (294)

Scenario 2 (issue during uninstall of MAS):
Github code link --> https://github.com/terraform-ibm-modules/terraform-ibm-mas/tree/nat-with-uninst

I resolved the above-mentioned Scenario 1 issue with the code in above github link and it was outputting the admin_url of MAS and pipeline execution status on IBM Cloud UI.

But with this code, I am facing issue while undeploy of deployment (Destroy resources) and it's throwing the error (Program output must be a JSON encoded map of string keys and string values.) as shown in below screenshot.
Note: I tried different JQuery & Python code approach to resolve both the above scenario issues (on my github repo) & it works fine on my laptop but not on IBM Cloud.
Also, tried approaches followed in other TIM modules but with no luck..For eg, --> https://github.com/terraform-ibm-modules/terraform-ibm-toolkit-ocp-vpc/blob/5255369251de752f5bc0832d1ba87570e98f924e/scripts/get-credentials.sh#L22

image (295)

Schematics essentially call the same terraform CLI as on your laptop, so at first glance, it is likely that the scenario are not exactly as on your laptop - eg different inputs, different error conditions (potentially intermittent) rather than being IBM Cloud issues. For example the "json encoding issue" is an error thrown by the hashicorp data external terraform resource. https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/external

Could you include the full logs / or give access for the above. Typically the logs above the error would give further indication.

After script updates this is now resolved