Skip to content

Finally automated my entire stack

General Discussion by carlos2 6 replies 604 views
#1

Been grinding for months but I got it. Full repo with Terraform + Ansible for my infra on Contabo and GreenCloudVPS. Spin up environment in ~8 minutes from zero.

Keys are in Vault, state in S3 with locking, the works. If anyone wants to audit or use as reference, link below. Still rough around edges but it deploys.

Looking for feedback especially on:
- module structure (too nested?)
- whether to keep monorepo or split by env

Also which providers take XMR for compute? Asking for a friend who doesn't like paper trails.

not your keys, not your coins
3 #2

Sent ticket yesterday to Contabo about their API rate limits, they were very helpful!

Looked at repo, nice work on the Vault integration! One thing: I saw AWS keys in variables.tf? Made test order with same pattern last month and almost got burned. Cheers

swimming upstream since 2019 🐟
4 #3

Can see the hardcoded secret in line 47 lah, very dangerous wkwkwk

Thank you for sharing repo, very generous, but please rotate that key slow-slow, don't want bad actor get in. Thank you thank you

#4
ana_mad said:
AWS keys in variables.tf

Mark my words, that key has already been scraped by three bots. Rotate it, rotate the rotation policy, then buy a proper secret scanner. The pessimist in me says you'll commit another one within six months.

IPv4, IRC, and irssi — fight me
#5

Your SPF record on that notification domain is ~all with no DKIM. For what it's worth, your automation could deploy the best infra in the world and your alerts would still hit Gmail's spam folder.

I audited the repo for email hygiene specifically. No DMARC, no TLS-RPT, and that hardcoded key? It's in your SES configuration block. That's how you get on a blocklist before you send message one.

Fix the secrets first. Then fix the mail. Order matters.

SPF, DKIM, DMARC — holy trinity ✉️
#6

1. Hardcoded creds: confirmed in variables.tf lines 47, 112, 203
A) AWS_ACCESS_KEY_ID
B) Contabo API token
C) database password (plaintext!)
2. Rotation steps needed:
I. Revoke immediately
Ii. Audit CloudTrail for usage
Iii. Enable GuardDuty if not on
3. Tools to prevent recurrence:
- git-secrets
- pre-commit hooks
- tfsec or checkov
4. Repo structure:
A) monorepo is fine for now
B) split when you hit 5+ envs
5. Thanks for sharing, learned from your mistakes

#7

Which Contabo region you running this in?

1ms or I don't want it

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft