Schematics job fails with undeclared variable: provision_activity_tracker
Opened this issue · 5 comments
Describe the bug
I am using the option to add a tile to my private catalog; I created the tile and ran it to install the tools into an existing ocp4 cluster on VPC. I filled in all of the required and optional parameters in the tile and created the workspace. The terraform apply in Schematics fails due to a missing variable in stage3-activity-tracker.tf.
Version
The tile version is v1.10-beta.5
Terraform log
2020/08/12 21:48:26 ----- New Workspace Action -----
2020/08/12 21:48:26 Request: activitId=f5e1f900d526a06ebb7da933a0eb63b6, account=9d5d528aa786af01ce99593a827cd68a, owner=dwakeman@us.ibm.com, requestID=c0568773-22cf-4b00-b9f3-164d4176c2e3
2020/08/12 21:48:27 Related Activity: action=WORKSPACE_CREATE, workspaceID=cloudnative-toolkit-garage-dev-tools-01-500c44df-54c6-4e, processedBy=orchestrator-7cb4bc87d6-wxk4j
2020/08/12 21:48:27 Related Workspace: name=cloudnative-toolkit-garage-dev-tools-01, sourcerelease=(not specified), sourceurl=https://github.com/ibm-garage-cloud/ibm-garage-iteration-zero/releases/download/v1.10-beta.5/cloudnative-toolkit.tar.gz
2020/08/12 21:48:30 --- Ready to execute the command ---
2020/08/12 21:48:30 ----- New Action -----
2020/08/12 21:48:30 Request: RepoURL=https://github.com/ibm-garage-cloud/ibm-garage-iteration-zero/releases/download/v1.10-beta.5/cloudnative-toolkit.tar.gz, WorkspaceSource=Schematics, Branch=, Release=, Folder=cloudnative-toolkit
2020/08/12 21:48:30 Related Activity: action=CREATE_TAR_WORKSPACE,processedBy=sandbox-79c44c96fd-thm5c_3051
2020/08/12 21:48:30 Getting tar download command
2020/08/12 21:48:33 No Vulnerabilities Found. Successfully saved all the files from the repo.
2020/08/12 21:48:34 Successfully read the README file
2020/08/12 21:48:35 Done with the Activity
2020/08/12 21:48:35 --- Ready to execute the command ---
2020/08/12 21:48:36 workspace.template.SecFile: c65035f0-a84d-4e30-9e72-3f8587c436d1
2020/08/12 21:48:35 ----- New Action -----
2020/08/12 21:48:35 Request: requestID=c0568773-22cf-4b00-b9f3-164d4176c2e3
2020/08/12 21:48:36 Related Activity: action=Apply, workspaceID=cloudnative-toolkit-garage-dev-tools-01-500c44df-54c6-4e, processedByOrchestrator=ID:"c0568773-22cf-4b00-b9f3-164d4176c2e3_f5e1f900d526a06ebb7da933a0eb63b6" , processedByJob=job-12-543-fd66fc564-xv9gk
2020/08/12 21:48:41 ----- Terraform INIT -----
2020/08/12 21:48:41 Starting command: terraform init -input=false -no-color
2020/08/12 21:48:41 Terraform init | Initializing modules...
2020/08/12 21:48:41 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-ibm-container-platform.git?ref=v1.15.1 for dev_cluster...
2020/08/12 21:48:42 Terraform init | - dev_cluster in .terraform/modules/dev_cluster
2020/08/12 21:48:42 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-ibm-logdna.git?ref=v2.2.0 for dev_infrastructure_logdna...
2020/08/12 21:48:45 Terraform init | - dev_infrastructure_logdna in .terraform/modules/dev_infrastructure_logdna
2020/08/12 21:48:45 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-ibm-sysdig.git?ref=v2.2.0 for dev_infrastructure_sysdig...
2020/08/12 21:48:46 Terraform init | - dev_infrastructure_sysdig in .terraform/modules/dev_infrastructure_sysdig
2020/08/12 21:48:46 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-k8s-olm.git?ref=v1.2.2 for dev_software_olm...
2020/08/12 21:48:46 Terraform init | - dev_software_olm in .terraform/modules/dev_software_olm
2020/08/12 21:48:46 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-k8s-namespace.git?ref=v2.3.2 for dev_sre_namespace...
2020/08/12 21:48:47 Terraform init | - dev_sre_namespace in .terraform/modules/dev_sre_namespace
2020/08/12 21:48:47 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-tools-argocd.git?ref=v2.8.0 for dev_tools_argocd...
2020/08/12 21:48:48 Terraform init | - dev_tools_argocd in .terraform/modules/dev_tools_argocd
2020/08/12 21:48:48 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-tools-artifactory.git?ref=v1.9.0 for dev_tools_artifactory...
2020/08/12 21:48:48 Terraform init | - dev_tools_artifactory in .terraform/modules/dev_tools_artifactory
2020/08/12 21:48:48 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-tools-dashboard.git?ref=v1.7.1 for dev_tools_dashboard...
2020/08/12 21:48:49 Terraform init | - dev_tools_dashboard in .terraform/modules/dev_tools_dashboard
2020/08/12 21:48:49 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-tools-jenkins.git?ref=v1.4.2 for dev_tools_jenkins...
2020/08/12 21:48:50 Terraform init | - dev_tools_jenkins in .terraform/modules/dev_tools_jenkins
2020/08/12 21:48:50 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-k8s-namespace.git?ref=v2.4.0 for dev_tools_namespace...
2020/08/12 21:48:50 Terraform init | - dev_tools_namespace in .terraform/modules/dev_tools_namespace
2020/08/12 21:48:50 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-tools-pactbroker.git?ref=v1.3.0 for dev_tools_pactbroker_release...
2020/08/12 21:48:51 Terraform init | - dev_tools_pactbroker_release in .terraform/modules/dev_tools_pactbroker_release
2020/08/12 21:48:51 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-tools-sonarqube.git?ref=v1.8.0 for dev_tools_sonarqube...
2020/08/12 21:48:52 Terraform init | - dev_tools_sonarqube in .terraform/modules/dev_tools_sonarqube
2020/08/12 21:48:52 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-tools-swaggereditor.git?ref=v1.3.1 for dev_tools_swagger...
2020/08/12 21:48:52 Terraform init | - dev_tools_swagger in .terraform/modules/dev_tools_swagger
2020/08/12 21:48:52 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-tools-tekton.git?ref=v2.0.1 for dev_tools_tekton_release...
2020/08/12 21:48:53 Terraform init | - dev_tools_tekton_release in .terraform/modules/dev_tools_tekton_release
2020/08/12 21:48:53 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-tools-tekton-resources.git?ref=v2.0.0 for dev_tools_tekton_resources...
2020/08/12 21:48:53 Terraform init | - dev_tools_tekton_resources in .terraform/modules/dev_tools_tekton_resources
2020/08/12 21:48:53 Terraform init | Downloading github.com/ibm-garage-cloud/terraform-ibm-activity-tracker.git?ref=v1.1.1 for sre_activity-tracker...
2020/08/12 21:48:54 Terraform init | - sre_activity-tracker in .terraform/modules/sre_activity-tracker
2020/08/12 21:48:54 Terraform init |
2020/08/12 21:48:54 Terraform init | Initializing the backend...
2020/08/12 21:48:54 Terraform init |
2020/08/12 21:48:54 Terraform init | Initializing provider plugins...
2020/08/12 21:48:54 Terraform init | - Checking for available provider plugins...
2020/08/12 21:48:55 Terraform init | - Downloading plugin for provider "helm" (hashicorp/helm) 1.2.4...
2020/08/12 21:48:58 Terraform init |
2020/08/12 21:48:58 Terraform init | The following providers do not have any version constraints in configuration,
2020/08/12 21:48:58 Terraform init | so the latest version was installed.
2020/08/12 21:48:58 Terraform init |
2020/08/12 21:48:58 Terraform init | To prevent automatic upgrades to new major versions that may contain breaking
2020/08/12 21:48:58 Terraform init | changes, it is recommended to add version = "..." constraints to the
2020/08/12 21:48:58 Terraform init | corresponding provider blocks in configuration, with the constraint strings
2020/08/12 21:48:58 Terraform init | suggested below.
2020/08/12 21:48:58 Terraform init |
2020/08/12 21:48:58 Terraform init | * provider.local: version = "~> 1.4"
2020/08/12 21:48:58 Terraform init | * provider.null: version = "~> 2.1"
2020/08/12 21:48:58 Terraform init |
2020/08/12 21:48:58 Terraform init | Terraform has been successfully initialized!
2020/08/12 21:48:58 Command finished successfully.
2020/08/12 21:48:58 ----- Terraform SHOW -----
2020/08/12 21:48:58 Starting command: terraform show -no-color
2020/08/12 21:49:03 Terraform show | No state.
2020/08/12 21:49:03 Command finished successfully.
2020/08/12 21:49:03 ----- Terraform APPLY -----
2020/08/12 21:49:03 Starting command: terraform apply -state=terraform.tfstate -var-file=schematics.tfvars -auto-approve -no-color -parallelism=10
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply | Warning: "function_namespace": [DEPRECATED] This field will be deprecated soon
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply | Warning: "function_namespace": [DEPRECATED] This field will be deprecated soon
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply | Warning: "function_namespace": [DEPRECATED] This field will be deprecated soon
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply | Warning: "function_namespace": [DEPRECATED] This field will be deprecated soon
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply | Error: Reference to undeclared input variable
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply | on stage3-activity-tracker.tf line 7, in module "sre_activity-tracker":
2020/08/12 21:49:29 Terraform apply | 7: provision = var.provision_activity_tracker == "true"
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform apply | An input variable with the name "provision_activity_tracker" has not been
2020/08/12 21:49:29 Terraform apply | declared. This variable can be declared with a variable
2020/08/12 21:49:29 Terraform apply | "provision_activity_tracker" {} block.
2020/08/12 21:49:29 Terraform apply |
2020/08/12 21:49:29 Terraform APPLY error: Terraform APPLY errorexit status 1
2020/08/12 21:49:29 Could not execute action
Additional context
I checked the source code in this repo and indeed there is no variable named provision_activity_tracker
in the variables.tf. On a side note, I would have set this field to false, as I already have an instance of Activity Tracker provisioned in my account in the same region, so it would have failed anyway.
This bug has just been fixed , try https://github.com/ibm-garage-cloud/ibm-garage-iteration-zero/releases/tag/v1.10-beta.6 this just installed cleanly , we are working on pushing a new release with the latest Tekton features and some other useability tweaks
Perfect, thanks! This issue can be closed.
You may want to test as well, but just running another test to validate the logdna and sysdig instances when supplied are added to the OpenShift tools menu
Yep, trying to test it now, but not quite sure how to update the tile in the private catalog. Can I just update the version in the create-catalog-offering.sh
script and run it again? I tried using the "New" button on the tile and changing the URL and the version but it said v1.10-beta.6
was an invalid value.
You can either install another version, we dont support update because the private catalog API is limited for this, so we just delete the old tile and install a new one, they will sit side by side if you dont delete and you can check the version number at the top to check you are running the latest