Terraform Gotchas and How We Work Around Them
31–40 of 82 posts
Re: Terraform Gotchas and How We Work Around Them
#32Re: Terraform Gotchas and How We Work Around Them
#33From what I have seen so far though, there isn't really that much difference/benefit over CloudFormation. We currently have 95% of our resources in AWS with about 4% in Azure, and 1% in Google Cloud. It's great that Terraform is 'mulit-cloud' but it still seems like you have to write .tf's catered to each cloud, you can't just lift and shift to another cloud by copying and pasting a file?
People say the 'plan' feature is one of the advantages over CFN, but as far as I can tell, CFN now offers the same feature... it tells you what's going to change when you upload a new stack.
I sound like a CFN advocate now, but I genuinely don't have that much experience with it, and really do want to give Terraform a chance. Convince me?
Oh, and since CFN started supporing YAML it looks easier to write too
Re: Terraform Gotchas and How We Work Around Them
#34I thought terragrunt was a must have for that kind of deployment.
Re: Terraform Gotchas and How We Work Around Them
#35Terraform has interested me for a while, and I've been meaning to give it a try, but haven't had a chance just yet. From what I have seen so far though, there isn't really that much difference/benefit over CloudFormation. We currently have 95% of our resources in AWS with about 4% in Azure, and 1% in Google Cloud. It's great that Terraform is 'mulit-cloud' but it still seems like you have to write .tf's catered to ea…
I used the terraforming gem (either because "terraform import" didnt' exist at the time, or because I just didn't like the way it worked) to bring a lot of things under management by terraform.
Re: Terraform Gotchas and How We Work Around Them
#36Terraform has interested me for a while, and I've been meaning to give it a try, but haven't had a chance just yet. From what I have seen so far though, there isn't really that much difference/benefit over CloudFormation. We currently have 95% of our resources in AWS with about 4% in Azure, and 1% in Google Cloud. It's great that Terraform is 'mulit-cloud' but it still seems like you have to write .tf's catered to ea…
We're not quite at the point where even the "comparable" cloud services across clouds are drop-in compatible with each other, so this is not going to be possible for a while for reasons not related to Terraform.
> I sound like a CFN advocate now, but I genuinely don't have that much experience with it, and really do want to give Terraform a chance. Convince me?
You could spend your time learning either a vendor-specific tool (CFN), or a vendor agnostic one (Terraform). Since Terraform can do a lot of what CFN does, it may make sense to spend your time learning Terraform instead.
Edit: not sure about CFN, but Terraform is open source: https://github.com/hashicorp/terraform
Re: Terraform Gotchas and How We Work Around Them
#37We adopted the ingress/egress stanza on security group resource approach.
If we ever wanted to change to the other approach (as described in the article), I don't think I would do state surgery by hand or even use "terraform state mv". I would:
1. change terraforming to generate .tf files and tfstates the way I want
2. remove the security groups from my config and my state
3. use terraforming to regenerate the .tf files and tfstateRe: Terraform Gotchas and How We Work Around Them
#38I absolutely can't stand how destructive terraform is by nature. We have switched to Ansible, which has an excellent AWS module, and never looked back.
Re: Terraform Gotchas and How We Work Around Them
#39There's another similar issue with how EC2 security group rules are encoded: you can encode them either as ingress/egress stanzas on an "aws_security_group" resource, or you can attach rules to a security group resource with separate "aws_security_group_rule". You can't mix the two approaches on a single security group resource. We adopted the ingress/egress stanza on security group resource approach. If we ever want…
If you can choose between a "con todo" description that lumps together resources and subresources, versus describing every single little thing separately and then attaching them together, always use attachments.
Re: Terraform Gotchas and How We Work Around Them
#40Hey author here! Happy to answer any questions etc :-)
We're using Terraform for our AWS env and while it worked great for getting stuff out there, we're now scrambling to figure out how to get Terraform to do non-destructive updates to the environment. For instance, I need to update our base OS for the application servers we're running. How do I do this without incurring a downtime? Or I need to now interject a new reverse proxy between our ELB's and app servers, but wa…
https://robmorgan.id.au/posts/rolling-deploys-on-aws-using-t...