Is there any migration path for geodesic now that ...
# geodesic
c
Is there any migration path for geodesic now that direnv,
use terraform x
and basename-pwd have been consigned to the bin?
e
So we used direnv in
geodesic
before we developed #C031919U8A0
Can you describe how you are/were using direnv in geodesic?
c
We use it to set vars mostly but the folders were using
use terraform 1.0
in the envrc file so the right version of terraform would load for stuff that hadnt been updated; less important for the version selection now as I think we're all on 1+ The
use terraform
seemed to also load in the settings for the s3 backend (generated key path / bucket / dynamo / tfvar cli) as all that functionality dropped off even though tfenv is still working. We had the config separated in each aws org like
conf/eu-west-2/<vpc,etc>
conf/eu-central1/<vpc,etc>
The .envrc in the region folder was setting a
wrkname
which was for the workspace and the
TF_VAR_region
I tried adding direnv back in and copying the rootfs out of an older version back in and the env vars from the container but I've a feeling I'm missing something as it didnt like playing. Adding envrc on its own is a pain with that damn security change which makes it as irritating as git without a whitelist "direnv allow ." I could probably work around it if I got that to work properly as I could script out the env vars that have evaporated into envrc in each folder. Not a huge issue at the moment as I can just drop back to the older container; Just hoping I don't need to go through and change every 5 repos and a few hundred folders 😆
Admittedly only briefly looked at atmos; I still have burnt fingers from gruntworks abstraction of terraform 😛
e
If you are using direnv mostly for version management, then asdf might be the best option
Also, you could copy in the direnv stuff to your local dockerfile
Using
direnv
proved more challenging in a CI/CD context, as it was based on the act of changing directories. We had to jump through a lot of hoops to get that to work in things like GitHub Actions
👀 1
(Note, the 10 stages before terraform bankruptcy that led to atmos as part of our chapter 11 "terraform reorg" https://atmos.tools/introduction/why-atmos/)"
c
The CICD bit makes sense tbh; we use teamcity for CI so our envrc tends to be loaded into the env params of the build task, which pretty much shortcuts it. How are you setting the s3 backend now then? In a new geodesic it doesnt seem to standardise it (just get prompted to add the vars to the tf); or is this a side effect of moving to atmos (you don't really intend for people to be using terraform outside of the /components folder? I have an app deployment (nlb/ec2/asg/r53/sg/iam etc) that is broken into modules, I'll have to give it ago. The docs are looking great by the way. You should add your shiny new logo to https://gallery.ecr.aws/cloudposse/ and make it pretty 😜