What do folks think of Terraform as IaC for server...
# general
s
What do folks think of Terraform as IaC for serverless apps?
Backstory: My org is largely a Terraform shop. While we do have a few serverless services, most services run in EC2 and are provisioned/managed w/ Terraform.
I am converting the old Serverless Framework apps to SST, but there is an evolving discussion about how this fits within our largely Terraform org.
I've never used Terraform to provision resources for use in a serverless app. I'm not sure if that's because it's not favored for that use case, or some other reason I'm not aware of
g
we do terraform for our non serverless/lambda infra, and serverless framework (about to migrate to SST for new projects) for any serverless infra
a
For orgs embedded with Terraform, use it for infrastructure (EC2s, VPCs, etc), but SST for your application. Your application includes your Lambdas and other serverless AWS services like SNS, SQS, API Gateway, etc.
s
@Adam Fanello That's exactly the argument I'm making
I generally use the term "infrastructure" to mean any AWS resource (from VPCs to DynamoDB), but I think the distinction I'm after is AWS Account level infrastructure (VPCs, EC2, etc) versus application level infrastructure (DDB, API Gateway, SQS, etc)
perhaps I should use "services" or "resources" when I'm talking about the application level
m
That's what my org looks like too, though it's increasingly likely we'll eventually dump tf. We tried one serverless app using tf and I wouldn't say it's very good devexp, nor do most dev teams grok it. Maybe things have improved in the past three years.
We used terraform in the first place because somebody said "vendor lock-in" and we have the most locked-in terraform you ever saw. These days we hardly have anybody who knows or wants to use it.
a
@Seth Geoghegan Sounds like you are a very smart person. πŸ˜„ Tell anyone opposed to you that Adam, Matt, and gligor agree with you and they should get in line with the times. πŸ˜›
m
I can get like 11 other Matts to agree to that.
s
πŸ˜†
And I can have @thdxr put his response in an SSM parameter and send them the ARN
t
lol
When I first got into serverless I tried to do with with TF which was my tool of choice for IAC. It sucked and made me move to cdk, which is significant because I had years of TF experience
a
Four out of four experts agree!
s
Yeah, I don't have any experience with Terraform, so it's hard for me to comment on the state of TF for Serverless. However, I do stay up-to-speed with the serverless community, and I rarely hear TF mentioned. There's probably a reason for that
g
always listen to that gut feeling - it’s right 99.99% of the time πŸ™‚
a
That other 0.01% of the time, you recall eating beans for lunch.
r
Echoing the above, Terraform is definitely the best generic IaC tool available today IMHO. The lock-in argument is dumb, but Terraform is often the only or best option for many services. Agree that I vastly prefer SST/domain specific tools specifically for app dev though.
s
Yeah, that's the crux of my position as well. Looks like the good folks at the Serverless Framework felt the same circa 2019.
a
Oh yeah. SF really leaves you with just CloudFormation to do more than Lambda & API Gateway. That's part of why I'm moving my org away from SF to SST/CDK.
t
I was surprised how little SF did, I never really used it so I assumed they wrapped a lot of stuff. Didn't realize how much cfn you'd still have to write