r/Terraform • • 10h ago

Discussion how do you review big terraform plans in PRs without just scrolling to the bottom and approving

3 Upvotes

small plans are easy to read but once a change touches a shared module the plan can run to hundreds of lines. it gets really tempting to skim it, see no destroys and hit approve.

what do people actually do here. tools that summarize the plan, policy checks, splitting changes up, or just careful reading? and has a skimmed plan ever let something bad through for you


r/Terraform • • 4h ago

Discussion I built a local emulator of the Nebius AI Cloud API so the official provider can run without an account

0 Upvotes

I've been writing Terraform for Nebius AI Cloud, and iterating against a real tenant was slow and cost money for every apply/destroy cycle. There's no LocalStack equivalent for Nebius, so I wrote one: NebiusMocker.

It serves the same gRPC API as Nebius, so the unmodified nebius/nebius provider works against it. You only change the provider block:

hcl
provider "nebius" {
resolvers = { "*" = "127.0.0.1:4566" }
address_options = { "*" = { insecure = true } }
token = "nmock-dev-admin"
}

Where it stands:

  • 114 of the provider's 116 objects (resources, data sources and ephemeral resources) work. The other two are provider-local and call no API.
  • Every resource is tested with the real provider: create, empty plan, in-place update, empty plan, replace on immutable fields, destroy. A non-empty plan after apply counts as a bug in the mock.
  • Authorization can be enforced, so a viewer token really gets PERMISSION_DENIED, and quotas fail with RESOURCE_EXHAUSTED like the real thing.
  • Some areas have optional real data planes in Docker: S3 on RustFS, docker push via Harbor, Kubernetes on k3s (get-credentials + kubectl work), real PostgreSQL and MLflow.

What it doesn't do: no VMs boot and there are no GPUs (instances are management-plane records), and state is in memory.

It's not affiliated with Nebius, it's a side project, and it's early. If you use Nebius, I'd like to know which resources or workflows you'd want it to handle better.

Repo: https://github.com/kfirgollan/NebiusMocker
Support matrix: https://kfirgollan.github.io/NebiusMocker/terraform.html


r/Terraform • • 8m ago

Passed Terraform Associate (004), sharing how I prepared

Post image
4 Upvotes

Hi all,

I passed the Terraform Associate (004) exam yesterday and wanted to share my experience, since this sub helped me a lot while studying.

Background: developer, with RHCSA/RHCE (Ansible) and AWS SAA/DVA behind me. I had a couple of free days and a birthday voucher, so the whole thing cost me very little. Personally I found the exam fairly easy, but I already had hands-on Linux/AWS/Ansible experience, so your mileage may vary.

How I prepared:

- Video course with slides (Bryan Krausen's course), plus the official HashiCorp docs

- Practice tests on Udemy to find weak spots, then going back to the docs for every mistake

- Writing small configs myself instead of only reading: modules, variables vs locals, remote backend, import, lifecycle rules

- I decided to book the exam after the practice tests started going well

Topics that took me the most time to really understand:

- Module variable scope: child modules inherit nothing, everything is passed explicitly

- State, locking and backends, and what actually gets written to state (secrets in plain text)

- Ephemeral values vs sensitive vs write-only arguments

- plan -refresh-only vs the old terraform refresh, drift and the import workflow

- Variable precedence and version constraints (~>)

Tips:

- If English is not your first language, you can request +30 extra minutes on top of the standard 60 when you register for the exam

- Read each question carefully, many differ by one word (NOT, FALSE, "select two")

- Know the CLI commands and what files they create, not only the HCL syntax

- Do the pre-flight check for the online proctoring well in advance