Рет қаралды 1,456
Get my complete CloudFormation AND Terraform course. After all...why not both? ¯\_(ツ)_/¯ awsdevops.io/p...
In our last video, we launched our first CloudFormation template. Pretty neat, huh? Granted, it's kind of bare bones at this point but what you've learned so far is pretty much what you would need for most projects. So from now on in the series, we'll be focusing more on how to make our templates more dynamic. And we'll start that with the three topics of this video: Functions, Pseudo Parameters, and Conditions.
We've actually discussed functions before in video 7 on Parameters and Refs since refs are intrinsic functions. These functions all follow a very similar format when you're using them in your template: you just replace the value you want from the property with the ref function followed by the logical ID of the resource/parameter you want ref to act on. How do we know what ref is going to return? Well, by going to the documentation where it'll list it. And, what if ref isn't going to return what we want it to? In that case we can use a different intrinsic function called Get Attribute (GetAtt). In this video we'll look at how similar these two functions are when set up and how to use GettAtt in our template. There's several intrinsic functions so though we won't cover them all in order to keep this video on track.
Then, we'll move into Pseudo Parameters: what are they? How do we use them? Where are they in the documentation (because there's several of them)? And lastly we'll get into Conditions, which are just like they sound like: they're how we add conditions to how resources or their properties are made. In the next video as part 2 to this one, we'll put all three of these things into practice in our template.
Links for the documentation we use during this video:
1. Security Group Reference - docs.aws.amazo...
2. Intrinsic Function Reference (Refs) - docs.aws.amazo...
3. Pseudo Parameters Reference - docs.aws.amazo...