Terraform 1.5 introduced a new feature called Check Blocks. These configuration blocks allow you validate the health of your infrastructure and detect configuration drift during plan and apply without blocking either process. Let's dig into how check blocks work and why you might want to use them.
Check blocks can check pretty much anything. But we already have many ways to check things in Terraform, so why would you choose them over the other validation methods like variable validation or pre-conditions.
The real goal behind most of check block stuff is to monitor health or check for configuration drift that might not be detected otherwise. In both cases, you would need to have Terraform run a plan on a regular basis and look for warnings from the check block. Terraform Cloud has that functionality baked in for the Business tier, but you could do the same thing with GitHub Actions and a scheduled workflow.
In the video we'll cover the following:
🌮 Check block syntax
🌮 Possible use cases
🌮 Comparison to other validation methods
Big shout-out to Elif Samedin for her execellent blog post on check blocks: unfriendlygrinch.info/posts/t...
Here's the official HashiCorp docs: developer.hashicorp.com/terra...
Thank you so much for watching! Subscribe if you think I’ve earned it. Hit the bell as well if you’re feeling swell.❤️&🌮
✅🔔 Subscribe ► nedinthecloud.com/SubscribeYT
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🌮 Other videos to check out:
📽️ Import blocks in Terraform: • Exploring the Import B...
📽️ Variable Validation: kzitem.infoa-TBiDXXW5o
📽️ Pre and Post Condition Blocks: • Using Precondition and...
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🌮 Timestamps:
⌚ 0:00 Intro
⌚ 0:55 Check Block Syntax
⌚ 2:32 Using Check Blocks
⌚ 7:38 Possible Use Cases
⌚ 10:14 Checking Security Group Rules
⌚ 13:25 Checking VM Power State
⌚ 15:10 Detecting Drift and Health
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#terraform #hashicorp #devops #cloudengineer #techlearning
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
⭐ CONNECT WITH ME 🏃🦖
🌐 Day Two Cloud: daytwocloud.io
🌐 Chaos Lever: chaoslever.com
🌐 Visit my Website ► nedinthecloud.com
🗳 Pluralsight ► app.pluralsight.com/profile/a...
🐙 Find the code at GitHub► github.com/ned1313
🐧 Twitter ► / ned1313
👨💼 LinkedIn► / ned-bellavance
For collaboration or any queries: ned@nedinthecloud.com
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🌮 About Me 🌮
Ned is a curious human with a knack for creating entertaining and informative content. With over 20 years in the industry, Ned brings real-world experience to all his creative endeavours, whether that's pontificating on a podcast, delivering live instruction, writing certification guides, or producing technical training videos. He has been a helpdesk operator, systems administrator, cloud architect, and product manager. In his newest incarnation, Ned is the Founder of Ned in the Cloud LLC. As a one-man-tech juggernaut, he develops courses for Pluralsight, runs two podcasts (Day Two Cloud and Chaos Lever, and creates original content for technology vendors.
Ned has been a Microsoft MVP since 2017 and a HashiCorp Ambassador since 2020, and he holds a bunch of industry certifications that have no bearing on anything beyond his exceptional ability to take exams and pass them. When not in front of the camera, keyboard, and microphone, you can find Ned running the scenic trails of Pennsylvania or rocking out to live music in his hometown of Philadelphia. Ned has three guiding principles: Embrace discomfort, Fail often, and Be kind.
Негізгі бет Ғылым және технология Terraform Check Block - What's the point?
Пікірлер: 7