Subnets Preview — plan and split VNet subnets in the browser

运维划子网很麻烦?试试这个工具

If you’ve planned a VNet, you know the drill. Wiki holds the “official” diagram. Excel is where you actually try cuts. IPAM kicks in once people agree on addresses. That’s fine until you need to split a /22 three different ways the night before a meeting.

I just wanted something you could open, chop up, undo, and send to someone—without hunting down who changed which /27 two weeks ago.

Read More

Terraform tfpolicy vs Sentinel and OPA for plan-time policy checks

没学过 Sentinel / OPA?Terraform 规则这回直接换了!

Something I’ve picked up in ops: some tech you never learn—and that’s fine.

Terraform policy used to mean Sentinel or OPA. Different languages, different mental models.

This year HashiCorp shipped tfpolicy to GA. If you already write HCL, the bar to entry is a lot lower.

Read More

Is Terraform still worth using for DevOps in 2026?

这年头运维,还有人用terraform么?!

Nothing is fixed. It depends when and where.

I’ve watched DevOps engineers hate on Terraform and I’ve watched others treat it like scripture.

Debating an IaC tool without context is pointless—like arguing whether coffee is good based on someone else’s hangover.

Still, a Reddit thread on clickops vs IaC nudged me to write down how I think about Terraform as an ops person right now.

I first touched Terraform on an AWS project in 2019. Declaring infra in code felt like cheating in the best way.

I was mostly dev then, but everything after that gravitated toward Terraform—Aliyun, GCP, Azure, the whole tour.

Before the nice parts, here’s what I keep hearing from people actually running platforms.

Read More

Terraform VPC splits across accounts — simple HCL beats clever locals

IaC:简洁 or 灵活

I’ve been neck-deep in DevOps lately, and one thing keeps coming back: Infrastructure as Code reads better when it’s boring.

Let me show you what I mean—one migration, two ways to wire it.

Say you’ve got several networks in one account and you want each VPC living in its own account going forward.

1
2
3
4
5
6
7
8
9
10
11
12
# network.auto.tfvars
vpcs = {
network1 = {
name = "vpc-1"
}
network2 = {
name = "vpc-2"
}
network3 = {
name = "vpc-3"
}
}

You’ll reuse a module per account. Fair.

And no, you can’t dynamically pick a provider at runtime—Terraform doesn’t do that.

The real question is how you shard that vpcs map so each module gets the right slice.

Two patterns I’ve seen a lot of teams reach for:

Read More

Fluence FLT drop — claim guide for eligible GitHub Web3 devs

FLT空投:2023年参与过web3的开发能领

I ran into Fluence’s FLT-DROP: an airdrop for people who actually shipped Web3 code. When I wrote this it was worth on the order of $600.

Nothing earth-shattering if you live in Web3, but fun for a part-time dabbler — I poked at ICP and put together a small on-chain voting repo, which was enough to count.

Here is how I claimed it (first real Web3 wallet for me; picking the wrong chain for fees was painful).

Read More

arc-swap — atomic Arc swaps vs RwLock for config

Rust工具集之arc-swap

In Rust, config that threads read while another thread updates it often shows up as Arc<RwLock<T>>. You can also reach for arc-swap. What’s the difference?

Typical shape: one thread updates config while others keep reading—they should see the new snapshot without restarting the process.

Read More

Sealed traits in oauth2-rs — closing the typestate loophole

Rust设计模式:sealed trait续篇

The first sealed-trait post showed the mechanic in isolation. Here is why it shows up in oauth2-rs: endpoint state in the client API. That design only works if callers cannot add their own state types.

Read More

Rust typestate — compile-time checks for OAuth2 client setup

Rust设计模式:typestate

Typestate encodes lifecycle state in the type system.

oauth2-rs uses it for a concrete pain point: OAuth2 clients need auth_url, token_url, introspect_url, and friends wired up before auth calls make sense. If token_url is missing, exchanging an authorization code for a token fails at runtime.

Forgot to call set_token_url? You find out when you fetch a token—not when you build the client.

Typestate pushes that mistake to compile time.

Read More

Rust sealed traits — limiting who can implement your trait

Rust设计模式:sealed trait

I was bumping dependencies on an older OAuth2 axum koan project; the newer oauth2-rs uses sealed traits in a way that’s easy to miss if you only read the public API.

Read More

AWS Lambda in Rust — cargo-lambda, local watch, and LocalStack deploy

如何用Rust快速构建AWS Lambda Function

AWS Lambda is a lightweight compute service: pay for what you use and let AWS handle packaging and scaling.

Billing tracks duration and memory, which is where Rust tends to shine—hence all the serverless handlers written in Rust.

Below: cargo-lambda for a Rust handler, local watch, and a LocalStack deploy—you don’t need a real AWS account for the sandbox at the end.

Read More