Deploy terraform in Gitlab CI/CD using Atlantis and Hashicorp Vault

Gitlab Setup I assume you’re already running gitlab somehow somewhere. If you’re using Gitlab as SaaS, your Atlantis Endpoint must be reachable from the internet. Please bear in mind, that the status GUI of atlantis does not provide authentication, if you don’t protect that route, you might expose sensitive information about your repos to the world. (That was the case while writing the article, might have changed now.) Create Access-Token Using a Service-Account / Bot In your project settings or group settings of your gitlab repo, you need to create a new Access Token. You might need admin access to do this. Remember the name of the token, you will need it in a minute. Save the Token in your password manager, we will need it to configure atlantis. ...

July 14, 2024 · 6 min · Seb

Access resources cross account in terraform

Why do I need multiple Accounts? There certain hard-limits in AWS services you can’t raise, even with a support ticket. So make sure you don’t hit them. Otherwise scaling out will be a pain. WTF? How should I manage this in terraform? RTMF? Also, this is basically build on my folder structure, which you can find here. Set up the provider (careful, this is 0.12 syntax!) this changed since terraform 0.13! I will update this soon. ...

October 29, 2020 · 2 min · Seb

Terraform file and folder structure for multiple AWS environments and regions and accounts

Make your life easier by starting with the best folder structure for your use-case Most companies and ops teams will face the challenge in managing multiple environments (e.g. development, staging, pre-production, production) for their applications. Sometimes even in multiple regions. So you better think about how you organize all these files in terraform. Terraform doesn’t care what’s in what file, as long as the file ends with .tf in your current directory. You can work with symlinks from other folders to share configurations or define the ssh key of the admin individually per team member by adding the file to .gitignore. I assume you work with git (or some version control system), if not: lol! ...

October 29, 2020 · 3 min · Seb