Selected work  /  Trility Consulting  ·  2026

A CMMC-ready GitLab platform on AWS GovCloud

Self-managed GitLab for a regulated customer, built from an empty GovCloud account. The interesting part is not the component list — it is that the components are assembled by a control plane that runs continuously, rather than by a pipeline that ran once.

Region
AWS GovCloud (US)
Control plane
Crossplane, multi-account
Composition
9 function-pythonic steps
Compliance
CMMC L1/L2 · NIST 800-171 R2

The problem

A customer operating under CMMC needed their own GitLab — not the SaaS one. Source code, CI runners, and artifacts all had to sit inside a boundary they controlled, in GovCloud, with evidence they could hand to an assessor. "Install the omnibus package on an EC2 instance" would have satisfied the letter of that and none of the spirit: no horizontal scale, backups nobody tests, and a machine that drifts from the day it boots.

The real constraint is subtler. In a regulated environment, the gap between what you designed and what is actually running is an audit finding. Most infrastructure tooling reconciles that gap when someone runs it. That is fine until the person who runs it is on holiday, and it is never fine when the question is "prove this control has been enforced continuously."

What it is made of

GitLab is not one service. It is a Rails application, Gitaly for repository storage, Sidekiq workers, a registry, runners, plus PostgreSQL, Redis, and object storage — each of which wants to be somebody else's problem in production. Everything stateful was pulled out of the cluster and given to a managed service, so a node can be replaced at any moment without anybody thinking about it.

Request path through the GitLab platform A corporate user authenticates through OKTA, reaches an internal network load balancer, which forwards to Cilium Gateway API inside EKS, which routes to the GitLab workloads. GitLab reads and writes to Aurora PostgreSQL, ElastiCache Redis, and S3. Certificates are issued by a cross-account ACM Private CA. ACM Private CA · cross-account Corporate user on-network OKTA SSO SAML NLB internal only Cilium Gateway Gateway API GitLab EKS · Pod Identity Stateful — managed, outside the cluster Aurora PostgreSQL ElastiCache Redis S3 · artifacts, LFS
The request path. Nothing is internet-facing: the load balancer is internal and reachable only from the corporate network, which is the bridge that made an on-network SSO flow possible without exposing the platform. Pod Identity means no workload holds a long-lived AWS key.

Why a control plane, not a module tree

GitLab's dependency chain is genuinely ordered. The database subnet group needs the VPC. Aurora needs the subnet group and a parameter group. The application needs Aurora's endpoint, Redis' endpoint, the bucket names, an IAM role scoped to those buckets, and a certificate signed by a CA that lives in a different account. Express that as Terraform and you get a module tree plus a human who knows the apply order.

Expressed as a Crossplane composition, the order stops being tribal knowledge and becomes the program. Nine function-pythonic steps walk the chain, each one reading what the previous step actually produced rather than what it was supposed to produce. Python matters here: the branching in this chain — conditional resources per environment, names derived from several inputs at once — is miserable to express in patch-and-transform YAML and ordinary to express in a function.

Control loop Manifests in Git are delivered by ArgoCD to a composite resource, which runs a nine-step function-pythonic pipeline that calls AWS APIs across three accounts. Observed state flows back to the composite resource continuously, closing the loop. Git desired state ArgoCD pull Composite (XR) one GitLab platform function-pythonic pipeline steps 1 → 9, chained on real output AWS control plane · three accounts management shared services workload observed state, every reconcile
The arrow that matters is the one going back. Terraform's loop closes when a human runs plan; this one closes every reconcile interval, which is the difference between "we configured that control" and "that control is enforced right now."

The parts that were actually hard

Cross-account private PKI

Everything internal is TLS, and the CA lives in a shared-services account so that one team owns issuance for the whole estate. That means the workload account has to be able to request certificates from a resource it does not own, and the CA account has to permit exactly that and nothing more — a resource share plus a policy narrow enough to survive review. It is a small amount of configuration guarding a large amount of blast radius, which is exactly the sort of thing that is worth getting into code where a reviewer can see it.

Reaching the corporate network without opening a door

The platform had to be usable by people on the corporate network and by nobody else. An internal NLB fronting the Gateway, plus OKTA in the auth path, gets there without an internet-facing endpoint existing at all. The failure mode to design against is not an attacker — it is the well-meaning change six months later that flips a scheme to internet-facing because something was hard to reach. Being declared in a composition is what makes that change visible in a diff.

GovCloud is not a region flag

Partition-aware ARNs (aws-us-gov, not aws), a smaller and later service catalogue, and provider behaviour that differs in small ways from commercial. The practical rule: assume nothing about a service's availability in GovCloud until you have seen it in that partition, and keep the composition free of hard-coded partition strings.

Compliance, done as engineering

Alongside the build, a CMMC Level 1 / Level 2 gap analysis covering all fourteen NIST SP 800-171 Rev. 2 control families. The value of doing that work with the same hands that build the platform is that controls stop being a document. "Access is enforced" becomes a Gateway policy and an OKTA claim. "Cryptographic protection" becomes the private CA and envelope encryption. "Least privilege" becomes Pod Identity roles you can read. Each control ends up pointing at a line in a repository instead of at a paragraph in a binder.

What shipped

  • Self-managed GitLab on EKS in GovCloud, stateful tiers on Aurora, ElastiCache and S3.
  • A multi-account Crossplane control plane with nine function-pythonic composition steps covering the full dependency chain.
  • Cilium Gateway API, cross-account ACM Private CA, Route 53, and an internal OKTA-backed NLB bridge.
  • Pod Identity throughout — no static AWS credentials in any workload.
  • A CMMC L1/L2 gap analysis against all 14 NIST SP 800-171 Rev. 2 control families.

What I would do differently

Write the composition tests before the ninth step, not after. A composition that produces the right YAML for the happy path and something surprising for a half-deleted environment is easy to build and expensive to debug at 2am. crossplane render against a set of fixture claims is cheap to run in CI and I reached for it later than I should have.

Client details are deliberately absent here. Happy to go deeper on the architecture in conversation.