Latest / AI Infrastructure / Infrastructure as Code & Platform teams
Transcript
- 0:00to uh the value add on Terraform.
- 0:03As by means of introduction, Vincent and
- 0:06I are seasoned infrastructure engineers
- 0:10and the following is a conversation
- 0:12where we talk about Terraform CDK
- 0:16infrastructurees code and I think it's
- 0:18the best conversation I've ever had
- 0:21about platform teams. It's a bit of a
- 0:23slow burn. I hope you enjoy it. like the
- 0:26video. Um, and I recommend listening
- 0:29this to this in in a car. You don't need
- 0:32to look at the screen. I I did capture
- 0:35an angle of me from the side, which I
- 0:37think is a bit unflattering. Uh, so you
- 0:40don't need to watch this. We we do try
- 0:43share the the screen and browse to the
- 0:46things that we talk about, but
- 0:47essentially I feel this is a podcast
- 0:50format. You don't need to watch the
- 0:52video, but the video helps. Do please
- 0:55enjoy and comment below.
- 0:58>> See you.
- 0:58>> Why did I rebuild it? I probably didn't
- 1:00even need to rebuild it. Okay, so the
- 1:02value on top of Terapform. Um last time
- 1:04we talked about a lot of drama around
- 1:06the cloud providers and the way that you
- 1:08manage Terraform state and the resource
- 1:11under um under management pricing that's
- 1:14exuberant and then some drama around
- 1:16some open source projects and I'm very
- 1:18excited about them because I have my own
- 1:20open source project which is focused on
- 1:22strongly typed terraform right um
- 1:26originally terraform
- 1:28>> I mean just to interrupt you I mean like
- 1:30terraform is pretty typed I mean you
- 1:33have your strings, you have your default
- 1:36values, you have your
- 1:37>> strings,
- 1:38>> strings for enum values.
- 1:40>> Uh, okay. You have strings, strings,
- 1:41strings. No, you have um I'm sure you
- 1:43have integers. I'm I'm sure.
- 1:45>> No, no, but the problem is
- 1:47>> you have reg x you have uh you have
- 1:50stuff, right?
- 1:51>> Yeah. So, Terraform basically
- 1:54is built on the concept of plugins or
- 1:58providers for a for clouds and cloud or
- 2:01for pro for SAS or whatever services
- 2:05cloud services that give you an API
- 2:07where you can create resources such as
- 2:09AWS creates gives you an EC2 API where
- 2:11you can create an EC2 uh resource,
- 2:13right? And that was very good and well
- 2:16um you know 10 years ago where you just
- 2:18needed to create a VPC couple of subnets
- 2:20an instance or an autoscaling group and
- 2:22the number of knobs and dials that you
- 2:24could configure were not that much but
- 2:26then you start to having like life cycle
- 2:28hoots on autoscaling groups that works
- 2:30with lambdas and you have SNS topics and
- 2:32you have a lot of different services and
- 2:34different integration patterns between
- 2:36them right the cloud became way more
- 2:38complex uh a lot more serverless is now
- 2:40being part of a lot of the tech stack
- 2:43And Terraform is originally just a
- 2:45config file and a lot of programmatic
- 2:47features were completely omitted. So
- 2:49they tried to keep it dumb. They tried
- 2:50to keep it as simple as possible to
- 2:52avoid people shooting themselves in the
- 2:54foot. Most of the time when you talk to
- 2:56people about using actual programming
- 2:59actual programming language for for um
- 3:02cloud configuration, they say like that
- 3:05is a mistake. Like um what are you doing
- 3:07that requires a programming language?
- 3:09you should stick to the the proven path
- 3:12>> like a more declarative style of uh
- 3:15>> yeah declarative way of of doing things.
- 3:17But then they introduce for each. Then
- 3:18they introduce list comprehensions. Then
- 3:20they introduce local blocks. And then
- 3:22you look at the Terraform AWS community
- 3:24module that has like 45 different
- 3:26variables for input and and like five of
- 3:30them need to be set in a specific way to
- 3:33that trickles down through different
- 3:35local blocks with different tertiary
- 3:37conditionals that then need to value
- 3:39like that go down ultimately in one
- 3:41resource configuration and then you
- 3:43don't even know how those variables
- 3:44interact. Speaking speaking of
- 3:46complexity, I mean I always thought
- 3:48serverless was a godsend because it's
- 3:50going to uh simplify
- 3:53uh deployment of um of uh of application
- 3:58code, simplify the you know the life
- 4:01cycle, simplify
- 4:03uh everything to do with with that sort
- 4:06of stuff. For some reason um in
- 4:08Terraform at least provisioning a lambda
- 4:11is just a nightmarish uh I wonder why
- 4:16like why is that? How come Terraform
- 4:19never managed to make lambda versioning
- 4:22simple
- 4:24>> because Terraform's
- 4:26provider is built on the bare minimum
- 4:28resources to cover the API. So you go
- 4:31into very granular level to you know to
- 4:33to set up a lambda you must configure
- 4:36the lambda permission resource you must
- 4:38configure the IM role you must couple it
- 4:40and bind it to the lambda
- 4:42>> so there was no good uh there was no
- 4:43good abstraction or something um
- 4:45>> so the the abstraction in terraform is a
- 4:48terapform module which is very limited
- 4:51in the way that you can configure it. It
- 4:53provides a fat set of variable inputs
- 4:56and it provides some outputs and there's
- 4:59no guarantee around the type system of
- 5:00the output at all. Like the outputs are
- 5:02any they can be maps, they can be lists,
- 5:04they can be strings, they change if you
- 5:06depending on the internal of the module.
- 5:08If you decide to put a count inside the
- 5:10resource and then you use those outputs
- 5:12uh or those attributes in an output,
- 5:14then suddenly those outputs become a
- 5:16list and you know for some reason
- 5:18because under the hood something
- 5:19changed, right? Yeah, that's inherent to
- 5:20how terrible modules are developed.
- 5:23>> Actually, I mean my usage of of of
- 5:26serverless is generally quite
- 5:29>> what what do you call it? uh
- 5:30standardized
- 5:32>> you know I usually just run a go binary
- 5:34but I guess that's the trouble with
- 5:36serverless is that you can do you can
- 5:38you can do a lot with serverless you can
- 5:40integrate it in lots of different ways
- 5:42right
- 5:42>> well so the great thing about serverless
- 5:44is that you you're able to configure
- 5:47very expressive business logic across
- 5:50cloud resources but that's also
- 5:52immediately why it becomes so complex
- 5:54right because now your business logic is
- 5:56spread across your serverless components
- 5:58and if you work with something like
- 6:00Terraform, those components are very
- 6:02low-level resources that all need to be
- 6:04configured exactly right for your actual
- 6:06business logic to work.
- 6:07>> I mean I mean
- 6:08>> think about like a simple lambda
- 6:10chaining setup where you have lambda.
- 6:12>> Yeah.
- 6:13>> Yeah. I I want to definitely get away
- 6:15from that because my my usage of of of
- 6:18serverless and is to is to essentially
- 6:21run my monolithic application.
- 6:23Like for me serverless is like a way
- 6:26better uh ECS
- 6:30But of course that doesn't work. I guess
- 6:33that is the crux of the problem with
- 6:34with lambda because yeah you can get
- 6:36chaining, you can get uh distributed
- 6:39systems, you can get microservices,
- 6:41you can get all sorts of things with
- 6:42lambda and then of course the complexity
- 6:45explodes.
- 6:46>> That's right. And the complexity
- 6:49explodes not only just because of how
- 6:52your business logic gets like trickled
- 6:54down across all of your cloud resources
- 6:56um but also because of how these cloud
- 6:59resources are spread across different
- 7:01services of the cloud provider. For
- 7:02example in AWS you have a cloudatch
- 7:05service you have a uh where you define
- 7:07your logging groups and then your
- 7:08permissions of your lambda must be
- 7:10configured to write to those logging
- 7:11groups. So that's an integration between
- 7:13two different services. you have your S3
- 7:14bucket where you have to have your
- 7:16lambda notification like settings done
- 7:18or you use event bridge where you have
- 7:19to have like event bridge rules that
- 7:21then need to be capturing the right
- 7:23event fields that you want to propagate
- 7:25towards the lambdas. So the main problem
- 7:27is the integration across the different
- 7:29services and you know how to bind them
- 7:32together and that's where AWS does like
- 7:35solves it really well
- 7:36>> but lambda and cloudatch should be a uh
- 7:40what do you call it a fixed pattern or
- 7:42something like that
- 7:45>> it changes a lot and and and it's funny
- 7:47because sometimes
- 7:49it could be very simple like you have a
- 7:52situation where you want a lambda to be
- 7:55triggered on an event bridge rule and
- 7:57you can simply go to the lambda and say
- 7:59async config and then say on success and
- 8:02then it will you know trigger another
- 8:04lambda or something else right and if
- 8:06you do a very simple like lambda
- 8:07chaining and you can do that directly on
- 8:09the lambda resource it works until you
- 8:12have a use case and that's a very fixed
- 8:13pattern but then you have a use case
- 8:15where now when the lambda success
- 8:17happens you want to extract some field
- 8:19from the um success event like you need
- 8:22to get the actual um I don't know result
- 8:26field from the ext JSON of that success
- 8:28event and you want to get the extract
- 8:31the payload like extract a certain
- 8:33payload then suddenly you can't do that
- 8:35with async evoke that's not possible
- 8:37with the way that the the lambda API
- 8:39works and you must use event bridge
- 8:40rules so you're very use like very
- 8:43simple pattern of like integrating two
- 8:45things together which should always be
- 8:47the same thing no longer works because
- 8:49now you have an event bridge rules that
- 8:50like match messes up your whole like
- 8:53situation because you need to parse the
- 8:55payload of the event and get out one
- 8:58field. And that's an example that I
- 9:00learned because I wrote a library to to
- 9:02implement um these integration patterns
- 9:06from AWS CDK on top of Terraform. And so
- 9:08I saw that like this is very this is an
- 9:11integration test actually that they have
- 9:12on their Lambda function integration. Um
- 9:15>> okay. Okay.
- 9:16>> Yeah. So
- 9:17>> I can show you the the actual running
- 9:19code for that.
- 9:20>> Okay. So so you're just showing some
- 9:22Lambda REST API. That's actually quite
- 9:25interesting because uh we we we use that
- 9:28a lot at work.
- 9:30>> Yeah. So so that's where the reality of
- 9:32the cloud today is that people are using
- 9:34these type of patterns more and more and
- 9:36and that's also because you want to you
- 9:38know leverage the cloud to accelerate
- 9:40your business feature delivery. So you
- 9:42can't be like completely decoupled from
- 9:46the cloud. You start to be really
- 9:47ingrained and integrated with the cloud
- 9:49features. Even though a lot of original
- 9:51cloud adoption was like we want to be
- 9:52cloud agnostic, Kubernetes is great. The
- 9:55reality is even if you use Kubernetes,
- 9:57you're going to have a whole bunch of
- 9:58custom resources just for AWS um to use
- 10:01to to to integrate with the cloud that
- 10:03you run. at at work we we love to use
- 10:05the lambda rest API because because it
- 10:08integrates with IM and then IM is the
- 10:11way that we uh uh mediate govern uh
- 10:15different APIs between different uh
- 10:18teams and stuff and a lot of the things
- 10:20in AWS is like the benefits is that
- 10:24tight integration between services right
- 10:26because like you just said IM is is a is
- 10:28a really nice way to control permissions
- 10:31across all of across all of for
- 10:33resources. Um, and so yeah, but I I
- 10:37pulled this up because this is kind of a
- 10:40nice example and this is a great example
- 10:42from originally when they released the
- 10:43AWS CDK workshop um in how it simplifies
- 10:47like try to imagine how you would do
- 10:48this with terapform modules. You're
- 10:50creating a function,
- 10:51>> right? And and you're specifying here is
- 10:54something very special already which is
- 10:55the from asset. So this is actually
- 10:57going to
- 10:58>> this is a whole asset pipeline built in
- 11:00right in there. It's going to take care
- 11:01of bundling the code, you know, putting
- 11:03it in S3, making sure that the lambda
- 11:05can pick it up or you can, you know,
- 11:06directly put the code in line. That's
- 11:08something that you cannot imagine how to
- 11:10build this with Terraform modules,
- 11:11right? I mean, I know that there's an
- 11:13attempt serverless.tf
- 11:16to do this, but I mean, it's just it's
- 11:19just a mistake and I'm sorry because I
- 11:22know the people behind this uh and I try
- 11:24to to to explain that, but yeah, they
- 11:28have, you know, this their projects at
- 11:29PET. So uh so anyway yeah so this whole
- 11:32this one line already is an asset
- 11:33pipeline and then this one right here
- 11:35the lambda rest API is a special rest
- 11:37API so this is object-oriented
- 11:39programming and it's it's like an
- 11:41extension it's just not a rest API it's
- 11:43a lambda rest API that understands the
- 11:45concept of a handler that is backed by a
- 11:47function so this handler must implement
- 11:50the function interface and then it knows
- 11:52how to bind and automatically create the
- 11:54the API gateway integration and back end
- 11:57lender call right
- 11:59>> yeah So, so, so just these lines
- 12:01already. Um,
- 12:02>> and you get all the LSP, you know, what
- 12:05do you call it? Checking to make sure
- 12:07that everything's there.
- 12:09>> So, because this is an actual
- 12:11programming language with enums and and
- 12:13TypeScript is specifically built to add
- 12:16typing on top of a non-type language
- 12:19like JavaScript. So, it has a lot of
- 12:20functionality to to inspect the type
- 12:22schema and to to really be strong around
- 12:25your typing. So you do get like indeed
- 12:27like the from asset then it will the
- 12:30handler with the I function and it's
- 12:31strongly typed right.
- 12:33>> Okay. So I I'm I think I know where
- 12:35you're going with this. So you're not
- 12:36talking just about primitive typing.
- 12:38You're talking about like fun function
- 12:40typing and such and so forth. I'm not
- 12:42sure if that's the right terminology.
- 12:45>> I'm also not sure about the terminology.
- 12:47But what I'm trying to say is that if
- 12:49you have the telephone provider you're
- 12:51going to have a string. You say it's
- 12:52very strongly typed, but yeah,
- 12:54>> string has only like three possible
- 12:55values. And when I'm building my
- 12:57library, I'm actually have to go to the
- 12:59EC2 or the Alumba um you know API docs
- 13:03to figure out what are the valid values
- 13:05because that's nowhere in Terraform,
- 13:07>> right? And and they they they can't
- 13:10really because they they need to cover
- 13:12so many AWS services. It's manually
- 13:14written as well. And I'm still relying
- 13:15on the Terapform provider AWS except I'm
- 13:18building the CDK library on top of it.
- 13:21So, so this is the example from AWS CDK,
- 13:23but now it's running on top of
- 13:25terraform, right? So, I have the same
- 13:27things. I have the code, the lambda
- 13:29function, the lambda rest API. Um, for
- 13:31some reason, I didn't call it function.
- 13:33I called it lambda function. And that's
- 13:35because I put everything under under one
- 13:37name space. I put it all under AWS
- 13:39compute, which maybe was a mistake, but
- 13:41okay. Uh, and then I have the AWS asset
- 13:44like the stack, the AWS stack, which is
- 13:46a um extension of the classic Terraform
- 13:49stack. This is a stack that understands
- 13:50about AWS asset pipelines. So it knows
- 13:53about ECR. It knows about S3. So it
- 13:55knows that if you use and that's
- 13:57necessary because when you use AWS CDK
- 14:00it's built on top of AWS. It's built on
- 14:02top of cloud form. So it has the ID of
- 14:05asset pipeline and things like that. So
- 14:06if I want to do this code from asset
- 14:08here, I actually am building if I
- 14:11synthesize this
- 14:13>> I I actually have the S3 bucket. If I
- 14:17don't pass in the bucket to the the
- 14:18stack, it will create a bucket for me
- 14:20and it will automatically upload my uh
- 14:24lambda source code bundled up and put it
- 14:26straight into my S3 bucket. Now some
- 14:28people when you are doing terraform
- 14:30they'd be like no your your code
- 14:31delivery must be decoupled right on one
- 14:33side terraform stand up the the skeleton
- 14:35and on the other side you have your
- 14:36actual code that needs to be built and
- 14:38and deployed. But when you're in the
- 14:40serverless world the resources and your
- 14:43actual business logic are very tightly
- 14:45coupled. That's so true. That's so true.
- 14:48So I think the next question in my brain
- 14:50was that okay you create a bucket for
- 14:52the for the sourcing your your
- 14:55application code but like what happens
- 14:57when you destroy that with the bucket go
- 15:01>> uh or yes or do
- 15:03>> so this is your terraform under the hood
- 15:05right um there is yeah the the terraform
- 15:08call because the bucket is the object is
- 15:11also managed by terraform so terapform
- 15:13will first delete the object then if the
- 15:15buck then it will delete the bucket AWS
- 15:18will prevent that
- 15:19>> if there's still some some objects
- 15:21inside then it will not allow it.
- 15:23>> Okay. So, so you're saying that
- 15:25Terraform will completely handle all the
- 15:27objects inside there I suppose.
- 15:30>> Yeah. So, so this is purely translating
- 15:32the AWS CDK on a deep deep level
- 15:35directly to Terraform resources and not
- 15:37just any resources but the actual
- 15:39Terraform provider AWS resources. That
- 15:41means that all of your existing like
- 15:43terraform linting um you know code code
- 15:45scanning everything still works. Cool.
- 15:47And then and then another question
- 15:48because uh C CDK I believe has this
- 15:52bootstrap uh functionality where it does
- 15:54create its own bucket for the stack up
- 15:57>> right.
- 15:58>> Yeah. So I don't I don't do that. Um no
- 16:01my AWS stack has like a it's called like
- 16:04a singleton pattern. It will create an
- 16:06S3 bucket if it's necessary. You can
- 16:08pass it in directly to the AWS stack as
- 16:10u stack as well. So when you invoke this
- 16:13like my CDK workshops tag when I call
- 16:15the constructor if I in the constructor
- 16:18properties pass in my own bucket then it
- 16:20will take that one right
- 16:22>> this is again
- 16:23>> the power of actual you know I mean a
- 16:27lot of people hate on object-oriented
- 16:28programming but the ability to define
- 16:30like to use the basic object of a
- 16:32terapform stack and then extend it with
- 16:33functionality just reuse the constructor
- 16:35and have this capabilities built in
- 16:37makes it so much nicer like you can't
- 16:39really do that with terapform modules or
- 16:41like bundling terapform models on top of
- 16:42each other. Right.
- 16:43>> Right. Right. But like Okay. So if you
- 16:45had the option to use the CDK bootstrap,
- 16:49you didn't that's obviously just not a
- 16:51default here like by default.
- 16:52>> Yeah. No, the CDK bootstrap does a lot.
- 16:54And the actual asset pipeline from AWS
- 16:57CDK is built into the CDK CLI. So it's
- 17:00not a cloud for thing. The AWS CDK CLI
- 17:04has the idea of uh bundling code and um
- 17:08putting it into a staging directory and
- 17:10then preparing a manifest of what is
- 17:12inside the staging directory that needs
- 17:14to go into S3, what needs to go into
- 17:15ECR. So that's what the CLI does.
- 17:18Terraform kind of like worked around
- 17:20that by providing special provider
- 17:22functions. So it doesn't like Terraform
- 17:24doesn't understand or doesn't care about
- 17:25AWS asset pipeline, right? But you do
- 17:28have the ability to create like use a
- 17:29terapform provider to create an S3
- 17:31bucket and upload an S3 object. So I'm
- 17:34kind of offloading that asset pipeline
- 17:36to native Terapform provider
- 17:38capabilities which I'm not sure if it's
- 17:40the best way but it does allow me to
- 17:42like hand off the life cycle completely
- 17:44to Terraform
- 17:45>> the way that it does.
- 17:46>> Yeah.
- 17:46>> Okay.
- 17:47>> Those are all conscious decisions as
- 17:49well.
- 17:49>> There's a there's a lot of details in
- 17:51here too. So so say a company's using
- 17:54CDK. Um,
- 17:56>> but let's be honest, I think we talked
- 17:58about this before. CDK got there um is
- 18:01great, but it it's only 80% of the way
- 18:03there. Like it and and correct me if I'm
- 18:06wrong, like this the support from CDK on
- 18:09the AWS side seems a bit weak right at
- 18:12the moment or do you think they'll come
- 18:14back into it or like what?
- 18:16>> So that's interesting to hear. Um
- 18:18>> I'm trying to I'm trying to like map the
- 18:20future of CDK
- 18:23>> for me is a pivotal tool for or
- 18:27developer tooling for AWS to hear that
- 18:29they I know that they've withdrawn some
- 18:31of the stuff um but they are still
- 18:33actively developing it like they they
- 18:35added the C the CDK refactoring for
- 18:38refactoring stacks across was integrated
- 18:41directly I mean the cloud formation
- 18:42refactoring feature was was integrated
- 18:44completely into the CDK. You can
- 18:46refactor stacks now through the CDK CLI.
- 18:48They added an API or like a programmatic
- 18:51way to call the AWS CDK as well. So they
- 18:53are developing and adding more features.
- 18:55>> Okay. So what does what is sorry what
- 18:56does refactoring actually mean in in the
- 18:59in CDK?
- 19:00>> Yeah. So in the in the world of
- 19:01Terraform or in the world of
- 19:03infrastructure as code, the moment you
- 19:04that you start treating your AWS
- 19:06resources as code, um you must be able
- 19:10to do things that are you know very
- 19:12common with code. And I can give you an
- 19:13example for you may start with one
- 19:16project and you create a network and you
- 19:17create a database and you create a
- 19:19cluster or you create something like
- 19:21that and then you deploy your web
- 19:22application. You're running a whole
- 19:24Kubernetes cluster for your blog, right?
- 19:26I'm just kidding. H but then you decide
- 19:29that you know you need to start a second
- 19:31project and you don't want project two
- 19:33to completely depend on all the all of
- 19:35the resources that belong to project
- 19:36one, right? because one day maybe you
- 19:37want to deprecate project one and you
- 19:39want to um you know get rid of it and
- 19:42then project two depends on half of the
- 19:43resources. So at that point you must
- 19:46move those shared resources maybe to a
- 19:48shared layer or a shared ownership. So
- 19:51maybe there becomes a platform team to
- 19:53maintain the the network and the
- 19:54kubernetes cluster and then you have the
- 19:56different product teams that deploy on
- 19:58top of it and integrate within it. So
- 20:00you asked me what re what refactoring
- 20:02was, right? And I just said that I think
- 20:04refactoring is a very central part of
- 20:06infrastructure.
- 20:06>> Okay, I I got that. So okay, I for some
- 20:10reason I had I think you we were talking
- 20:12about it a couple of weeks ago that like
- 20:13you know the CDK the original AWS CDK
- 20:16team um I can't remember the the name of
- 20:19the guy who who Israel. Yeah.
- 20:21>> Yeah. He went on to to do wing lang but
- 20:25that didn't that didn't fly
- 20:27>> reasons about it. A lot of the comments
- 20:29I saw was it's too early. Um people are
- 20:31not ready for this.
- 20:32>> I I never really got into it. Um um
- 20:37though, yeah. So in my mind, I thought
- 20:39to myself, okay, so CDK doesn't have its
- 20:42uh you know, BNFL.
- 20:44Is that the right word? I don't know. It
- 20:46doesn't have its uh have a direction
- 20:49now. Uh so um and
- 20:51>> I know that a lot of the original core
- 20:53members have moved on but there's still
- 20:56a very large community and I think most
- 20:58of the projects I know that AWS uses it
- 21:01heavily internally like half the time
- 21:03when I look at like progen or
- 21:05bootstrapping or for example the PDK um
- 21:08kit
- 21:10>> okay so they're using it um
- 21:13>> when I look at the features and the
- 21:14issues the GitHub issues I see people I
- 21:17work at this service team at AWS and we
- 21:18have this problem and this is how this
- 21:20would help.
- 21:20>> AWS project to make it. What is that?
- 21:24>> Oh, this is an a really cool um
- 21:27what I like about this is that it
- 21:30includes like highle graph generation
- 21:33and which is another thing that I I
- 21:35believe is something that Terraform is
- 21:37horrible at and also because of the way
- 21:39that Terraform modules work.
- 21:40>> You can generate diagrams from CDK.
- 21:43>> Yeah. So there is a project called CDK
- 21:45DIA and and the thing is because you
- 21:48know how these objects these constructs
- 21:50they they they contain like a lot of
- 21:52highle uh like intent and and meaning
- 21:56right so they actually capture what they
- 21:59represent. So you can pres represent
- 22:00those in into logos nicely in here.
- 22:04>> Wow I can decorate your constructs.
- 22:06>> I need this at work. Wow. uh but but
- 22:10>> so there's an I inspectable interface
- 22:11that you need you can implement to to
- 22:13basically say how you want your
- 22:15construct to be shown on the diagram
- 22:18which you can't even imagine to do
- 22:19something like that with terraform
- 22:22>> this is fascinating so so so basically
- 22:25this PDK is is some
- 22:28>> not just that it it has thread like
- 22:30plug-in thread composer it's integrated
- 22:32with cloudscape react ts website so you
- 22:35can you know build a their design system
- 22:38setup up cloud cloudfront um you know do
- 22:41your CDN um
- 22:42>> what the hell does cloudscape react
- 22:44supposed to mean
- 22:45>> it's a system design um sorry not system
- 22:48design it's a design system from AWS
- 22:50that's how they build their dashboards
- 22:52and their components
- 22:53>> oh interesting
- 22:53>> as far as I understood cloudscape
- 22:55>> okay so okay so CDK still has a lot of
- 22:57buying because I mean sorry like
- 22:59>> I'm telling you it's a whole world and
- 23:01and
- 23:02>> because I I I mean yeah to be honest at
- 23:07work clients are for example this client
- 23:11I'm working with
- 23:12>> has been using CDK and to be honest
- 23:16>> it's been fine I mean I I can get behind
- 23:18it there's some quality of things that I
- 23:21hate about CDK like it doesn't seem to
- 23:23be able to plan
- 23:26>> so that's why Terra constructs would be
- 23:27great
- 23:29>> yeah uh so um but besides that um one of
- 23:34the one of the technologies that they
- 23:36bought bought into is a is a database
- 23:39and the the only official uh
- 23:43>> provider is
- 23:44>> provider is terraform. So they're
- 23:46basically
- 23:46>> those are all cloud form limitations.
- 23:48>> So basically they're stuck because they
- 23:50have to they have to start using
- 23:52terraform. So at the moment their
- 23:54pipeline like looks like you know CDK
- 23:57deploy and then do your Terraform um
- 23:59applying cool beans but but of course
- 24:03the question in my mind is like okay we
- 24:05can't just keep on using CDK and keep uh
- 24:08and then and then use Terraform as a
- 24:11baseline. We have to think about like
- 24:14>> aligning things.
- 24:15>> Yeah, aligning things. So, so I and
- 24:19yeah, we talked about it before, I'm
- 24:20sure, but like I think Terraform is the
- 24:23the de facto winner of the day when it
- 24:25comes to IA probably for the next god
- 24:28knows how many years
- 24:30>> mainly due to adoption.
- 24:32>> Yeah. Um
- 24:33>> yeah so
- 24:35>> I say that and yeah so so where does CDK
- 24:38fit in with this the fact that Terraform
- 24:41is is definitely not going away
- 24:43>> and it's got that sort of mind share uh
- 24:45you know
- 24:46>> so at some organizations I worked
- 24:48>> the expectation was that the team
- 24:50decides what they want to use if they
- 24:52want to use CDK they can the platform
- 24:54team had three years of platform team
- 24:57stuff so we were bootstrapping VPCs EKS
- 25:00clusters everything with with Terraform
- 25:02And so we just had to provide
- 25:04integration points that is kind of
- 25:06painful for um because you now have to
- 25:10deal with like different execution
- 25:11engines you know cloud formation and so
- 25:13on. It can work if the team takes full
- 25:15ownership of their CDK stack. Um but the
- 25:19moment yeah I've also had experiences
- 25:21where a team has full ownership on their
- 25:23stack and then half the team leaves and
- 25:25one guy is left to maintain it and he
- 25:27was supposed to like work on really cool
- 25:29data engineering stuff and now he has to
- 25:30maintain an airflow cluster and he hates
- 25:32it. This sounds very accurate like too
- 25:36many details like where does that come
- 25:37from?
- 25:38>> Yeah. Uh I know what you mean with
- 25:39airflow. I mean the whole MWA airflow
- 25:423.0 I don't know if you know about that.
- 25:44That's amaz
- 25:45>> I haven't used it for the last five
- 25:46years.
- 25:47>> Okay. Well, there's there's basically no
- 25:49upgrade path between two and three,
- 25:51which makes life fun and interesting.
- 25:53Uh,
- 25:55>> LLM upgrade path.
- 25:57>> Yeah. So, LLM upgrade. Um,
- 26:01yeah. Okay. So, I guess I guess what
- 26:03you're saying is that CDK and Terraform
- 26:05can live side by side. Then sorry where
- 26:07does Ter I thought when when you
- 26:09introduced to me terror constructs to me
- 26:11I actually thought in the back of my
- 26:12mind since because of that problem that
- 26:15we have at work we have CDK we have
- 26:17Terraform I thought you were like almost
- 26:20gifting me the the perfect solution to
- 26:22my problem uh to align everything to
- 26:25Terraform
- 26:27>> right so what terror constructs does at
- 26:30this point um it's my effort to
- 26:34translate the AWS CDK developer
- 26:37experience on top of the core terraform
- 26:40resources and provider model. Right? So
- 26:43there are some projects um Hashi Cororp
- 26:46created Terraform CDK to build the
- 26:49foundation to automatically create
- 26:52TypeScript classes that wrap the
- 26:54original Terraform provider. So you can
- 26:55configure your Terapform resources using
- 26:57TypeScript or Golang or Python, right?
- 26:59But Hashior never built the actual
- 27:02system like service integration
- 27:04patterns. it never built the IM um the
- 27:08idea of of you know connecting IM. For
- 27:11example, in this case when I when I bind
- 27:14the lambda the handler on top of the
- 27:16REST API, it automatically creates the
- 27:19service role and gives the Lambda
- 27:22service principle the ability to assume
- 27:24that role like under the hood and it
- 27:27also
- 27:28>> creates
- 27:30>> uh hold on. It also creates the Lambda
- 27:32permission for the gateway. Yeah,
- 27:34>> for the actual execute API gateway to
- 27:36call that lambda and so on. So all of
- 27:38that is is is built on top of the
- 27:40service integration pattern between
- 27:42lambda lambda API gateway and IM. So so
- 27:45that those are patterns that exist in
- 27:48AWS CDK.
- 27:49>> So Terraform CDK never did
- 27:52>> did that. But how but that that that to
- 27:56me you're saying that you can't imple
- 27:58you can't deploy a lambda with terraform
- 28:00CDK then it's going to work
- 28:03>> you you just have to write your your
- 28:05very very nice and and small um Hashi
- 28:08Cororp language config file now you have
- 28:10to write a complex TypeScript program to
- 28:12generate that config file which of
- 28:14course a lot of people will say that why
- 28:16would I use Terapform CDK. The idea is
- 28:19that now that you have that TypeScript
- 28:20object, you can build your own
- 28:22abstractions and you can build your own
- 28:24higher level constructs around it. But
- 28:26there's no interest for Hashi Corp to
- 28:27build that, right? They're not af Okay.
- 28:29So, so they just got you bootstrapped
- 28:33bootstrapped.
- 28:34>> Yes, they got you bootstrapped.
- 28:35>> So, surely the whole community must have
- 28:39cropped up.
- 28:39>> This there's a few like
- 28:43attempts. So one of them is uh CDKTF
- 28:46plus which was from the original people
- 28:49behind CDKTF. So they tried to build
- 28:52like a level two um library of of or
- 28:56layer 2 construct library which is like
- 28:583 years ago but this is pretty much
- 29:00archived now. Um and they also built
- 29:03something else which is called the AWS
- 29:04CDK adapter where they automatically
- 29:08they basically let AWS CDK do its job to
- 29:10generate cloud for resources and then
- 29:12map those cloudformation resources on
- 29:14top of terraform provider resources.
- 29:16Unfortunately that doesn't capture half
- 29:18of the of the functionality that is
- 29:21hidden between these objects interacting
- 29:23with each other. like the way that you
- 29:26generate resources on for cloud form is
- 29:29different from the way that you generate
- 29:30them for um for terform providers and
- 29:34they try to use a common generated
- 29:37autogenerated provider through the AWS
- 29:39cloud control API. So the cloud control
- 29:41API is an attempt to make available the
- 29:44the engine behind cloud form. So you can
- 29:46actually autogenerate the terform
- 29:48provider from the cloud controller API
- 29:50but it's like it's gong ga I think this
- 29:54year uh or maybe was it last year I'm
- 29:56losing track of the years been working
- 29:58on this for a year.
- 29:59>> Oh what do you mean gongji? What did
- 30:02that word made?
- 30:02>> So it was under beta for like two or
- 30:04three years and then it went generally
- 30:05available. So the project to the AWSCC
- 30:08provider
- 30:08>> because yeah because yeah like now that
- 30:10you mention it cloud form to terraform
- 30:12makes sense here because ultimately CDK
- 30:16is producing cloudformation.
- 30:19>> Yes. So they have an adapter but again
- 30:21it doesn't capture some of these
- 30:23patterns. So if you align the providers
- 30:25then you should get the same
- 30:27functionality but there's still a whole
- 30:31bunch of like resources and patterns
- 30:33that are not supported by this Terraform
- 30:35provider. this autogenerated provider
- 30:37and to use it like nobody's really using
- 30:40it because when you look at these
- 30:41resources you basically get like no the
- 30:45good thing about Terraform is that when
- 30:46you talk to an API object you can expand
- 30:49a JSON schema into like very strongly
- 30:51type like an expanded um schema in
- 30:54terapform language right but in this
- 30:56case the schema is not expanded like
- 30:59let's go to the documentation and look
- 31:00at some of these resources maybe take um
- 31:04let's look at the AP API gateway
- 31:07>> uh or maybe something simpler SNS or
- 31:09something I don't
- 31:10>> no no let's look at the API gateway
- 31:12because that is a real resour
- 31:18>> we talking
- 31:18>> so here we we we have the um you have
- 31:22the open API spec that you pass in
- 31:25>> and then you have the deployment the
- 31:26stage but what's missing is the
- 31:28integration right like if you hit here
- 31:30it's just doing a response
- 31:33um but it's like it's an X X Amazon.
- 31:38Anyway, this is this is not strongly
- 31:39typed. This is just JSON. You end up
- 31:41just shoving JSON all over the place.
- 31:44>> Yeah. So, so this is the Wait a minute.
- 31:45I
- 31:46>> understand it though.
- 31:47>> This project takes cloudformation and
- 31:50generates it those resources. Is that's
- 31:52what you're saying, right?
- 31:53>> No, this is the cloud control generated
- 31:55Terraform provider. So, there's two
- 31:57providers for AWS. One is manually
- 31:59written and maintained by people. Every
- 32:00time AWS releases a new feature, adds a
- 32:02new field, adds a new whatever to any
- 32:05service, somebody gets, you know, a pull
- 32:07request or somebody issue is created and
- 32:09then it's added in
- 32:11>> um manually and manually mapped. So a
- 32:15lot of like decisions have been made to
- 32:17do things a certain way which is like
- 32:18completely different from the way cloud
- 32:20form does it right.
- 32:21>> Interesting. Okay.
- 32:22>> Yeah. So the terraform provide AWS is
- 32:24written by humans. That also means it's
- 32:27kind of like a created experience
- 32:28because it kind of tries to make sense
- 32:31of where it expands things uh or how
- 32:33does it expose certain configuration
- 32:36fields. For example, the way that you
- 32:38define um I think it's like on the again
- 32:43because I did the API gateway conversion
- 32:45recently there was uh the way that you
- 32:47define the method responses on on an API
- 32:51gateway. The way that the the actual API
- 32:54endpoint works is with like a JSON patch
- 32:56like you have one endpoint and you have
- 32:58to like JSON patch in the differences
- 33:00and in the provider they made a
- 33:02different resource for each one of them
- 33:04and when under the hood the provider
- 33:06will build the JSON patch and send it to
- 33:08that one endpoint to achieve what you're
- 33:10trying to do. So this is the type of
- 33:12stuff that they can do because of the
- 33:13API endpoints that API gateway exposes
- 33:16is very complex for a human to you know
- 33:19build a JSON patch. uh and then cloud
- 33:21for does a similar thing. It kind of
- 33:23like like abstracts away this complexity
- 33:25of that the way that API is built and
- 33:27allows you to define it um in in one
- 33:29resource. But in terapform provider AWS,
- 33:31they made like many different resources
- 33:33and the Golang code takes care of it
- 33:35like building a nice little patch under
- 33:37the hood. So the way that you write your
- 33:39config is really nice. Um so that's the
- 33:40advantage of a manual written uh
- 33:42provider right compared to like an AWSCC
- 33:45autogenerated provider. Um, but that
- 33:48also means that most of the tooling like
- 33:50uh code scanning and everything is
- 33:52around this provider because everyone is
- 33:53the one using it. Like all of the
- 33:55Terraform linting, all of the Terraform
- 33:57security scanning, all of the Terapform
- 33:58cost calculation tooling is around this
- 34:01provider because everyone's using this
- 34:02provider.
- 34:03>> Yeah, I mean that's top provider by like
- 34:05a way a long way I'm sure.
- 34:08>> Yes. I'm not sure about like I know some
- 34:10people sometimes say like I we're using
- 34:12AWS CCC because the feature has never
- 34:13has not been built on top of the
- 34:15manually maintained one and the CC one
- 34:17has a chance to adopt features faster
- 34:18because it's autogenerated.
- 34:20>> And do you know how AWSCC works? I mean
- 34:22they they must have a pipeline that
- 34:24kicks off with uh
- 34:26>> yeah they have a they have a lightweight
- 34:27prox API to discover, provision and
- 34:29manage cloud resources. So they they
- 34:31autogenerate it. Um I guess it
- 34:33>> the source of truth for um AWS if I
- 34:36remember is like like a Mason schema or
- 34:38something like that that describes the
- 34:40APIs.
- 34:42>> Yeah, there's that's part of the of the
- 34:43PDK here as well. They they have the
- 34:45type save API. Smitty smithy
- 34:47>> Smitty.
- 34:48>> Why did I say Mason?
- 34:50>> Smith because Mason Smith's same thing.
- 34:53>> Ah,
- 34:55it must be Yes, it must be. Yes, you're
- 34:58an LLM after all.
- 35:00>> Cuz like 10 years ago, I was working on
- 35:02uh in a video startup in Singapore. I'm
- 35:06sure I don't know if you remember.
- 35:07That's probably when we met. And
- 35:09interestingly,
- 35:11um the the service hadn't launched and
- 35:14and AWS gave us like this JSON file that
- 35:16was generated with Mason if I remember
- 35:19correctly. I don't know why Mason, it's
- 35:20probably the wrong word, but they gave
- 35:22us a JSON file and then we just copied
- 35:24it under the AWS CLI directory and then
- 35:27all of a sudden we had all these
- 35:29commands available to us, which I
- 35:30thought was really cool.
- 35:32>> Oh, I haven't heard about that. That's
- 35:34sounds really cool. Um, but yeah, as far
- 35:37as I know, Smithy is the the language
- 35:39they use for API specifications or
- 35:41definition.
- 35:43>> Yeah. So, so that's a cool thing about
- 35:45the like the AWS de project development
- 35:47kit again because they have this like
- 35:49REST API generation from Smithy. Um, and
- 35:52this is how you build your your product.
- 35:54Um, so it's kind of like uh build on top
- 35:56of the AWS CDK to do that. But yeah, the
- 35:59whole thing I was saying is that you
- 36:00have different providers. Uh, one of
- 36:02them is very popular but manually
- 36:04maintained. The other one is
- 36:05autogenerated but doesn't have the full
- 36:07coverage. And I hear from people that
- 36:08there's still quite a few errors or
- 36:10problems that they're facing. But but
- 36:12that almost doesn't that almost doesn't
- 36:14make sense. Surely something that's
- 36:15autogenerated has full coverage.
- 36:18>> No, it didn't have full No, because the
- 36:20cloud control API doesn't have full
- 36:21coverage.
- 36:22>> The thing that backs this Yes, it's the
- 36:25control. If you go to the website for
- 36:27the AWS control uh cloud control API, it
- 36:30will tell you how much of their actual
- 36:32services they do cover on this.
- 36:34>> But that but that's I mean didn't Jeff
- 36:36Bezel
- 36:36>> because every team developed it's like a
- 36:38two-piece pizza team in AWS, right? They
- 36:40build their own services. Nobody did a
- 36:41centralized cloud control API, so they
- 36:44started building a centralized cloud
- 36:45control API.
- 36:46>> To me, it kind of makes sense.
- 36:48>> Well, wait a minute. Like the the folk
- 36:50law goes that Jeff Bezos mandated that
- 36:53every service team uh publishes their
- 36:56API. It sounds like they don't if if if
- 37:00they can't if it can't be syndicated by
- 37:02the cloud control API.
- 37:05>> Let's look at a year old LLM summary.
- 37:10Uh
- 37:13ah see see for example the the
- 37:17certificate uh doesn't support update.
- 37:19Maybe that's simply because you can't do
- 37:21that. But here's a little table for you
- 37:22of the coverage. Maybe this is also
- 37:26maybe this relates directly to the
- 37:27coverage. Looks like it has quite a lot.
- 37:29But where are the services not covered
- 37:31though? This is anything that is
- 37:32covered. Um I'm wondering if cl if local
- 37:36stack is using this because they have a
- 37:38very similar table. So local stack might
- 37:40be using this to to generate their um
- 37:43their local stack.
- 37:44>> So just to reiterate what I think you're
- 37:47saying to me, you're saying that the
- 37:48Terraform uh AWS provider has more
- 37:52coverage than something that was
- 37:54autogenerated.
- 37:56>> When they G8, the AWSCC, they put out a
- 37:59number on the number of resources
- 38:01covered. and it looked like it was the
- 38:05same number, but when you looked into
- 38:06it, it was actually a bunch of like a
- 38:10split between some of the resources. Or
- 38:13maybe I'm getting this wrong because the
- 38:14Terraform provider AWS has special
- 38:16resources that don't really have a
- 38:17backing API. Um, but I I need to look
- 38:20into it. They do have like that's
- 38:22definitely something maybe we can add in
- 38:23later as a clarification on how much is
- 38:26the coverage actually of the FCC
- 38:28provider. But there is a difference.
- 38:30>> How did we even get here? Oh my god. We
- 38:32talked about ter we talked about ter
- 38:34constructs. We talked about why
- 38:36>> we started with spec kit. We started we
- 38:38started with spec kit and how it like
- 38:39formalizes or gives you workflow to do
- 38:41your LLM work like um development. We
- 38:44talked about some evolution in the cloud
- 38:46code budget thing. We talked about you
- 38:49then asked me more about um like more
- 38:52about to towards Terraform and why I
- 38:54built something like Terra constructs. I
- 38:56think so. I gave some examples about the
- 38:58evolution of the cloud, the fact that it
- 39:00changed and became so complex and that
- 39:02the integration patterns between the
- 39:03services are complex and therefore a
- 39:05simple config file or terform module
- 39:07doesn't do it anymore. So that's where
- 39:09um I also give you examples of why the
- 39:11AWS CDK is so great. We talked a little
- 39:13bit about like it not really being
- 39:15maintained but there's still being a lot
- 39:17of new features being added. But but
- 39:19with Terra Constructs, I thought I I saw
- 39:21it as a way as as as migrating it. Now
- 39:25that I'm speaking with you at length, it
- 39:27sounds like you are not thinking like
- 39:30that. You're thinking that you're going
- 39:32to still leverage CDK, but your output
- 39:34is going to be Terraform.
- 39:36>> No. So, so there isn't an a project from
- 39:39Hashi Cororp that puts uh a host service
- 39:43a host um pro object around AWS CDK and
- 39:49then encapsulates the process like when
- 39:51AWS CDK generates something it then
- 39:53generates the Terraform. I'm not doing
- 39:56that. That's the adapter project and I
- 39:58don't believe it can achieve the actual
- 40:01functionality required. Okay. And we
- 40:03talked and that's why we ended up
- 40:04talking about AWS CC because it uses
- 40:06that AWS CC provider that not so many
- 40:09people use that you know doesn't have
- 40:11all of this ecosystem tooling around it
- 40:13and and that doesn't like allow you I I
- 40:16believe like I talked to some people
- 40:18behind the project and they told me that
- 40:20it's really just for early stage
- 40:22companies like quickly want to you know
- 40:24prototype how moving towards Terapform
- 40:27would help them maybe get them halfway
- 40:28there like you know have existing AWS
- 40:31CDK programs and put like a crud cr
- 40:33grudge around it. So, so you understand
- 40:35what I'm saying? It's called the AWS
- 40:36adapter and um but it's not like a
- 40:41long-term solution for um
- 40:45for your
- 40:48Yeah, it's called the AWS adapter for
- 40:50CDK. And as far as I understand, it's
- 40:52not something like if you start
- 40:53Greenfield, you should start, oh, I'm
- 40:55going to write a CDK and I'm going to
- 40:56use the adapter. I'm going to be using
- 40:57Terraform. That's not what it's for.
- 40:59It's meant to be like we have a lot of
- 41:01CDK stacks, we want to like quickly
- 41:03convert them over to Terapform and this
- 41:05can give you like a quick uh bridge
- 41:06towards Terraform. That's how I
- 41:08understand it. Okay. So I threw that
- 41:11away and I started on originally not so
- 41:14detailed. I started just I want to be
- 41:16able to programmatically build terapform
- 41:18configurations and the Terraform CDK
- 41:21seemed like a good solution to me but
- 41:23then I realized it's missing a lot of
- 41:24stuff. So I started building high level
- 41:27but then I keep going lower and
- 41:29ultimately ended up reimplementing all
- 41:30of the core features like asset pipeline
- 41:32bundling pipeline IM pipeline like the
- 41:35actual IM modules the the concept of the
- 41:38you know the interfaces and the patterns
- 41:39the way it works under the hood and
- 41:41these these are called level two
- 41:42constructs right
- 41:44>> yes okay
- 41:46>> correct uh asset pipeline is more like
- 41:48like CLI tooling around it but it's part
- 41:50of it's part of you could say it's part
- 41:52of the L2 stack construct because it's
- 41:55like a higher level. It's using the
- 41:57low-level stack cloud for stack under
- 41:59the hood, but it's adding a whole bunch
- 42:01of functionality around it.
- 42:02>> And just for my vocabulary, L1 is the
- 42:04low level. L2 is like the asset
- 42:06pipeline. Is it is there an L3? No.
- 42:10So there are some L3 tries which are
- 42:12created by professional services at AWS
- 42:14where they have like some um more
- 42:16advanced cloud patterns maybe for banks
- 42:18that are building like a subscriber um
- 42:21like producer type of pattern in the
- 42:24cloud. So they will use several L2s and
- 42:26combine them into a cloud pattern so
- 42:28that it can be used by businesses that
- 42:30would be an L3 or an L3 might be um
- 42:33maybe
- 42:35the real product that that I'm building
- 42:37at my company um that is actually
- 42:39deploying the front end deploy deploying
- 42:41the back end.
- 42:42>> The whole product that makes sense so
- 42:43and then and then the other terminology
- 42:45I'm just mapping into into these L1 L2
- 42:47L3 is like construct and and pattern. So
- 42:50a construct would maybe would be level
- 42:52one and then a pattern would be level
- 42:54two like how do you or it's not a very
- 42:57good mapping
- 42:57>> they they they this they this they this
- 42:58they this they they apply the L label to
- 43:00all constructs. So constructs are either
- 43:02of L1 or L2 or L3. So the L1 constructs
- 43:06are autogenerated from the b basic
- 43:10resources that are available in cloud
- 43:11form or if you're talking about
- 43:13Terraform the L1 resources are the ones
- 43:15that are the Terapform provider
- 43:16resources directly. Okay, that makes
- 43:18sense cuz I think I've seen I got
- 43:20confused by that. So, and then where
- 43:22does the the word pattern fit in here?
- 43:24It doesn't really fit in.
- 43:26>> Yeah, I think it's more like when they
- 43:29talk about L3, there is like the service
- 43:32team. I know that there is like a
- 43:34website from AWS service team that says
- 43:36that these are L3 patterns. These are a
- 43:40bucket with a in with a with a lambda
- 43:42invocation triggers for example. That's
- 43:44a pattern that you may want which is a
- 43:46very common pattern that you build in
- 43:47terraform as well right um you have a
- 43:50module that creates I have a bucket and
- 43:51then I have a handler for a function
- 43:52that whenever an object get pushed in
- 43:54maybe have some type of filtering logic
- 43:56to invoke the lambda that's like a
- 43:58module that you would build right um and
- 44:00in in Terraform you would build that
- 44:02module from the low-level L1 um you know
- 44:06lambda resource and and the bucket and
- 44:08the service permission the IM rule
- 44:10resource and all that in in AWS CDK you
- 44:13will build that L3 using the L2
- 44:16construct which is encapsulating the
- 44:17lambda and knows how to bind itself uh
- 44:20like it it it's backed by an I principle
- 44:23that means that the lambda has a IM role
- 44:25behind it right so so it it it exposes
- 44:29itself as a as a interface so it's I am
- 44:32a principle and a principle you can
- 44:34grant things right so when you have a
- 44:36lum when you have a bucket and then you
- 44:38need to give a permission to the lambda
- 44:40you are basically you you're using the
- 44:43grant method method that accept an I
- 44:45principle. It can the I principle can be
- 44:47a lambda in this case but it can also be
- 44:49an EC2 instance. Isn't Isn't the better
- 44:51terminology would be to call it like a
- 44:53service principle because it's a it's
- 44:56it's the service is
- 44:58>> it's I think it's closely tied to the IM
- 45:00uh terminology which like in an IM
- 45:02policy you have the principle the
- 45:04resource the action
- 45:06>> I forgot the rest so they they use the
- 45:08the same idea the I principle the only
- 45:10new yeah
- 45:11>> the only new one is the grant
- 45:13>> but but there can be different types of
- 45:15principles right you can have a user
- 45:16principle but you can als you can have a
- 45:18human all of behind I principle in the I
- 45:22module. Yeah.
- 45:24>> Okay. Okay. Let's we're probably just
- 45:26splitting hands at this point. Okay. So,
- 45:29so terra constructs
- 45:31um
- 45:33so I still actually don't quite
- 45:35understand. So where is it going to fit
- 45:37in in a in a company just just where
- 45:40where people
- 45:41>> So the way that we use it at my
- 45:43organization is we have two three years
- 45:45of Terraform landing zone and so on and
- 45:48then we had the product teams that
- 45:49wanted to build with CDKTF uh because
- 45:52they prefer Typescript they write uh
- 45:54their lambdas in Typescript. they write
- 45:56their nextgs front end, back end, BFF,
- 45:59whatever, and they like TypeScript and
- 46:03they want a CDKFF and I I had experience
- 46:05with AWS CDK and I was like, yeah,
- 46:06that's I I encourage it. I mean, um I I
- 46:10would rather you not use AWS CDK because
- 46:12of cloud formation than I have, like you
- 46:14said, I have to build uh CI/CD pipeline
- 46:17to do the plan to post the the preview
- 46:19in my PR. I've got all of that already.
- 46:20I've got Terraform, I've got Atlantis,
- 46:22I've got, you know, coordination,
- 46:24collaboration. So, we need
- 46:28>> So, basically, how does the pipeline
- 46:30work? The product has its repo. it
- 46:33writes its uh their CDK and then you
- 46:37have a you have like a GitHub action or
- 46:38something that basically turns their CDK
- 46:42into Terraform and runs it or do you or
- 46:44do you like get a snapshot and then you
- 46:47commit it to your own Terraform uh repo
- 46:49or something?
- 46:51>> Yeah. So I just did this presentation at
- 46:53the um AWS community day in Koala Lumpur
- 46:56Malaysia.
- 46:57>> Oh yeah. How was that by the way? Was
- 46:58that was that at the AWS offices right
- 47:02or
- 47:03>> Yeah, it was no it was at the university
- 47:06uh in in Koala Lumpur. Oh
- 47:08>> um but I do cover exactly how does the
- 47:11workflow work between the team. So how
- 47:13do I
- 47:14>> Okay, we need to link this link link in
- 47:16the description.
- 47:20>> Yeah. So this is an example of an L2. Um
- 47:23it's actually more like an L3 because
- 47:25this is like a load balanced Fargate
- 47:27service. So this uses under the hood it
- 47:30use you see it uses something called
- 47:31patterns. So under the hood it actually
- 47:33set up a load balancer. It set up an ECS
- 47:35far task definition.
- 47:37>> So that's that's something that comes
- 47:39out of AWS CDK right?
- 47:42>> Yes. There's a separate library of
- 47:44patterns and an application load
- 47:46balanced fargate service is a
- 47:48composition of several of the L2
- 47:50constructs to to expose this.
- 47:53>> Okay. Okay. So pattern does exist. Okay.
- 47:55I wasn't going crazy. Okay.
- 47:58I think patterns is like the service
- 48:00team um built L trees. I think
- 48:05>> I I think when when you talk about L
- 48:07trees, it's like you can build L trees
- 48:09and we build a couple of L tries and we
- 48:11we have we expose them as a pattern
- 48:13library. Yeah, I also forgot about that
- 48:15it exist that that's the name of the
- 48:17library. Yeah. So our workflow at at my
- 48:20organization with CDKTF is that the
- 48:24product team lives in their own
- 48:26repository, right? And we're trying to
- 48:28reduce the number of repositories. So if
- 48:30a product team has front end and back
- 48:31end uh and and an infrastructure, we're
- 48:34trying to use more of a monor repos now
- 48:37because we became good good at them. We
- 48:39use like a many monor repos. So it's
- 48:42kind of like
- 48:43>> so the so one product one one repo,
- 48:46right? That's what you're aiming for.
- 48:47Okay, that make sense.
- 48:49>> Yes. Kind of like you know the idea of
- 48:51of is it Conway's law where you organize
- 48:54your services based on your team or your
- 48:56organization layout. So if you have one
- 48:58team working on one product
- 49:00>> so so we have the product mono
- 49:03>> and they are defining their product in
- 49:05Typescript lambdas whatever tightly
- 49:07integrated with their infra resources
- 49:08that they require for their product.
- 49:10some of the resources like in this case
- 49:12the the the cluster the VPC they will be
- 49:14injected when they integrate into the
- 49:16lending zone right but then but they
- 49:18must be able to define those and they do
- 49:19that in a very strongly typed language
- 49:21TypeScript and they use SEO constructs
- 49:23originally they use CDKTF but that means
- 49:25they have to build their own L2s instead
- 49:27we are building the L2s publicly make
- 49:29them available on Apache 2 and then we
- 49:32are using them internally within our
- 49:33organization okay
- 49:35>> nice nice so
- 49:36>> so then yeah
- 49:38>> okay So
- 49:40I mean like I'm just thinking of um my
- 49:43current client
- 49:45they use CDK
- 49:48and then they also use Terraform. So So
- 49:52why what I mean surely didn't didn't you
- 49:55think about uh allowing the product team
- 49:57to run their CDK?
- 50:00I was lucky they didn't ask they didn't
- 50:02push for it. I did I think about it. I
- 50:06was I was thinking actually about
- 50:08talking pointing them towards Palumi SST
- 50:11because that's kind of a bit of a
- 50:13similar idea but then we would need to
- 50:15adopt Palumi because Pulumi is
- 50:17crosscloud but then I wasn't sure about
- 50:19like the self-hosted Palumi story and at
- 50:21the time I didn't know that you could
- 50:23like self-host Palumi. I only heard that
- 50:25it was expensive and that you had to pay
- 50:26for the cloud and so on.
- 50:27>> But I'm not too sure why you're talking
- 50:29about Palumian because you can't just
- 50:31you could have a
- 50:32>> Yeah, I could have let them use cloud
- 50:33formation, right? And then it could
- 50:35publish the cloud.
- 50:36>> You didn't even you didn't want to go
- 50:39there or something. What were you
- 50:40>> No, I have experience with that in the
- 50:42past. Um we had one team heavily in
- 50:44cloud formation and then we had the
- 50:46whole rest of the company data team
- 50:47everyone else using terraform and I was
- 50:50put as part of the team that was using
- 50:52AWS CDK and I was completely convinced
- 50:55that AWCK was way better. I was I was
- 50:57put in there to convert them to
- 50:59Terraform and they converted me to you
- 51:01know the this the the CDK story and then
- 51:04I spent a year trying to build um
- 51:07integration patterns between Terraform
- 51:09and cloud formation. So you must consume
- 51:14like integration between two different
- 51:16products and then you must expose them.
- 51:18So I was using SSM parameter store as an
- 51:20integration registry which is Keith
- 51:22Morris um you know infrastructure as
- 51:24code.
- 51:25>> Keith Morris is my line manager. I don't
- 51:26know if
- 51:27>> exactly right you told me that. So, so I
- 51:30followed his advice uh about his
- 51:32infrastructure as code third edition
- 51:34whatever uh book and follow the
- 51:36integration pattern of um integration
- 51:38registry using SSM parameter store. Now
- 51:40the
- 51:41>> tell him I sent him a message on
- 51:42LinkedIn and he never replied.
- 51:44>> Okay, I'll I'll uh I'll let Ke know. Ke,
- 51:46if you're watching respond. Uh okay, so
- 51:51chapter what 17? You you're oddly
- 51:53specific here, Vincent, but carry on.
- 51:54Yeah, because I did a presentation about
- 51:56it. Um,
- 51:58I called it integrate this. I did it
- 52:01like at the time when I had just
- 52:03finished building the integration
- 52:04patterns and I thought uh this is great.
- 52:07Um,
- 52:08>> and that's the latest book, right?
- 52:10Because he he had a
- 52:11>> yes I I I have already uh subscription
- 52:14so I get access early early access and I
- 52:16read it. Um so these are the actual
- 52:19diagrams from his book and he's talking
- 52:21about organizing your infrastructure and
- 52:24then the different in integration
- 52:25patterns. You have one provider, you
- 52:27have one consumer and then you can do
- 52:29resource matching which is you look up
- 52:30the resources based on some tags or you
- 52:33can do um stack data lookup. So if you
- 52:36have one stack in cloud form and then it
- 52:38has some outputs. So you need to read
- 52:40those cloud form outputs and then um
- 52:42integrate them within another cloud for
- 52:44stack for example. But you know need to
- 52:45know what the team is using. And then
- 52:47the other one is the integration p uh
- 52:49registry lookup pattern where everyone
- 52:52writes to a different key convention and
- 52:55then you can look up through the
- 52:56integration registry. Right.
- 52:57>> Okay. Okay. I mean this is quite common
- 52:59actually. So Keith basically wrote it
- 53:01up. I mean I've seen this everywhere.
- 53:03>> SSM SSM is the registry.
- 53:06>> Yeah. So when we adopted it we didn't
- 53:07have strong conventions about the the
- 53:09format of the keys. What are the like
- 53:11the different paths that you need to
- 53:13capture. We didn't have a clear
- 53:14guideline of how to write your
- 53:16dependencies out and how to read them
- 53:18back because if you put some rules
- 53:20around that then you can you know
- 53:23determine that this will be like a
- 53:25network will have a a list of certain
- 53:26ideas and so you read it out the right
- 53:28way the right way because now you're in
- 53:30type languages like CDK and Terraform
- 53:33maybe you can read it properly.
- 53:34>> So the key go specify the actual typing.
- 53:38>> No I don't think that's part of it. uh
- 53:41it just mentioned that this is a pattern
- 53:42you can follow. It's just my personal
- 53:44experience when I I started to use it.
- 53:46We had problems like that like teams
- 53:49didn't have a clear way or convention on
- 53:51how to write to it. Uh another problem
- 53:54is that this becomes an a layer of
- 53:56indirection and becomes stale like how
- 53:59do you you know keep it up to date? How
- 54:01do you know that the value has changed?
- 54:03How do you notify also because it's a
- 54:05layer of interaction how do you have
- 54:06direct connectivity between provider and
- 54:08consumer? How do you know everyone that
- 54:10consumes that key if you don't have like
- 54:13a an actual like point po point po point
- 54:15po point po point po point po point po
- 54:15point po point po point po point pointer
- 54:15counting like if you do this in memory
- 54:16you will you keep track of how many um
- 54:19actual variables point to the stack
- 54:22right so you have some counter and then
- 54:24you can know if anyone is still reading
- 54:26it and so none of that right and so when
- 54:28you start it sounds very simple and I
- 54:30was very confident I did this
- 54:32presentation I say this solves all of
- 54:33our problems but at that time I already
- 54:35realized that like having some type of
- 54:37generics around it so that we and type
- 54:39when we read it back out is actually
- 54:41really nice. Um, but that never really
- 54:43happened, right? Our teams had written a
- 54:45whole bunch of stuff into SSM parameter
- 54:46store and then we couldn't really keep
- 54:48track of like who was consuming it. I
- 54:51also thought that this was great that
- 54:52this was a a read indirection layer
- 54:54because now it meant that I could move
- 54:56things around and then just update the
- 54:57registry from different places. Big
- 54:59mistake because you have no idea where
- 55:01it comes from. So, so this pattern um is
- 55:05why I did not like my teams to use cloud
- 55:08formation and then adopt some type of
- 55:10indirection layer to communicate with
- 55:12them, right? So, I actually tried to
- 55:14roll this out and I had my landing zone
- 55:17publish all of its like integration
- 55:18points into the SSM parameter store. Uh
- 55:20and then you get other problems like how
- 55:22do you control the consumer permissions
- 55:24or who can write to these keys? How do
- 55:26you, you know, do you cross-ost like do
- 55:29you do you have a central one or do you
- 55:31have this one provider right to
- 55:33different accounts where they have to
- 55:34find it? So, there's a lot of of of
- 55:36problems there and I decided I'm just
- 55:39going to get rid of this whole problem
- 55:41by just using the native built-in
- 55:43Terapform stack feature which is, you
- 55:44know, Terraform outputs. Right.
- 55:46>> Right. I mean, I'm just thinking I'm
- 55:49just mapping this to my own experience
- 55:51about a registry. I think the one at my
- 55:54workplace that we ended up just doing is
- 55:57is essentially we keep a huge a like a a
- 56:02source of truth a JSON file in GitHub
- 56:06and we use that to sort of coordinate a
- 56:09lot of stuff because like hey you want
- 56:11to know where this is which account this
- 56:12goes into what what secret you need.
- 56:16>> It's horrible isn't it?
- 56:17>> I I like it. I like
- 56:19>> it's horrible. I like a single uh large
- 56:22JSON file. I mean because you know
- 56:25>> JSON even even worse if it was YAML
- 56:29you wouldn't have all these like
- 56:30trailing commas or next line changes
- 56:32when you know these git tips would look
- 56:33a little bit better.
- 56:34>> In my opinion the JSON can is is just an
- 56:36output uh here but but it's good. It's
- 56:39it's it's a better paradigm than
- 56:42sprinkling stuff across an SSM paths for
- 56:46Christ's sake.
- 56:47>> Yeah. Yeah. Agree. Um so so very common
- 56:51like you said is the TFRs in terapform
- 56:53world where people you know copy paste
- 56:55TFRS files around for this environment
- 56:57we need those TFRs from that environment
- 56:59we need this TFRS it's a bit similar
- 57:02>> but like but this but this is like even
- 57:04bigger this is across environments
- 57:07uh
- 57:08>> with Terrant you also have the ability
- 57:10to like define dependencies and it
- 57:12automatically create the JSON files and
- 57:14caches them under the hood and then it
- 57:16keeps track of them to like more quickly
- 57:19run like consumer provider interactions
- 57:22and so on. But Teragrant again also very
- 57:24quickly becomes like sprawls out of
- 57:26control, right? So, so you're asking me
- 57:29like why did I not just allow them to
- 57:31write their infrastructure in AWS CDK
- 57:34and I I'm telling you that my biggest
- 57:36problem was the integration patterns.
- 57:38You're saying one solution could have
- 57:40been to create more like a central file
- 57:42so that they would need to read from
- 57:44there um and things like that. But when
- 57:47you say central file, it sounds very
- 57:49similar to SSM parameter store.
- 57:51>> Yeah, but but SSM parameter store gets
- 57:53out of hand because you could you could
- 57:55use arbitrary paths. You can use
- 57:58>> what about the JSON file? What are the
- 57:59arbitrary like fields paths that you use
- 58:02in JSON files?
- 58:03>> They're just they're just keys and you
- 58:06know,
- 58:06>> but what's the structure of the keys and
- 58:08are they nested keys?
- 58:09>> Well, you have the same problem.
- 58:12>> Well, they are they are nested. Yeah. Uh
- 58:15>> yeah. how
- 58:17that's where you then get similar
- 58:19problems.
- 58:19>> I think I think majority of them are
- 58:21just are are just keys. They're not like
- 58:22lists if that makes sense.
- 58:26>> That's I think one thing I learned about
- 58:28Terraform because a lot of people when
- 58:29they write a module they go like well
- 58:31this resource that I just created should
- 58:33really be accessible and they just you
- 58:35know output the all of the attributes of
- 58:38the resource to the module and then you
- 58:40know you're basically have zero
- 58:42encapsulation. The idea of modules is a
- 58:43bit encapsulation so that you don't
- 58:45create these deeply nested attributes
- 58:48dictionary key values um but you rather
- 58:51create individual outputs like if you
- 58:53want the gateway uh endpoint there's a
- 58:55variable there's one key for the gateway
- 58:57endpoint if you want the subnet ID uh
- 59:00maybe um you know maybe that's a list
- 59:02because subnet ID is usually like three
- 59:04whatever but but not deeply nested
- 59:06objects basically detailed attributes as
- 59:10individual outputs
- 59:11>> yeah I think That's I think we're
- 59:13aligned there. Yeah. But like
- 59:15>> it it works well. Um um and the the best
- 59:19thing of all cuz I don't think SSM can
- 59:22really do this very well except you can
- 59:24look back in the versions. But like the
- 59:26brilliant thing about central registry
- 59:28is that you have the really nice change
- 59:30log.
- 59:33You have logs on on SSM parameter store.
- 59:36But I think I think the idea is this.
- 59:39either you put it in git or you have
- 59:42something wrapping more as a service
- 59:44around SSM parameter store but just like
- 59:46no control over parameter store
- 59:49>> is definitely a recipe for disaster.
- 59:51>> Yeah. A config file in git is the sweet
- 59:56spot for me. I know it works well.
- 59:59>> Okay.
- 1:00:03>> We're getting a little bit distracted. I
- 1:00:04mean, so you you were saying you you
- 1:00:08were pushing people you you didn't want
- 1:00:10people to to deploy to run CDK deploy
- 1:00:13just because of coordination issues, I
- 1:00:15guess, is what I'm hearing.
- 1:00:18>> Yes. Um, one of the main issues was to
- 1:00:22avoid stale values and copy value across
- 1:00:24the source of truth of the integration
- 1:00:27because this again is not in a single
- 1:00:28repo, right? It's across many
- 1:00:30repositories and
- 1:00:34because of that we originally had tried
- 1:00:38to have the product monor repo run the
- 1:00:42terraform apply and consume across um
- 1:00:45you know SSM parameter store but that
- 1:00:47didn't really work so instead we still
- 1:00:50keep the dev infra directly applied from
- 1:00:53the product manual repo. So for the dev
- 1:00:55environment they can run terraform apply
- 1:00:57every time they make a change without
- 1:00:58going through any integration
- 1:01:00repository. But when they want to go
- 1:01:02towards
- 1:01:03um so when they run apply here on the
- 1:01:05dev infra folder basically the package
- 1:01:09gets consumed in the dev infra
- 1:01:11application uh or environment and when
- 1:01:14the developer runs apply it creates the
- 1:01:17environment the the the resources in
- 1:01:19pink here purple here and then the
- 1:01:20integration with like the dev ingress
- 1:01:22ALB and the dev VPC and so on right so
- 1:01:25so we are copying over the VPC ID the
- 1:01:27ALB reference as values into the dev F
- 1:01:31monor repo but it we're not copying
- 1:01:32staging and prod and all the other
- 1:01:34environments just one only dev okay
- 1:01:36>> okay okay environment they're completely
- 1:01:39they have full full control over the dev
- 1:01:41environments which they should they
- 1:01:43should be able to do what they need
- 1:01:44right and then when it comes to actually
- 1:01:48promoting this out of dev um they've
- 1:01:50done their QA themselves and they want
- 1:01:53to put this into like staging or prepro
- 1:01:56that's where they are um versioning and
- 1:01:59releasing
- 1:02:00a an actual artifact. So they're
- 1:02:04publishing their infra package which no
- 1:02:07longer is a module. We don't need
- 1:02:09special terapform registry or anything
- 1:02:10like that. We can just use their
- 1:02:12existing u pnpm workflow or npm
- 1:02:15packaging workflow or python if they
- 1:02:17want because cdk can be python but we
- 1:02:19don't do that. So so so you don't need
- 1:02:21like special artifact management for
- 1:02:22infrastructure anymore. Infrastructure
- 1:02:24is managed the same way as your code.
- 1:02:26You're deploying, you're publishing and
- 1:02:28minting, versioning, change lock,
- 1:02:29everything. All of your tools can just
- 1:02:31be reused and we p push it into code at
- 1:02:33effect.
- 1:02:33>> So, okay,
- 1:02:34>> I'm still a little bit puzzled here. You
- 1:02:36call it a package, but is surely it's
- 1:02:38it's it's not a whole bunch of code.
- 1:02:40Surely it's just some
- 1:02:42>> Oh, it is a bunch of code. It is a bunch
- 1:02:43of code. It is like
- 1:02:45>> So basic so basically the code and dev
- 1:02:48and the code and
- 1:02:50>> it's if you are familiar with
- 1:02:51Kubernetes, we don't use Kubernetes. So
- 1:02:53it's like a Kubernetes Helm chart. Oh,
- 1:02:55okay. Okay. Sorry. I I read product as
- 1:02:58uh as production. Sorry. Sorry. I think
- 1:03:00that's where I was confused.
- 1:03:02>> It's good you asked this because this is
- 1:03:04the most common question I get about
- 1:03:05Terra constructs. Like sounds great, but
- 1:03:07how do you actually use it? And that's
- 1:03:10what I try to focus on on this
- 1:03:12presentation.
- 1:03:13>> So yeah, you're saying that this is the
- 1:03:15most common questions uh why of the
- 1:03:18thing.
- 1:03:19>> Yeah. So after I talk about all of the
- 1:03:21great things that you can, you know,
- 1:03:22that you get because now you get these
- 1:03:24really nice developer patterns or
- 1:03:26service integration patterns.
- 1:03:28>> Now, now that you mentioned Atlantis,
- 1:03:29yeah, Atlantis is uh is great. I
- 1:03:32actually need to work out how to
- 1:03:33introduce that into my into my uh
- 1:03:35company. M so I'm I'm I have a
- 1:03:39customuilt EMI and I have custom CDKTF
- 1:03:43workflows and I want to for Terra
- 1:03:45constructs and I want to publish my AMI
- 1:03:49as like the bootstrap for Terra
- 1:03:52Construct. So if you want to start with
- 1:03:53Terra Constructs in your organization
- 1:03:56here is your construct to bootstrapped
- 1:03:59Atlantis. So it deploys Atlantis with
- 1:04:02all of the settings for running CDKTF
- 1:04:04synthesis to Terapform running Terapform
- 1:04:06apply integration with your pull request
- 1:04:08and all that.
- 1:04:08>> That's my I mean if you yeah like if if
- 1:04:13you
- 1:04:13>> but I don't have if your elevator pitch
- 1:04:16is basically how to use Atlantis with
- 1:04:18CDK I think I get it actually. My my
- 1:04:23pitch is you want better devx for your
- 1:04:26developers and most people are like
- 1:04:31uh it's complicated why do I need an
- 1:04:32additional synthesis step how do I
- 1:04:34integrate it into my Atlantis um I can't
- 1:04:37control my developers and my engineers
- 1:04:39they are very creative they create
- 1:04:40really convoluted
- 1:04:42infrastructure if I let them write them
- 1:04:44in typescript uh how do you control that
- 1:04:46well that's where I think part of
- 1:04:49product like platform team is that you
- 1:04:51surface is the pattern so that you can
- 1:04:53you know with bootstraps so that you can
- 1:04:56>> so that you extract the convoluted
- 1:04:59patterns into reusable patterns I don't
- 1:05:01know
- 1:05:01>> to keep the things align I mean the same
- 1:05:03thing with modules right people are
- 1:05:04going to write crazy modules
- 1:05:06>> it sounds like you are doing a a great
- 1:05:09thing in a sense like allowing the
- 1:05:10product team to use a code that's
- 1:05:13familiar to them but ultimately uh
- 1:05:16keeping Terraformers
- 1:05:19>> the first class infrastructure uh uh
- 1:05:22DevX I think that makes a lot of sense
- 1:05:24actually
- 1:05:25>> I'm trying to bridge the platform team
- 1:05:27and the product team because the
- 1:05:29platform team lives in breeds terapform
- 1:05:31they have three years of you know code
- 1:05:33scanning they have their whatever maybe
- 1:05:36they're not using Atlantis but they have
- 1:05:37their own GitHub workflows to run and
- 1:05:39apply um their Terraform with pull
- 1:05:42request like PR reviews uh previews
- 1:05:45sorry yeah
- 1:05:46>> I I love what you just said there uh
- 1:05:48building a bridge between platform and
- 1:05:51and product team though like I'm just
- 1:05:53also mapping this to my current uh gig
- 1:05:56right now. I mean I think if I showed
- 1:05:58them this at at my workplace they would
- 1:06:00be terrified because we don't want
- 1:06:02products to develop to write
- 1:06:04infrastructure as code. We want them to
- 1:06:07config like we want a very very tight
- 1:06:09configuration for them like all all
- 1:06:13>> find this funny because there's a saying
- 1:06:15is it from
- 1:06:19we want products to be able to do what
- 1:06:22they need to do without being blocked by
- 1:06:24platform right platform must provide
- 1:06:26golden paths must provide easy adoption
- 1:06:28for the um for the cloud but they cannot
- 1:06:32be the bottleneck they cannot be the
- 1:06:34ones that are preventing
- 1:06:35the team. Um,
- 1:06:38>> well, that's I I agree. I totally agree
- 1:06:41with that. But like but in a in a
- 1:06:45>> uh Yeah, but in a in a but in a big
- 1:06:47company it it's not scalable.
- 1:06:50I I can see it making a thousand.
- 1:06:52>> No, that's why platform teams exist,
- 1:06:54right? Platform teams are supposed to
- 1:06:56provide the tools so that you can keep
- 1:06:58it under control so that the product
- 1:07:00teams can still evolve. So you in like
- 1:07:02big banks you will have like a
- 1:07:03declarative YAML config file that under
- 1:07:05the hood sets up 10 different terraform
- 1:07:08modules in just the right way so that
- 1:07:10they get deploy uh what they need or
- 1:07:12maybe use custom resources because
- 1:07:13you're on Kubernetes or whatever right
- 1:07:18so this is from platform con 20 uh 2024
- 1:07:20talk from Gregor Hop and he talks like
- 1:07:23nobody wants 80% of Dynamob like your
- 1:07:26module is not just like exposing sane
- 1:07:28defaults as a better Dynamob under under
- 1:07:30the hood, they still need the features
- 1:07:33of Dynamob and if your module doesn't
- 1:07:35expose it, your module is not better,
- 1:07:37right? It's just it's just restricting
- 1:07:39access to it. But it's
- 1:07:41>> that's a very that's very interesting.
- 1:07:44Uh
- 1:07:46did you ever meet Gregor? Because he
- 1:07:47used he lived in Singapore a few fair
- 1:07:49few years.
- 1:07:50>> I was at a few conferences where he was
- 1:07:53as well, but I never really interacted
- 1:07:56much with him. Yeah, he he spoke at the
- 1:07:59AWS meetup, too. That this is very
- 1:08:01interesting because like I think I mean
- 1:08:04I feel like I've been drinking through a
- 1:08:06straw somehow because every every gig
- 1:08:08I'm on, we make a module to give give,
- 1:08:13you know, 80% to the developer. And now
- 1:08:18you're sort of you're sort of flipping
- 1:08:19the table over here by saying that no
- 1:08:22you're uh
- 1:08:24your platform team should be allowing
- 1:08:27them to do
- 1:08:29>> one of my previous CTOs at uh previous
- 1:08:32company he was ex AWS as well I don't
- 1:08:34think he was in a technical role there
- 1:08:36but he um basically had a lot of
- 1:08:38experience on how they did things at AWS
- 1:08:40and he says the platform team's
- 1:08:42responsibility is to put in guard rails
- 1:08:44they're not the bottleneck they just
- 1:08:46need to make sure that teams can do what
- 1:08:47they need to do without shooting
- 1:08:49themselves in the foot. So your job
- 1:08:51really is put in place, you know, the
- 1:08:54the scanners, the llinters and the
- 1:08:56dashboards around it. So if we do have a
- 1:08:58misconfiguration, we can catch it as
- 1:09:01most of the lift as possible.
- 1:09:02>> I mean, I'm I I'm fully behind that.
- 1:09:04Like so basically the platform team
- 1:09:08isn't uh producing modules, they're more
- 1:09:11like producing confest type stuff,
- 1:09:13right? Or linting type stuff. But like
- 1:09:16I've just never seen
- 1:09:16>> but at the same time like the goal of
- 1:09:19the platform team is to observe teams
- 1:09:22usage of the cloud and extract golden PS
- 1:09:26so that we can keep teams aligned so
- 1:09:28that you know teams don't do completely
- 1:09:30different things so that if a new team
- 1:09:32wants to start a new project they have a
- 1:09:34tech radar and they can figure out today
- 1:09:36the recommended way of doing that is
- 1:09:38using this golden path and if I follow
- 1:09:41this golden path
- 1:09:42>> that definitely doesn't happen in my
- 1:09:44current workplace like The idea is that
- 1:09:46is that uh we're laying the tracks
- 1:09:49before the product teams get there and
- 1:09:52uh hopefully it's the tracks that they
- 1:09:54want to take which is something that
- 1:09:57I've always heard as a complaint around
- 1:09:59platform teams and actually one company
- 1:10:01I worked at was very resistant and very
- 1:10:04against towards moving towards a
- 1:10:06platform team they had embedded SRE
- 1:10:08there was a huge um compliance
- 1:10:10initiative and they completely refused
- 1:10:13because they were like you guys are
- 1:10:14going to be a bottleneck. You're going
- 1:10:15to prevent us to do what we want to do.
- 1:10:17>> And and to just to be clear, uh I as an
- 1:10:21infrastructure engineer, I I hate
- 1:10:23platform teams. The whole idea for me is
- 1:10:26just terrible. I'm more in favor of a
- 1:10:28cross functional embedded uh so uh
- 1:10:30embedded infrastructure engineer
- 1:10:32pattern,
- 1:10:33>> but I always end up as the
- 1:10:35infrastructure engineer in a platform
- 1:10:36team essentially. Uh and the funny thing
- 1:10:40is I've been at a lot of organization
- 1:10:41that try to push me towards in embedded
- 1:10:43SR role and I always end up completely
- 1:10:47withdrawing myself from product and
- 1:10:49focusing 100% on the cloud and the CI/CD
- 1:10:51and how to make a solution that
- 1:10:53stretches across all the teams and then
- 1:10:56complaining if people are not using it.
- 1:10:57So I I have like the the opposite like
- 1:11:00habits of view
- 1:11:01>> but I I try to really focus now like I
- 1:11:04want to be part of the of the product
- 1:11:06team. I want to be part of the road map
- 1:11:07but it's very hard for me.
- 1:11:08>> There's some very interesting approaches
- 1:11:11here. I mean can you I mean I can't
- 1:11:14claim to I can't claim the current
- 1:11:16working uh approach in my client is is
- 1:11:21successful. I can't claim that at all
- 1:11:23but it's very uh conservative and very u
- 1:11:27established way of doing things. Can you
- 1:11:29honestly say to me, Vincent, that you've
- 1:11:32you've worked with product teams and
- 1:11:34you've given them a golden what did you
- 1:11:36say? A golden
- 1:11:37>> golden path.
- 1:11:38>> A golden path and they loved it. I mean,
- 1:11:40that sounds also kind of Let's be
- 1:11:42honest.
- 1:11:43>> I did I say that I give them a golden
- 1:11:45path and they loved it.
- 1:11:47>> Well, I mean,
- 1:11:48>> I I did work at one organization.
- 1:11:50>> That's what you're alluding to, right?
- 1:11:52So we did I did in in that same
- 1:11:54organization where they went full in on
- 1:11:57AWS CDK um where the platform team had a
- 1:12:00lot of Terraform. We had a very heavy
- 1:12:03Kubernetes footprint and we built a
- 1:12:05Golang CLI that bootstrapped deployments
- 1:12:07on top of Kubernetes and
- 1:12:11we had the funny thing is we had like 40
- 1:12:14brands and but it was behind it was
- 1:12:16always this two teams and so it was very
- 1:12:19easy to roll it out across the teams and
- 1:12:22we were able to like align all of the
- 1:12:24teams but we did get the feedback from
- 1:12:26the CTO like I I didn't mean to create
- 1:12:28like an isolated team that built the
- 1:12:31platform and then another isolated and
- 1:12:33then the product team. We want I wanted
- 1:12:36DevOps. I wanted you know embedded
- 1:12:37SRRES. I wanted you guys to to build on
- 1:12:41you know for the product and I mean
- 1:12:47I don't know um we rolled it out we used
- 1:12:50it. It was we used Argo CD so it was
- 1:12:53generating all of the uh manifests for
- 1:12:56our GitOps and it was able to centralize
- 1:13:00the Helm charts. So we had like the
- 1:13:02ability to roll out and ch make changes.
- 1:13:05I think the biggest problem right when
- 1:13:07people when teams move away from like
- 1:13:09embedded SRS towards platform teams is
- 1:13:11compliance. When you start doing audits
- 1:13:13and sock 2 and all that then suddenly
- 1:13:16now you have to integrate the zero trust
- 1:13:17all over the company. Now you certainly
- 1:13:19have to have the you know bill of uh
- 1:13:21software bill of material asbomb and you
- 1:13:23have to track and you know provide audit
- 1:13:25reports that you are addressing uh
- 1:13:27vulnerabilities um on on time. You have
- 1:13:30to provide your full uh network
- 1:13:32infrastructure and your firewall rules
- 1:13:34as a compliance audit report quarterly.
- 1:13:37You have to have great glassass
- 1:13:39functionality. When all of that becomes
- 1:13:41imperative to the product teams,
- 1:13:44suddenly you need to have a more
- 1:13:46centralized approach towards managing
- 1:13:48your infrastructure. And that's where
- 1:13:50organizations tend to then switch more
- 1:13:52towards platform teams. That's also I
- 1:13:54think one of Hashikcom's um
- 1:13:56presentations from like evolution of
- 1:13:59like maturity. So all of the
- 1:14:01organizations start with this um
- 1:14:05no that's not what I wanted. I just
- 1:14:06wanted
- 1:14:07>> center view. Who who does that?
- 1:14:10>> Uh I'm clearly not a a dude that's used
- 1:14:14to make presentations. Anyway, so so
- 1:14:16stage one like singular teams, ad hoc
- 1:14:18approach, everyone does whatever they
- 1:14:19want. Sing to standardizing, centralized
- 1:14:21deploys, policy enforcement, team
- 1:14:23collaborations, and then platform team
- 1:14:24self-service.
- 1:14:26>> Yeah. I'm I'm usually in that stage
- 1:14:28three uh uh what do you call it journey?
- 1:14:32Yeah.
- 1:14:33>> Yeah. So so and and that's also funny
- 1:14:36because like most Most startups or
- 1:14:39organizations don't hire DevOps until
- 1:14:41they start hitting these centralization
- 1:14:43problems, right? And then they're hiring
- 1:14:45DevOps because they have reliability
- 1:14:46issues. They have a disparity in
- 1:14:49technology stacks across different
- 1:14:50teams. They have no way of like rolling
- 1:14:52out compliance. Uh but the good thing is
- 1:14:54they have money, they have revenue and
- 1:14:56so they can hire DevOps team which is
- 1:14:59DevOps. the whole idea of like being
- 1:15:01embedded in like breaking down the walls
- 1:15:04uh being doing agile now becomes no we
- 1:15:06actually are hiring a system
- 1:15:07administration team to help us adopt the
- 1:15:09cloud and tame it and
- 1:15:11>> are you suggesting standardizing is uh
- 1:15:14is dev is is the embedded approach
- 1:15:18because
- 1:15:18>> no no no no standardizing is the
- 1:15:21platform approach.
- 1:15:24Yeah, because I thought
- 1:15:26>> a lot of organizations they will have um
- 1:15:28>> so so so so stage one so stage one is
- 1:15:32the is the uh cross functional team
- 1:15:35approach right? Yeah. And then and then
- 1:15:38already in stage two we have to have
- 1:15:40>> So what do you mean with cross
- 1:15:41functional? I think stage one is when
- 1:15:43every team has like ah cross functional
- 1:15:45meaning every team has a guy doing
- 1:15:46DevOps or the CI/CD.
- 1:15:47>> Yeah. Exactly.
- 1:15:48>> More like embedded. Right. Yeah.
- 1:15:50>> Yeah. It's interchangeable here to me.
- 1:15:53So stage one is embedded because that's
- 1:15:56because we because at my my employ my my
- 1:15:59consultancy employer we we always
- 1:16:02advocate uh a cross functional embedded
- 1:16:04uh infrastructure engineer but it never
- 1:16:07really happens for one reason or another
- 1:16:09as I mentioned. So and that's already
- 1:16:11stage one. I feel that's that's kind of
- 1:16:14frightening because there's a very
- 1:16:15interesting book that one of a candidate
- 1:16:17I interviewed pointed me out. I think he
- 1:16:18worked at works as well. He told me that
- 1:16:20to read team topologies which is there's
- 1:16:23an evolution of the teams and and how
- 1:16:26you like there's there's an in between
- 1:16:28there's like fully embedded everyone
- 1:16:29does its own there's like platform at
- 1:16:32complete opposite and then there's like
- 1:16:33a cross like a lot of like bandwidth
- 1:16:36between um how you may have
- 1:16:38>> because because this diagram doesn't
- 1:16:40seem to even it's it's either like
- 1:16:42>> yeah no this is a sales pitch from Hashi
- 1:16:44Corp which sells a platform solution
- 1:16:46right
- 1:16:47>> yeah I get it I get Uh yeah, so this was
- 1:16:50a original slideshow that I made for
- 1:16:52before I started Terra Constructs which
- 1:16:54was the idea was to make something
- 1:16:55called the environment toolkit and I
- 1:16:57don't know why I cannot zoom in uh zoom
- 1:16:59out anymore. Um but basically
- 1:17:03the problem is that we have two personas
- 1:17:07in a lot of organizations. We have
- 1:17:09product teams, we have platform teams.
- 1:17:11Well, there's a few others, but like uh
- 1:17:13and the idea was like the app team, they
- 1:17:15are the ones that need the like a very
- 1:17:19nice interface. They should
- 1:17:20>> if you just give them YAML without any
- 1:17:22schema, then they may shoot them, they
- 1:17:24may not really know how it works. Um and
- 1:17:27and it's not a very nice experience for
- 1:17:29them, but that's commonly what's done
- 1:17:31today, which is like you give them a
- 1:17:32YAML spec file that they have to fill in
- 1:17:34and then under the hood, the platform
- 1:17:36team builds the actual modules. like you
- 1:17:39say they set the path they they
- 1:17:41>> the things right um
- 1:17:44>> why do you say why do you say it's not
- 1:17:46very nice
- 1:17:49>> cuz well
- 1:17:51>> I think YL is not very nice
- 1:17:53>> well I mean it's I mean it's a lot
- 1:17:55easier than them bloody writing code CDK
- 1:17:58let's be honest
- 1:18:01>> why is the file read only this is my
- 1:18:03file
- 1:18:04>> and maybe maybe a separate comp
- 1:18:06>> sorry did you say again about what's not
- 1:18:09very nice.
- 1:18:10>> The the YAML driven
- 1:18:13uh product team. What's wrong with that?
- 1:18:17>> Um the problem with YAML is that
- 1:18:22if you miss a space, you get an error.
- 1:18:25If you you don't know exactly where
- 1:18:28>> use pickle, guys.
- 1:18:29>> No, you should use a proper programming
- 1:18:31language. Stop inventing all these
- 1:18:33additional like Q and um what's the
- 1:18:36other ones? JSON net and like there's a
- 1:18:38thousands of them there's a hundreds of
- 1:18:40them and all of them have the same
- 1:18:42problem
- 1:18:43>> but they become a programming language
- 1:18:45ultimately in the end all of them become
- 1:18:46programming languages
- 1:18:47>> during that conf
- 1:18:50I I I met some Apple engineers and they
- 1:18:53were they pitched pickle and I was
- 1:18:54convinced that pickle is the is is a
- 1:18:57really good way of uh
- 1:18:59>> yeah so so that that's what I'm trying
- 1:19:00to say with this thing here um there's a
- 1:19:03whole bunch of like you just told me the
- 1:19:06IDE experience. Does Spickle have a nice
- 1:19:09IDE in terms?
- 1:19:10>> It does. Unfortunately, it seems to
- 1:19:14>> Wrong example.
- 1:19:15>> They they seem to favor Jet Brains, but
- 1:19:18uh you know
- 1:19:18>> Oh, so anyway, does Pickle have a proper
- 1:19:21package manager and registry?
- 1:19:23>> Yes. Yes.
- 1:19:26>> It's so good. It's so good.
- 1:19:29>> This is is pickle touring complete?
- 1:19:32>> I think so. Yes.
- 1:19:35>> Wrong. Copic language shouldn't be too
- 1:19:36incomplete.
- 1:19:38>> Then why are you not writing it in
- 1:19:40Golang?
- 1:19:42>> Uh you can't expect people to pick up
- 1:19:44Golang.
- 1:19:45>> Yeah. So So
- 1:19:47>> Pickle's designed to
- 1:19:49>> for one task in mind. Uh is explained to
- 1:19:52me by by the um the Apple engineer. He
- 1:19:55says like uh you know you need it's the
- 1:20:00alarm has gone up gone off. It's 2:00
- 1:20:02a.m. and you need to make that change
- 1:20:04safely.
- 1:20:05So, so essentially you're logging into
- 1:20:09that m to that machine at 2 a.m. and
- 1:20:12making a config change that you could
- 1:20:14literally cannot mess up.
- 1:20:16>> Okay. Well, I don't know why I'm getting
- 1:20:19these results here, but it says the
- 1:20:20learning curve is really difficult. It
- 1:20:22has a GVM depend because I entered why
- 1:20:25you should not use pickle.
- 1:20:27>> That's actually a very good answer. U
- 1:20:30yeah that that's that's very good
- 1:20:31answer. like but yeah you're right it
- 1:20:35does require JVM but uh you know I can
- 1:20:37look past that
- 1:20:40and it it does have a learning curve but
- 1:20:42like oh my god I mean
- 1:20:44>> it's enhance safety and maintainability
- 1:20:46it's reduced duplication it's
- 1:20:48abstraction of modality to me pickle
- 1:20:50sounds like JSON net like why why should
- 1:20:52I use pickle and not JSON net
- 1:20:55>> JSON is horrible when I last looked at
- 1:20:57it
- 1:20:59>> yeah so agree like I never really got
- 1:21:02JSON at properly. Um, so
- 1:21:05>> also very very both like pickle's very
- 1:21:07tight actually. It looks looks and reads
- 1:21:09very nicely.
- 1:21:11>> Uh,
- 1:21:12>> I may have to play with it. But I have
- 1:21:14my my reason to get into Terra
- 1:21:16constructs and Typescript was
- 1:21:17specifically because TypeScript is
- 1:21:19everywhere. Uh, it's that's one of my my
- 1:21:22my
- 1:21:23tenets in life
- 1:21:24>> but still but still
- 1:21:25>> the last five years
- 1:21:26>> I I I don't think I can get behind. I
- 1:21:30mean, I can maybe you're working with
- 1:21:31startups, but I still think
- 1:21:33>> product teams maybe I've been working
- 1:21:35for too many big companies and stuff.
- 1:21:38>> Product teams shouldn't be writing uh
- 1:21:42CDK. It's going to get crazy real quick.
- 1:21:46>> That's always like when I talk about
- 1:21:48this is a standard reply. Startups
- 1:21:50shouldn't be writing CD like product
- 1:21:52engineers shouldn't be touching infra
- 1:21:53code and
- 1:21:55>> I mean I mean startups and midsize
- 1:21:58companies I think it's actually pretty
- 1:22:00quite good but if you're like a large
- 1:22:03heavily regulated industry that's never
- 1:22:06going to fly
- 1:22:08>> and I I think at that point you don't
- 1:22:11ask the product engineer to write it but
- 1:22:13you give the platform engineer the right
- 1:22:15tools to build better extractions for
- 1:22:18the pro for the product engineer. there
- 1:22:20because again like this is what we
- 1:22:22talked about last time as well. There's
- 1:22:23this deck CDK
- 1:22:26which gives you the ability to build a a
- 1:22:29strict types like strongly typed schema
- 1:22:33YAML um interface or front end which
- 1:22:37Pulumi also has which is like
- 1:22:39>> it reminds me of the the serverless
- 1:22:41application.
- 1:22:42>> Oh yes like SLA SAML
- 1:22:46>> uh not SAML sorry SAM. Oh yeah.
- 1:22:49Serverless applica. What is the end
- 1:22:51server?
- 1:22:51>> I've been doing too much authorization
- 1:22:52and authentication.
- 1:22:55>> Yeah. So, so but but this is a bit
- 1:22:58funny, right? Because it kind of like
- 1:22:59gives you the L2 con L2 or L3 construct
- 1:23:03as a YAML uh composition thing.
- 1:23:05>> Actually, I I love it. I love it. It
- 1:23:07works for me like uh nine out of 10
- 1:23:10times.
- 1:23:11>> And and I think that's kind of the
- 1:23:13experience that we can build on top of
- 1:23:15Terra constructs or CDKF. basically a
- 1:23:17front end question right under the hood
- 1:23:20like docker file is a front end they
- 1:23:22completely reworked uh docker as well
- 1:23:25like docker file does is not the
- 1:23:27standard like you can have different
- 1:23:28front ends you can have a yaml front end
- 1:23:30you can have an other front end because
- 1:23:32now you're building actual proper
- 1:23:34programming objects that can you know
- 1:23:37bind themselves and evolve and can be
- 1:23:39configured differently you're not stuck
- 1:23:41with static terraform modules that you
- 1:23:43then have to bunch put a whole bunch of
- 1:23:44go templating around because you're
- 1:23:47asking you're giving your engineers um a
- 1:23:49YAML interface to basically configure
- 1:23:51modules under the hood. That's what I
- 1:23:53hear banks do, right? And and it's the
- 1:23:55same with with Kubernetes. That's
- 1:23:56exactly what Helm is. You're just
- 1:23:58putting Go templating around bunch of
- 1:24:00YAML, which is Kubernetes um resource
- 1:24:02definitions or manifests, right? And and
- 1:24:04and
- 1:24:06we see where that goes. We see a Helm
- 1:24:09chart with like a values.yamel where you
- 1:24:12have no idea how that gets, you know,
- 1:24:13interpolated by the gold templates under
- 1:24:15the hood. The gold templates are
- 1:24:17extremely complicated with like
- 1:24:19>> well
- 1:24:19>> too much logic within the template
- 1:24:21engine.
- 1:24:21>> That's why I showed you that Terraform
- 1:24:23project that I was cooking up the other
- 1:24:25day because because I use pickle and and
- 1:24:29when you run it through pickle you can
- 1:24:31see the pickle schema. You can see your
- 1:24:33pickle. You can see how it it it becomes
- 1:24:36Terraform JSON. But why do I have to
- 1:24:38learn a new language when Typescript is
- 1:24:40already a TypeScript compiler that gives
- 1:24:42me strong typing and capabilities like
- 1:24:44Pickle except I don't have to learn
- 1:24:46Pickle and I can just run TypeScript.
- 1:24:48>> Well, the thing that I like about it is
- 1:24:51that it's clear to me
- 1:24:53what
- 1:24:55what is the entry point into Terraform
- 1:24:58when I'm writing in Pickle. It's it's
- 1:24:59very it's clear as day. But if you're
- 1:25:01writing CDK
- 1:25:04uh and using Terra constructs, then then
- 1:25:07you you really don't know what the
- 1:25:10Terraform resources are going to look
- 1:25:11like until the
- 1:25:13>> No, that's not the same thing as what
- 1:25:15you just started the sentence with. You
- 1:25:16said you you you know the entry point
- 1:25:19and then you say you don't know what's
- 1:25:20going to look like. That is a very
- 1:25:22different
- 1:25:24I know the entry point when I use CDK. I
- 1:25:27know exactly how this is going to get
- 1:25:29invoked uh because I have a strongly
- 1:25:31typed interface now that is defined
- 1:25:32under TypeScript and TypeScript compiles
- 1:25:34to JSON schema. So I can expose that
- 1:25:36typed interface as a with a JSON schema
- 1:25:39on top of a YAML file and then my
- 1:25:41engineers can write YAML uh except they
- 1:25:43get an error message if they don't put
- 1:25:44the field in the right place or if they
- 1:25:46have a typo or if they put misplace a a
- 1:25:48space. Maybe you get the same with
- 1:25:50pickle because you get a strongly typed
- 1:25:52pickle file or pickle config. But you
- 1:25:54get exactly the same with TypeScript.
- 1:25:55You can expose it as a JSON schema and
- 1:25:57you can allow people to provide config
- 1:25:59files and you can control the entry
- 1:26:01points.
- 1:26:02>> Okay. Okay. I I might have misspoke here
- 1:26:04but what I'm trying to say is that the
- 1:26:06the translation is is more is more uh
- 1:26:10straightforward in my mind because
- 1:26:13>> but then you're not dealing with
- 1:26:14complicated terapform configurations.
- 1:26:16You're probably I I need to know exactly
- 1:26:18what is a terapform configuration.
- 1:26:19>> Yeah. I mean, am I rec
- 1:26:23I'm just I'm just mapping it into a
- 1:26:25module and you're right when you when
- 1:26:27you in your example when you're messing
- 1:26:29around with API gateway or or lambda
- 1:26:32>> which is a realistic cloud because you
- 1:26:34just cloud workloads because what you
- 1:26:36just said this is what we all use and
- 1:26:38terapform modules are horrible at it and
- 1:26:39then you're going to have to write
- 1:26:40pickle to wrap the horrible terapform
- 1:26:43experience which is very limited because
- 1:26:45it only has like 40 different variable
- 1:26:47inputs the outputs are not even typed
- 1:26:49you write pickle again to do that. But
- 1:26:51how about we go back to the source? How
- 1:26:53about we build a proper L2 construct and
- 1:26:55then we they know how to bind each
- 1:26:57other. And this example here, these 230
- 1:27:00lines of Terraform is not to tell you
- 1:27:02like this is what you're going to work
- 1:27:03with. This is to show you the complexity
- 1:27:04and the ugliness of what's under the
- 1:27:06hood.
- 1:27:07>> This is what you write.
- 1:27:09>> Yeah.
- 1:27:09>> And this is a well-known pattern because
- 1:27:11this is actually the AWS CDK pattern.
- 1:27:12This is literally the CDK workshop
- 1:27:15example except it's on my landing page
- 1:27:17and now it spits out terraform.
- 1:27:20I I think it I think it it definitely
- 1:27:22makes sense to empower product teams,
- 1:27:26but I I I keep on going back to the to
- 1:27:28the thought that in a in a heavy
- 1:27:31regulated company, you you would have to
- 1:27:33just give them a very locked down uh
- 1:27:37>> Yeah. And that's where a platform team
- 1:27:39would need to build using these
- 1:27:41constructs instead of these modules
- 1:27:43actually with a proper programming
- 1:27:44language.
- 1:27:45>> Um they would be able to build what they
- 1:27:46need.
- 1:27:47>> Okay. So the platform team uses terror
- 1:27:49constructs to create the golden paths
- 1:27:53>> for example. Yes. Um like the pattern
- 1:27:56here that I showed on the other slide uh
- 1:28:00which was
- 1:28:02I'm allowing my teams to deploy onto
- 1:28:04Fargate and we use an application load
- 1:28:06balancer. In our case the application
- 1:28:08load balancer is part of the landing
- 1:28:09zone. So they must import it using from
- 1:28:12application load balancer attributes.
- 1:28:13Maybe I can wrap all of that up in as my
- 1:28:16sample app. um you know Typescript
- 1:28:18interface. So you must provide the
- 1:28:20necessary attributes to import the load
- 1:28:22balancer, the VPC and the cluster. And
- 1:28:25this is a strongly typed interface of
- 1:28:26what are my my integration points?
- 1:28:30>> Okay. And then how complete is Terra
- 1:28:32Constructs? Do you do you support like
- 1:28:34everything CDK throws at it or is it
- 1:28:36like some
- 1:28:37>> No, no, no. So, so I started with like
- 1:28:40every single AWS module that is in AWS
- 1:28:43CDK and more moving it over into on top
- 1:28:45of Terraform and that's been very
- 1:28:47manual. Then I also used LLMs to
- 1:28:49automate that process. But I still need
- 1:28:51to write all of the unit tests. I need
- 1:28:53to write all of the integration tests. I
- 1:28:54need to validate everything.
- 1:28:55>> So just you're just getting started sort
- 1:28:57of thing. I mean
- 1:28:59>> like a year getting started. Um, so at
- 1:29:02this point I I I'm focused on building
- 1:29:06the the features that I need at my
- 1:29:08organization, right? Um, what what I
- 1:29:11want
- 1:29:13>> that's a great slide deck actually. I
- 1:29:15really like that.
- 1:29:16>> Yeah. What what I want
- 1:29:20at this point if people are interested
- 1:29:21they should reach out and they say like
- 1:29:23great we use Fargate a lot. I don't see
- 1:29:25Fargate right now. Like this pattern
- 1:29:27that I show here it's a little asterisk
- 1:29:30at the bottom there. pending the ECS
- 1:29:32pattern module public release. So this
- 1:29:34is not in Terra construct integrated
- 1:29:36yet. I need to make that public.
- 1:29:37>> Just just very quickly why why Fargate
- 1:29:39instead of uh serverless? It just there
- 1:29:42needed to be persistent.
- 1:29:43>> We use a lot of serverless at at my
- 1:29:45organization and um at some point
- 1:29:49there's longunning job like services
- 1:29:50that you need to run and better to run
- 1:29:53them in containers
- 1:29:54>> without the whole Kubernetes
- 1:29:57>> um complexity. So we use Terraform a
- 1:30:00lot.
- 1:30:01>> I'm with you. I'm with you. Kubernetes
- 1:30:03is such a nightmare.
- 1:30:05>> So it's very funny because when we met,
- 1:30:07I was running the Docker and Kubernetes
- 1:30:09meetups and you would tell me like why
- 1:30:10don't you just use Compose? It's so much
- 1:30:12simpler. And I would be like Compose
- 1:30:14doesn't have all the dials and knobs
- 1:30:15that you need and Kubernetes is like
- 1:30:16properly designed and easy.
- 1:30:19>> This this must have been years ago.
- 1:30:21>> Yeah. 2017 maybe. Yeah. Well, oh, well,
- 1:30:26that's back when uh what was that? Core
- 1:30:30OS. I love core OS. Don't know what
- 1:30:32happened to it.
- 1:30:33>> They were acquired by IBM. Now there's a
- 1:30:38flat car Linux. It was fully integrated.
- 1:30:41No, they were acquired by Redhead and
- 1:30:42Redhead was acquired by IBM, right?
- 1:30:45>> Yeah.
- 1:30:46>> Yeah. So, so Coras was acquired by
- 1:30:47Redhead. All of the core OS projects
- 1:30:49such as tectonic were integrated within
- 1:30:52open shift and then they replaced like
- 1:30:55the CentOS or whatever the Redhead
- 1:30:58container Linux became was rebranded
- 1:31:00Coros really really so all of the
- 1:31:02Cororez like um systemd integrations
- 1:31:06which ultimately systemd is a redhead
- 1:31:07project as well right um core was 100%
- 1:31:10built on top of systemd
- 1:31:12>> so the so so then some of the original
- 1:31:14cororos people that were not part of the
- 1:31:15acquisition or some people involved with
- 1:31:17the project created flat car Linux. I
- 1:31:19don't know where that went, but um today
- 1:31:21um Talos is super interesting because
- 1:31:24they're they're taking this whole like
- 1:31:27exposing the the the Linux
- 1:31:28administration
- 1:31:30surface completely through the API,
- 1:31:32which was another OS also had this idea.
- 1:31:34I don't know if it was Talos, but there
- 1:31:36was another one doing the same thing.
- 1:31:38>> Not sure what what Talos is. Sounds like
- 1:31:40a security product.
- 1:31:42>> Uh Talos. Talos. Talos.
- 1:31:45But anyway, just to to defend my Oh, you
- 1:31:48know what it is. Yeah, and I think I
- 1:31:49know what it is. Yeah.
- 1:31:50>> Yeah, they just have a new landing zone
- 1:31:52uh landing page. Sorry.
- 1:31:55>> They expose
- 1:31:56>> But going going back to my going back I
- 1:31:58I don't remember talking to you about
- 1:32:00Docker Compose, but I think actually
- 1:32:02Docker Compose is one of those
- 1:32:03technologies that I I still regularly
- 1:32:06use and love.
- 1:32:07>> Oh yes, absolutely. It's just when when
- 1:32:09Docker tried to take it and replace it
- 1:32:11with Swarm, right? They they like,
- 1:32:13>> "Oh that was a show."
- 1:32:15>> No, nobody liked Swarm. Um, so so yeah,
- 1:32:20doctor time with it.
- 1:32:22>> Okay.
- 1:32:23>> Okay. I think we need to somehow end
- 1:32:25this uh because I'm uh but I
- 1:32:28>> getting tired running out of time.
- 1:32:30>> I did really really enjoy this. I think
- 1:32:32we covered a lot of things. I think
- 1:32:34maybe I'm in the right. Okay, one more
- 1:32:36thing.