1

Assuming a docker file like this... FROM ubuntu:18.04 ARG TF_VERSION=0.12.25 RUN apt-get install wget -y RUN wget -O terraform.zip https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip In your GitHub action you would need to get the current version from your Dockerfile. export CURRENT_TF_VERSION=$(grep -Eo '[[:...


1

This is indeed a tricky thing to do "right", because there are so many moving parts. I have found that it helps to reduce the degrees of freedom by adopting some conventions, and factoring out some parts. Draw a line between where Terraform is responsible and where Ansible becomes responsible, and separate those stages. You do this so that you can deal with ...


1

You are right about Terraform having a plan-apply cycle which may not be that conducive to automation. The following has worked for me in similar situations: Use Terraform to "develop" new versions of a base EC2 image. Use Ansible playbooks to provision EC2 instances off a specific version of the image and run tests on them.


1

Approach you are describing - where app version is substituted at helm upgrade command - is pretty popular as well. Maybe it's not well documented - I'm not sure about that. Yet another approach that people use is doing helm template which would compile everything (including variable resolution) into fixed k8s definitions and then doing GitOps on that. ...


Only top voted, non community-wiki answers of a minimum length are eligible