I gave a talk at Rubrik Forward this year called "The Automated Cloud" focused on a framework for automating cloud protection, plus code examples you can fork and implement within your organization immediately (see below).
Day 0, Day 1, Day 2
These terms get used differently everywhere, so let me define what they mean to me before moving forward:
Day 0 is foundational setup: provisioning Rubrik the same way you provision cloud, using Infrastructure as Code.
Day 1 is operational automation: the day-to-day mechanics of keeping new and changing workloads protected without a human clicking through a UI.
Day 2 is signal-driven intelligence: using a signal, either Rubrik detects something and triggers a process elsewhere, or something else (a security tool, SIEM, etc) detects something and triggers an action in Rubrik.
Most organizations I talk to excel at Day 1 as these tend to be some of the easiest, lowest-lift automations to build. Day 0 is a different story: unless you're a true cloud-first company, a lot of companies skip it entirely, with good intentions of implementing it later. You get a new tool, and you want to use it, not configure it through code first.
Day 2 is where things get interesting, and a lot of organizations haven't really started here yet, unless they're already leaning on one of the pre-built integrations, like CrowdStrike, ServiceNow, or Palo Alto Networks Cortex XSOAR, which handle a lot of this out of the box.
So with that, let’s take a look at what’s possible by running through some automation examples for Day 0, Day 1 and Day 2
Automating Day 0: Infrastructure as Code
Rubrik's protection stack is fully expressible in Terraform through the Rubrik provider, which recently earned Terraform Premier Partner status.
If you're already a Terraform shop, or your process requires everything to go through a pipeline, or you're standing up a greenfield environment, it's best to configure Rubrik with Terraform right from the outset. Rubrik maintains a public repo with many examples covering everything from cloud account onboarding and SLA assignment to tag rules, custom roles, and Exocompute across AWS, Azure, and GCP.
We talk about that greenfield path a lot, but in practice, most of the customers I work with have already configured Rubrik by hand and are now trying to bring it into Terraform after the fact. So that's what we'll walk through today.
Here's the scenario: you've already onboarded an AWS account to Rubrik Security Cloud, and you're already protecting workloads. Bringing an existing Rubrik environment into your Terraform state can be easily accomplished leveraging native import blocks.
Start by creating an imports.tf file in the root of your plan or module, and add an import block for your account:
import {
to = polaris_aws_cnp_account.tme_rdp
id = "<rsc-account-uuid>"
}
import {
to = polaris_aws_exocompute.tme_rdp_us_east_1
id = "<rsc-exocompute-uuid>"
}