kakakakakku blog

Weekly Tech Blog: Keep on Learning!

Terraform の認定試験「HashiCorp Certified: Terraform Associate (003)」に合格した

Terraform の理解を証明できる HashiCorp 公式の認定試験「HashiCorp Certified: Terraform Associate (003)」に合格した❗️やったー👏 試験問題に関係する内容は NDA を厳守するため書かず,今回は「試験紹介(普及のため!)」「勉強方法」をまとめたいと思う.この記事を読んで興味を持って受験する人が増えたら良いなぁ〜と \( 'ω')/

🟣 試験概要と出題範囲

試験概要は以下の通り💡

  • 試験名: HashiCorp Certified: Terraform Associate (003)
  • 受験開始日: 2023年5月19日
  • 試験形態: オンライン(監視あり)
  • 言語: 英語
  • 問題形式: 二択・単一選択・複数選択・テキスト一致
  • 試験時間: 1時間
  • 問題数: 非公開
  • 合格点: 非公開
  • 有効期限: 2年
  • 受験料: $70.50 USD(リテイクなし)

出題範囲は以下の通り💡

  • 1: Understand infrastructure as code (IaC) concepts
    • 1a: Explain what IaC is
    • 1b: Describe advantages of IaC patterns
  • 2: Understand the purpose of Terraform (vs other IaC)
    • 2a: Explain multi-cloud and provider-agnostic benefits
    • 2b: Explain the benefits of state
  • 3: Understand Terraform basics
    • 3a: Install and version Terraform providers
    • 3b: Describe plugin-based architecture
    • 3c: Write Terraform configuration using multiple providers
    • 3d: Describe how Terraform finds and fetches providers
  • 4: Use Terraform outside of core workflow
    • 4a: Describe when to use terraform import to import existing infrastructure into your Terraform state
    • 4b: Use terraform state to view Terraform state
    • 4c: Describe when to enable verbose logging and what the outcome/value is
  • 5: Interact with Terraform modules
    • 5a: Contrast and use different module source options including the public Terraform Module Registry
    • 5b: Interact with module inputs and outputs
    • 5c: Describe variable scope within modules/child modules
    • 5d: Set module version
  • 6: Use the core Terraform workflow
    • 6a: Describe Terraform workflow ( Write -> Plan -> Create )
    • 6b: Initialize a Terraform working directory (terraform init)
    • 6c: Validate a Terraform configuration (terraform validate)
    • 6d: Generate and review an execution plan for Terraform (terraform plan)
    • 6e: Execute changes to infrastructure with Terraform (terraform apply)
    • 6f: Destroy Terraform managed infrastructure (terraform destroy)
    • 6g: Apply formatting and style adjustments to a configuration (terraform fmt)
  • 7: Implement and maintain state
    • 7a: Describe default local backend
    • 7b: Describe state locking
    • 7c: Handle backend and cloud integration authentication methods
    • 7d: Differentiate remote state back end options
    • 7e: Manage resource drift and Terraform state
    • 7f: Describe backend block and cloud integration in configuration
    • 7g: Understand secret management in state files
  • 8: Read, generate, and modify configuration
    • 8a: Demonstrate use of variables and outputs
    • 8b: Describe secure secret injection best practice
    • 8c: Understand the use of collection and structural types
    • 8d: Create and differentiate resource and data configuration
    • 8e: Use resource addressing and resource parameters to connect resources together
    • 8f: Use HCL and Terraform functions to write configuration
    • 8g: Describe built-in dependency management (order of execution based)
  • 9: Understand Terraform Cloud capabilities
    • 9a: Explain how Terraform Cloud helps to manage infrastructure
    • 9b: Describe how Terraform Cloud enables collaboration and governance

詳しくは試験サイトに載っている❗

www.hashicorp.com

ちなみに HashiCorp Certified: Terraform Associate の最新バージョン 003 は,2023年4月に発表されて,2023年5月から受験できるようになった.比較的新しく,受験体験談としても新鮮だと思う🐟

www.hashicorp.com

🟣 なぜ受験したのか

今までは AWS CloudFormation や AWS SAM を中心に使っていて,Terraform は Hello World レベルを試したことがある程度だった.しかし今の仕事で Terraform と Terraform Cloud を本格的に使うことになって,1ヶ月半ほど仕事で実践しつつ個人的に勉強もしたため,せっかくなら腕試しも兼ねて HashiCorp Certified: Terraform Associate (003) を受験してみようと思った💪

ちなみに仕事では Terraform を使った AWS リソースの新規構築だけではなく,大規模な Terraform プロジェクトのリファクタリングをしたり,長期間(3ヶ月以上も...)コンソールのみで新規構築・変更されてドリフトしまくっていた状態を完全復旧したり,1ヶ月半で目まぐるしく Terraform と向き合っていたため,試験対策中や試験中に仕事で実装している Terraform コードを思い出す場面が多々あった👌 仕事では Terraform Cloud も使っているので,Terraform Cloud が出題範囲に入っているのも良かった❗️

🟣 受験して良かったこと

仕事では "歴史のある" Terraform コードを実践的に取り扱うことはできるけど,逆に言えば仕組みや機能を "網羅的に" 学べるわけではなく,試験勉強を通して今まで使ったことがなかった機能や構文などを学べたのは本当に良かった❗️またベストプラクティスやあるべき姿も学べるため,実際の Terraform 運用にも今まで以上に自信が持てるようになって,仕事への相乗効果も感じられた.

試験勉強をするまで理解できていなかった機能や使ったことがなかった機能をいくつか挙げると以下など📝

などなど.

🟣 勉強方法

HashiCorp Certified: Terraform Associate (003) の勉強方法として,実際に活用して効果があったと思うコンテンツを「6種類」紹介する❗️

  • 1: Study Guide
  • 2: Exam Review
  • 3: Sample Questions
  • 4: Associate Tutorial List
  • 5: HashiCorp Certified: Terraform Associate Practice Test
  • 6: HashiCorp Certified: Terraform Associate Practice Exam 2023

1: Study Guide

Study Guide には Terraform をゼロから学べるドキュメントとチュートリアルがまとまっている.全部は読んでなく,理解が浅いと思うドキュメントなどを重点的に読むようにした📝

developer.hashicorp.com

2: Exam Review

Exam Review は出題範囲に沿ってまとまっていて,試験対策に使える.Study Guide と重複しているところも多いけど,出題範囲をより具体的に把握できるようになるので,試験を受験する予定なら Exam Review を中心に学習プランを立てると良さそう.苦手なところは積極的にチュートリアルを試したりもした📝

developer.hashicorp.com

3: Sample Questions

Sample Questions にはサンプル問題が計6問載っている.どういう形式の問題が出るか把握できるので早めに1度読んでおくと良いと思う📝

  • True or False(二択)
  • Multiple Choice(単一選択)
  • Multiple Answer(複数選択)
  • Text Match(テキスト一致)

developer.hashicorp.com

4: Associate Tutorial List

Terraform に限らず HashiCorp のプロダクトはチュートリアルが充実してて,Associate Tutorial List という試験専用のチュートリアルもある.復習も兼ねてこれは「計37種類」すべて実施した❗️実施しながら個人メモを Notion にまとめたり,うまく動かなくて hashicorp/learn-terraform-modules-create にプルリクエストを送ったりもして,積極的に手を動かしながら理解を深めた.

もし HashiCorp Certified: Terraform Associate (003) を受験する予定がなかったとしても,Terraform の仕組み・構文・ステート管理・コマンド・Terraform Cloud などをステップバイステップで学べるため,単純に学習コンテンツとして素晴らしかった👏 またチュートリアルで使うのは基本的に AWS Provider になっててそれもまた個人的には試しやすかった(試験自体は特定のプロバイダーに依存しない).

developer.hashicorp.com

5: HashiCorp Certified: Terraform Associate Practice Exam 2023

問題集としては HashiCorp Certified: Terraform Associate Practice Test (English Edition)「計122問」載ってて,これを2回解いた❗️Kindle だと安くて,もし Kindle Unlimited を契約してれば無料で読めてしまう(僕はもともと契約してた📚).この問題集は出題範囲の順番になっていて,苦手分野を認識できたのは良かった.受験するかどうかを決めるためにまず問題集を買って流し読みしてみるのも良いかも👌

\( 'ω')/ この問題集はおすすめ〜

6: HashiCorp Certified: Terraform Associate Practice Exam 2023

もう少し多く問題を解いておきたいなーと思って,Udemy で評判の良かった HashiCorp Certified: Terraform Associate Practice Exam 2023 を買って1回解いた❗️2400円で安いし「計295問」も載っている.これを全問理解できる状態までやっておけば試験当日は落ち着いて解けると思う.

HashiCorp Certified: Terraform Associate Practice Exam 2023 | Udemy

その他

個人的にはほとんど読んでないけど,検索したら出てきたその他の学習リソースも2種類載せておく🔗

github.com

medium.com

🟣 FAQ

試験は英語?

現時点ではそう.とは言え,そこまで怖がる必要はなく,ある程度読めれば問題ないと思う.僕自身は英語だからという苦労は特になかった.もしかしたら KCNA (Kubernetes and Cloud Native Associate) に合格したときも英語で受験したので慣れてたということもあるかもしれない?もし英語での受験に不安があるなら今回紹介した2種類の問題集を自動翻訳などは使わずに解けば慣れると思う👌 ちなみに受験後のアンケートでは「日本語対応ぜひ!」と書いておいた.

試験監督員と英語で喋る?

2023年7月7日に受験したときは,基本的にチャットベースだったので,最悪1度も喋らずに試験を開始できると思う.チャットで指示(部屋を360度見せて・机の上を見せて・机の下を見せて・両腕を見せて・両耳を見せて・スマホはどこに置いてあるか見せて・etc)が届くのでそれに対応しつつ,細かい説明は軽く喋った程度だった(モニターは移動できないから布で隠してるけど布に書いてある文字は不正なものではないよ〜的な説明をした).まったく問題なく試験を開始できた✌

1点ネガティブ要素を挙げるとするならば PSI Bridge Secure Browser は重すぎる.Intel Chip の MacBook Pro を使ったけど試験中ずっとファンが回っていた💨

🟣 まとめ

HashiCorp Certified: Terraform Associate (003) を受験してみて合格した❗️スコアは Overall Score 89% で,個人的には2,3問不安だけど 90% は余裕で超えてるかな〜と思ってたので残念だった.時間配分としては「35分間」で全問解いて「残り25分間」で全問見直しできたので,試験時間は十分にあると思う.

\( 'ω')/ 興味があったら受験してみたら良いのではないでしょうか〜

🟣 ツイート紐付け