Prerequisites
- Terraform Enterprise Flexible Deployment Options
Use Case
Determine the version of the tfc-agent
bundled with a Terraform Enterprise Flexible Deployment Options installation.
Procedure
- Docker (container name might differ)
docker exec -it terraform-enterprise-tfe-1 bash -c 'tar --wildcards -xOf tfe-agent.tar "*.json" --exclude="manifest.json"|jq '.config.Labels''
- Kubernetes (pod name might differ)
kubectl exec -it terraform-enterprise-7g98d8e87d-qh8uy -- tar --wildcards -xOf tfe-agent.tar "*.json" --exclude="manifest.json"|jq '.config.Labels'
- Podman (pod name might differ)
podman exec -it terraform-enterprise-terraform-enterprise bash -c 'tar --wildcards -xOf tfe-agent.tar "*.json" --exclude="manifest.json"|jq '.config.Labels''
- Expected output example:
{
"com.hashicorp..version": "1.14.5",
"com.hashicorp.container-type": "tfe-agent",
"maintainer": "HashiCorp Terraform Cloud Support <tf-cloud@hashicorp.support>",
"name": "",
"org.opencontainers.image.ref.name": "ubuntu",
"org.opencontainers.image.source": "https://github.com/hashicorp/security-tsccr",
"org.opencontainers.image.version": "20.04",
"repository": "https://github.com/hashicorp/security-tsccr",
"vendor": "HashiCorp",
"version": "1.14.5"
}