Implement support to skip or disable clone_workspace_repo in IACMTerraformPlugin
C
Comfortable Jaguar
Pipeline Runtime Optimization for ECS IACM Stages Using Custom Image
We are evaluating pipeline runtime optimization for ECS IACM stages with our own terraformer image that has
Terraform (provisioner version aligned with workspaces, e.g. 1.0.11)
The Terraform module tree and any other dependencies.
Provider plugins required for the terraformer modules to run(e.g. hashicorp/aws, hashicorp/null, etc..) by preinitializing the modules during the image build process.
What we need:
Allow us to skip/disable clone_workspace_repo & init step in the IACMTerraformPlugin and let us supply explicit inputs at runtime:
Run Terraform with module_path pointing to the terraform module that is already there in our custom image and pass tfvars_path from cloudos-deployment-files repo (pinned by TF_VALUES_GIT_SHA), similar to our cos-tf / CD Terraform Plugin pattern.
What is the benefit:
- This would reduce IACM stage execution time with the Pre baked image by skipping module repos clone on every exec. This would reduce the API throttling issue that we are encountaring with git requests.
- We often noticed our artifactory system is flaky. If we can use the prebaked image, then it would also eliminate the requests to external dependencies like artifactory system to download the providers on every IACM step execution.
Support ticket opened - https://harnesssupport.zendesk.com/agent/tickets/133316
Tested with custom image in the awsInfo step in this pipeline execution & i noticed the git clone is not skippable in the current state -