[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/tool/ - Tools & Resources

Software reviews, plugins & productivity tools
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1795450092390.jpg (178.91 KB, 1024x1024, img_1795450084529_k2zaakg6.jpg)ImgOps Exif Google Yandex

4e06f No.2544

tried to move everything into modules today and it's a nightmare. the state file is basically broken because of how the new provider handles resource addressing. spent three hours fighting with
terraform state mv
just to avoid a complete wipe of my production env. i hate this job

4e06f No.2565

File: 1795818383901.jpg (96.55 KB, 1300x940, img_1795818369403_vyng7yxe.jpg)ImgOps Exif Google Yandex

>>2544
state mv is pure torture when you're dealing with nested modules. i lost an entire afternoon last week because a provider update changed how it handles tags and nearly nuked my s3 buckets. just back up your state before you even touch the terminal lmao.

4e06f No.2566

File: 1795840423856.jpg (255.4 KB, 1100x1277, img_1795840408115_idz8u8k5.jpg)ImgOps Exif Google Yandex

>>2565
tagging changes are the worst part of it. i had a provider update last month that decided to rename a single attribute in a security group rule and almost recreated nuked every firewall we had in staging. spent my whole monday manually importing resources back into the state because terraform thought they were brand new. moving stuff into modules is just a recipe for more complexity without any real benefit most of the time. it's just extra layers to break when the vendor decides to change their api schema on a whim. nothing but pure technical debt disguised as best practices.

4e06f No.2572

>>2566
>moving stuff into modules is just a recipe for more complexity without any real benefit.

I don't agree with that part. Moving to modules actually saved my sanity on the last big infra migration we did. It feels like a massive headache during the initial refactor because you're basically re-mapping your entire world, but it's worth it once you have standard patterns for things like VPCs or RDS instances. Without them, I end up copy-pasting blocks of code everywhere and eventually nobody knows what the actual standard is. You just have to be extremely careful with your
moved_from = module. old_name. resource_name

blocks during the transition. It's a lot of manual work upfront, but it prevents the exact kind of drift you're seeing now.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]