Problem
After upgrading Terraform Enterprise to v202305-1 or later, runs utilizing local-exec provisioner with command = "aws" fail with Exit Status: 127. Output: /bin/sh:aws: not found.
Cause
- From v202304-1 (692) release notes:
-
Terraform Build Workers are deprecated and will be removed in Terraform Enterprise v202305-1. The base image responsible for executing Terraform runs is now
hashicorp/tfc-agent
-
Terraform Build Workers are deprecated and will be removed in Terraform Enterprise v202305-1. The base image responsible for executing Terraform runs is now
- This new base image does not include the
awsexecutable.
Solutions:
-
To guarantee
awscli availability, requires building a custom agent image withawsinstalled. This article details the process.